This is a migrated thread and some comments may be shown as answers.

Import PDF exception

3 Answers 42 Views
PdfProcessing
This is a migrated thread and some comments may be shown as answers.
Egil
Top achievements
Rank 1
Egil asked on 23 Mar 2017, 12:07 PM

Hello,

I have the following code that loads a PDF :

byte[] file = File.ReadAllBytes(@"c:\big.pdf");
RadFixedDocument doc = null;
var prov = new PdfFormatProvider();
using (var input = new MemoryStream())
{
   input.Write(file, 0, file.Length);
   doc = prov.Import(input);
}

 

On import I am getting the following exception :

Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfReal' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfName'.

 

I attached the pdf used to this. Could you please let me know what the problem is? (Telerik version used is 2017.1.116.40)

Thank you.

3 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 24 Mar 2017, 09:51 AM
Hi Egil,

Please, note that the public forums allow only images as attachments to the posts.Because of this, I suggest that attaching the document you mentioned in your post has failed. Is it possible to upload the document somewhere and share a link in this thread?

If you would like, you can also contact us through our support ticketing system. The threads there are private and the system allows you to attach archive files.

Regards,
Tanya
Telerik by Progress

0
Egil
Top achievements
Rank 1
answered on 24 Mar 2017, 09:56 AM

Hello,

I added support ticket 1099941 for this.

Thank you

0
Tanya
Telerik team
answered on 24 Mar 2017, 05:58 PM
Hi Egil,

Thank you for submitting the support thread. I tested the document and replied in the ticket, so let's continue the conversation there for more consistency.

Regards,
Tanya
Telerik by Progress

Tags
PdfProcessing
Asked by
Egil
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Egil
Top achievements
Rank 1
Share this question
or