Completed
Last Updated: 11 Aug 2023 04:05 by ADMIN
Victor
Created on: 03 Mar 2021 08:08
Category: PdfViewer
Type: Feature Request
1
RadPdfViewer: add an overload of the LoadDocument method that accepts a RadFixedDocument

Is there a way to load this RadFixedDocument into a RadPdfViewer without writing the document to a file first and then loading it in the viewer?

Workaround:

You can achieve the desired functionality by exporting the RadFixedDocument to a MemoryStream instead of a file in the file system and then load it in the PdfViewer: 

RadFixedDocument document = CreateRadFixedDocument();

PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
Stream ms = new MemoryStream();
pdfFormatProvider.Export(document, ms);

radPdfViewer1.LoadDocument(ms);

 

1 comment
ADMIN
Dimitar
Posted on: 11 Aug 2023 04:05

Hi,

As of R1 2022 SP1 the RadPdfViewer.Document setter is public, and it can be directly set to a RadFixedDocument instance.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.