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!
![]() |
How to re-index PDF pages ? |
Post Reply
|
| Author | |
DrCizor
Beginner
Joined: 13 Apr 15 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Topic: How to re-index PDF pages ?Posted: 03 Apr 16 at 6:44AM |
|
Hi everyone,
I have to re-index a large PDF file (3 to 4000 pages ) containing invoices. I am constrained to sort it by postal code of the recipient, add text on the fly and add a separator page between cities !!! I have already managed to extract and sort informations into a CSV file but now my problem is how to merge pages from the PDF source ? Here is my code to append pages from the PDF source to the current but it doesn't work... ![]()
thanks for the help Edited by DrCizor - 03 Apr 16 at 2:36PM |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 Apr 16 at 7:20PM |
|
Hi,
myPDF will be the new - still empty - file? There still aren't any pages but you want to insert a blank page after the second page? CopyPageRanges needs a string with the page ranges. In your code snippet sometimes there are double quotes and sometimes there are single quotes round your strings. What's correct... single or double? At LoadFromFile you have written d:\\ and at the end at SaveToFile there is a d:\ ... what's correct?
|
|
|
Cheers,
Ingo |
|
![]() |
|
DrCizor
Beginner
Joined: 13 Apr 15 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 Apr 16 at 8:52PM |
|
Hi Ingo,
Thank you for the answer. For the blank page, it is because I have to manage recto/verso. In Javascript usage single or double quote are similar, but it will be the same character to round a string. For the path to save ... I miss the the second "\" ![]() I modify the code with a loop who gives static values for test and using a single object. This code works, however, to copy 4000 pages it takes about 30 minutes and the output file is about 500Mo ... ![]() I think I did stupids things in my code and it is not optimized, how to improve it ?
thanks in advance Edited by DrCizor - 03 Apr 16 at 8:55PM |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 Apr 16 at 9:37PM |
|
Hi,
try the search functionality here: http://www.quickpdf.org/forum/search_results_posts.asp?SearchID=20160403213345&KW=CopyPageRanges If SetTextSize is always the same you should call it only at the top one time? Older posts are telling that CopyPageRanges copies always the fonts, too. So size will increase... Try the compress functionalities, too. |
|
|
Cheers,
Ingo |
|
![]() |
|
DrCizor
Beginner
Joined: 13 Apr 15 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 Apr 16 at 1:27PM |
|
Hi Ingo,
I don't have found anything relevant in your search link and in this part of forum. I continue to seek a faster method to append pages and reduce this size... Is there other methods to quickly copy pages from one document to an other ? It seems after each CopyPageRanges the value of TextSize is loose, I have to set it before drawing the text. thank you |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 Apr 16 at 7:52PM |
|
Hi,
here you can search for better solution, code snippets, samples: http://www.quickpdf.org/ |
|
|
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