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

Clone RadFixedPage

1 Answer 42 Views
PdfProcessing
This is a migrated thread and some comments may be shown as answers.
Stefania
Top achievements
Rank 2
Stefania asked on 07 Sep 2017, 03:27 PM

Hi

How can I clone a RadFixedPage and added to a new RadFixedDocument

 

I tried with this code but I get an error so I think that I need to clone the page before I can added to another document

RadFixedDocument originalDocument = pdfProcessingProvider.Import(inputPdfStream);
                       RadFixedDocument newDocument = new RadFixedDocument();
                      
                       foreach (var page in originalDocument.Pages)
                       {                    
                                                 
                               newDocument.Pages.Add(page);//ERROR!!
                          
                       }

 

Thank you

1 Answer, 1 is accepted

Sort by
0
Accepted
Tanya
Telerik team
answered on 08 Sep 2017, 12:35 PM
Hi Stefania,

For merging pages from one document to another, I would suggest you check the PdfStreamWriter functionality. It enables you to manipulate the pages of PDF documents with minimal resources and a great performance. We have an example showing how you can merge the document pages - you can find it in our SDK repository.

Hope this is helpful.

Regards,
Tanya
Progress Telerik

Tags
PdfProcessing
Asked by
Stefania
Top achievements
Rank 2
Answers by
Tanya
Telerik team
Share this question
or