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

PdfFormatProvider.Import

3 Answers 240 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Sindre
Top achievements
Rank 1
Sindre asked on 03 Dec 2010, 01:18 PM
Hi

I am developing an application that should be able to preview a set of documents of different types.
Word, txt, html seems to work fine, but what would really be useful is the ability to preview pdf documents since most of the documents that are going to be previewed in this application is just that.

I noticed in version 2010.3.1129.1040 that a PdfFormatProvider had been included, but the PdfFormatProvider.Import()-method throws a NotSupportedException.

I was just wondering as to when such a method will be supported or if there is another way to preview pdf documents that I have yet to discover?

Regards
Sindre

3 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 03 Dec 2010, 05:19 PM
Hello Sindre,

PDF import is indeed not supported. PDF content, once exported is being layed out in 2D space rather than the flow douments we are using. Thus, implementing it requires an entirely different approach to storing documents. We have plans to implement it, but it has not been scheduled yet. Thus, I cannot provide you with a specific time frame when it will be available.
If you have any other questions, do not hesitate to contact us again.

Greetings,
Iva
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Ivelin
Top achievements
Rank 1
answered on 19 Feb 2021, 11:44 AM

Hello,

When I try to call  provider.Import(bytes)) I am getting error: "Stack empty"

PdfFormatProvider provider = new PdfFormatProvider();

byte[] bytes = System.IO.File.ReadAllBytes(myPath);
RadFixedDocument document = provider.Import(bytes));

The code is part from your github repo = https://github.com/telerik/document-processing-sdk/blob/master/PdfProcessing/ModifyForms/Program.cs

0
Tanya
Telerik team
answered on 19 Feb 2021, 02:43 PM

Hello Ivelin,

Such an error might be caused by something specific in the content of the PDF document. I would like to ask you to share the document you are testing with so we can investigate what is causing the described behavior. 

Since the API you are using is for PdfProcessing and this forum post targets RadRichTextBox for Silverlight, please, open another forum post or support ticket. This will help us keep the forums in a good order and easy to navigate. Thank you in advance for understanding.

Regards,
Tanya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
RichTextBox
Asked by
Sindre
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Ivelin
Top achievements
Rank 1
Tanya
Telerik team
Share this question
or