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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Corupted PDF using ExtractFilePages
  FAQ FAQ  Forum Search   Register Register  Login Login

Corupted PDF using ExtractFilePages

 Post Reply Post Reply
Author
Message
tomkuipers View Drop Down
Beginner
Beginner


Joined: 21 Apr 13
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote tomkuipers Quote  Post ReplyReply Direct Link To This Post Topic: Corupted PDF using ExtractFilePages
    Posted: 21 Apr 13 at 8:54AM
Hello,

I am using the Quick PDF Library ExtractFilePages to split an pdf in seperate pages that come from a scanner. Te problem is the 2'nd page and up can be opened by acrobat reader but gives me an error "De paginastructuur van het document bevat een ongeldig element" wich would be something like the page structure of the document has an false element.

I have one PDF with two pages:

When i extract the pages
The 1st page is ok: http://www.emsf.eu/test_1.pdf
The 2nd page is giving the error:  http://www.emsf.eu/test_2.pdf 

Using the latest Demo, or older versions all have the same outcome.

This is anoying for the users who are opening the PDF's. Does anyone have an idea how to solve this?

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 21 Apr 13 at 7:01PM
Hi Tom!

What about other functions like CopyPageRanges?
The same error with your pdf-documents?
ExtractFilePages isn't a new function so i won't expect real basic errors.
Could you post your relevant code part here?
Perhaps someone could have an eye on it...

Cheers and welcome here,
Ingo

Back to Top
tomkuipers View Drop Down
Beginner
Beginner


Joined: 21 Apr 13
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote tomkuipers Quote  Post ReplyReply Direct Link To This Post Posted: 22 Apr 13 at 8:12AM
The Code i am using that allso runs on the Demo:
QP.ExtractFilePages("c:\\test.pdf", "", "c:\\test_1.pdf", "1");
QP.ExtractFilePages("c:\\test.pdf", "", "c:\\test_2.pdf", "2");
DisplayPDFReader("c:\\test_2.pdf");

The second shot with:
QP.ExtractFilePages("c:\\test.pdf", "", "c:\\test_extracted_page_2.pdf", "2");
DisplayPDFReader("c:\\test_extracted_page_2.pdf");

Gives me the same problem error on opening the pdf from the 2nd page and up.


Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 22 Apr 13 at 10:26AM
Tom,

Many of the scanner manufacturers produce very poorly written PDF's that contain lots of errors. It is easier for Acrobat or any other viewer to display a PDF than it is to split a PDF and have the output readable.  We would need to see the PDF to see what the problem is.  I suspect other PDF libraries could also have similar problems with these malformed PDF's.

Please create a new support case using http://www.debenu.com/support/contact/ and then send us the original PDF that you are trying to extract pages from.

Andrew.
Back to Top
tomkuipers View Drop Down
Beginner
Beginner


Joined: 21 Apr 13
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote tomkuipers Quote  Post ReplyReply Direct Link To This Post Posted: 22 Apr 13 at 11:30AM
I submitted for support, hope for an solution!

It is comming from different types of Develop multifunction devices. Most of the online PDF splitters do split into correct files, so i hope that an update of the PDF Library wil fix this!

I will update the topic when i have recieved an solution.
Back to Top
pindemad View Drop Down
Beginner
Beginner


Joined: 01 May 13
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote pindemad Quote  Post ReplyReply Direct Link To This Post Posted: 01 May 13 at 12:58PM
I get the same error

I have also tried using ExtractPages function and SaveToFile
However it fails on the last page and exports the next to last page instead of exporting the last page
        for (i=1;i<=numpages;i++)
        {
...
            QP.LoadFromFile(CString(filename),CString(L""));
            QP.ExtractPages(i,1);
            QP.SaveToFile(s);
        }


What is your recommendation for splitting a PDf with multiple pages to single page PDFs?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store