PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Dec 12, 2017 11:49 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Faster merges
PostPosted: Tue Jun 20, 2017 1:03 pm 
Offline

Joined: Tue Jun 20, 2017 12:58 pm
Posts: 2
Hello.

I'm merging different PDF files. I'm doing it following the examples:
1.- creating a new document (newdoc)
2.- opening each doc to be merged in import mode.
3.- for each page of each document opened in 2, newdoc.AddPage(page)
4.- save the newdoc newdoc.Close()

It works perfectly but it is quite slow.
Is there any faster way of doing this? I wonder for instance a way of merging N files not going page by page...

Thanks a lot

Oskar


Top
 Profile  
Reply with quote  
 Post subject: Re: Faster merges
PostPosted: Wed Jun 21, 2017 8:11 am 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2740
Location: Cologne, Germany
Hi!
osaiz wrote:
It works perfectly but it is quite slow.
How slow is "quite slow"?

osaiz wrote:
Is there any faster way of doing this? I wonder for instance a way of merging N files not going page by page...
There must be a loop over all pages somewhere. A method "AddPages" might allow some optimizations.

Make sure you use a Release build of PDFsharp when testing speed or checking file size.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group