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!
![]() |
ExtractPageRanges |
Post Reply ![]() |
Author | |
mhc ![]() Beginner ![]() Joined: 29 Dec 09 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() Posted: 29 Dec 09 at 9:41PM |
I have a PDF that I need to extract certain pages out and create another pdf with just those pages. ISED seems to have the function:
QP.ExtractFilePages Input, Output, Pages What I am passing is this: QP.ExtractFilePages PDFName, NewPDF, "1-2" When I do this the NewPDF does not get created. Any help on why this does not work? |
|
![]() |
|
mhc ![]() Beginner ![]() Joined: 29 Dec 09 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
Update:
I got it to create the file now but it only creates 1 page correctly. Page 1 is correct and then Page 2 is blank. |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi mhc!
Here you'll find all you need for your first steps: http://www.quickpdf.org/forum/quickpdf-the-first-steps_topic1242.html Cheers and welcome here! Ingo |
|
![]() |
|
mhc ![]() Beginner ![]() Joined: 29 Dec 09 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
Thanks Ingo, This function does not work for some of our PDF's. I tried another PDF it works but not others. Do you have any ideas why it would work for some PDF's but not others? I can email you the PDF it doesn't work for if you want. |
|
![]() |
|
shimax ![]() Beginner ![]() Joined: 03 Oct 09 Location: Japan Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() |
Hello mhc, I confirmed what you have described. and by editing the sample code of ExtractFilePages like below: //QP.ExtractFilePages(GetInputFolder() + "sign_me.pdf", GetOutputFolder() + "extracted_page_range.pdf", "2-5, 8, 10, 13-19"); sign_me.pdf works but Moby_Dick_NT.pdf does not work well and 13 pages of blank pages are produced. And I tested with other PDF files which I have, and encountered the strange things. Maybe this phenomena is because of my special environment. My OS is Japanese (But in my tests, no unicode paths are involved. ), and I develop with PHP and ActiveX. Anyway, I think your description can be confirmed in my environment. |
|
![]() |
|
DELBEKE ![]() Debenu Quick PDF Library Expert ![]() ![]() Joined: 31 Oct 05 Location: France Status: Offline Points: 151 |
![]() ![]() ![]() ![]() ![]() |
I think the problem come with an unusual contruction of the Pages directory in the pdf
Usualy, a pages directoy look like this
The count entry say how much pages are defined in the pdf and the kids entry show where the pages begin
When a Kid entry points to another page directory, ExtrafilePage is lost
In the sample the page 1 entry look like this
And the second one
This one is a sub-page directory and if this construction is not a bad one, it is also unusual.
The ExtratPageFile can't handle it.
Edited by DELBEKE - 03 Jan 10 at 10:55AM |
|
![]() |
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