Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Change order of pdf pages and save it |
Post Reply ![]() |
Author | |
mandriospo ![]() Beginner ![]() Joined: 16 Dec 21 Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() Posted: 16 Dec 21 at 9:34AM |
Hey guys, this is my first post here. I am beginner and I am looking for the best way to solve my problem.
I have several pdf files with multiple pages. I need to change the order of the pages in these files and combine all into new 1 pdf file. I think the best way is to save each pdf file into array where each element of array is a single page of that file. Then I can sort this array with my way and save that array into one pdf. I don't know if this scenario is possible to achieve. Please give me some advices. What metods to use?
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Mandriospo,
with QuickPDF you can split larger pdf-files into single pages. In a second step you can merge these single pages via MergeFileList into a new pdf with a new order. Here's a function to split the pdf: https://www.debenu.com/docs/pdf_library_reference/ExtractFilePages.php Here's a kb about how to merge: https://www.debenu.com/kb/merge-pdf-files-together-programmatically/ BTW: Here's the reference guide: http://www.debenu.com/docs/pdf_library_reference/FunctionGroups.php Here's the developer guide: http://www.debenu.com/products/development/debenu-pdf-library/help/developer-guide/ Cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
![]() |
|
mandriospo ![]() Beginner ![]() Joined: 16 Dec 21 Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
Ok thank you for your reply and advices. I am wondering if ExtractFilePages is best option? It is little bit messy to create like 1000 new pdf files. I was thinking to split pdf file with multiple pages into memory. Is it possible? I wish to split pdf object into pages which I can hold programatically in array and then merge it all together into one pdf file.
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
You think it's better to manage "1000 new pdf" objects in ram? ;-)
But ... Yes ... You can do it in memory as well. Have a look at "MergeStreams": https://www.debenu.com/docs/pdf_library_reference/MergeStreams.php For further investigations you can try your keywords to find kb-aricles and much more here: https://www.debenu.com/docs/pdf_library_reference/Search.php |
|
Cheers,
Ingo |
|
![]() |
|
mandriospo ![]() Beginner ![]() Joined: 16 Dec 21 Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
My idea how to solve my problem: 1. Load all pdf files and use CapturePage function for each page and save id of captured process into array 2. Sort my array 3. Create new pdf document 4. Loop through my array and create new page and draw captured pages with my order What do you think abou this idea?
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
The idea sounds good but i myself didn't do this before.
I fear some memory probs could raise doing this with many pages in one instance. Try it and share your experiences with us here. Edited by Ingo - 21 Dec 21 at 10:20PM |
|
Cheers,
Ingo |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store