Print Page | Close Window

SelectPage Method fails

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=988
Printed Date: 25 Jun 25 at 5:49PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: SelectPage Method fails
Posted By: Eddy
Subject: SelectPage Method fails
Date Posted: 17 Nov 08 at 6:55AM
Hi every body,
I've got a so strange issue I can't solve myself.
I've got a pdf file, containing 4 pages. When I open it with Acrobat reader or Foxit reader, there is no problem.
But when I try to do:
oPdf.SelectPage 4, an error appears, telling me that there is an error, with no explanation (error -2147418113 (8000ffff)).
Anybody can explain me what's wrong ?
Note that this error occurs only with few pdf files, every time on the last page...
Thanks in advance
Eddy

--------------------------
I've partially solved the problem. It appears that my pdf was not perfect. There was a conflict of font. However, what is strange is that I was able to open the pdf with a reader, without any error or warning message...



Replies:
Posted By: Ingo
Date Posted: 17 Nov 08 at 12:26PM
Hi Eddy,
 
first of all:
What version do you use?
With key or without?
The adobe reader installation is about 100 mb - and QuickPDF?
The adobe reader can manage faulty documents with a lot of dll-stuff instead of the smaller QuickPDF.
A repairing run through/with PDFTK can help before using QuickPDF.
 
Try something similar to this one:
 
         QP := TiSEDQuickPDF.Create;
         try
            QP.UnlockKey('mypersonalkey');
            QP.LoadFromFile(fneu);
            If ( QP.Encrypted > 0 ) Then
               QP.Unencrypt;
            x    := QP.PageCount;
            For i := 1 to x Do
                begin
                   QP.SelectPage(i);
 
// and so on ...
 
Best regards and welcome here,
Ingo

 


Posted By: Eddy
Date Posted: 18 Nov 08 at 8:04AM
Thank you for your response, Ingo, I will try what you propose, to unencrypt before selecting the page.
Indeed, I have not been precise enough in my question.
I work in VB6, with quickpdf version 5.22.0.119 (dll version number).
 
I don't understand the question With key or not ? Do you mean the unlockkey ? If yes, I have one.
 
I will give you more details after testing Ingo's proposition...
Bye and thank you again.
 
 


Posted By: Eddy
Date Posted: 19 Nov 08 at 4:51AM
Hello again,
Well, I've tried your proposition, Ingo, but the pdf document in error is not encrypted, so, there is no change at all.
However, I've noticed that the "wrong" pdf files contain a font (ARIAL), which size is 367112 !!! I don't know how the pdf is generated : it cames from OpenOffice or Ms office, I suppose. Is it possible to modify or delete an embbeded font ?
Thank you in advance for your reponses.


Posted By: DELBEKE
Date Posted: 19 Nov 08 at 5:16AM
Can you upload the file somewhere to have a try ?


Posted By: Eddy
Date Posted: 19 Nov 08 at 5:53AM
The pdf file is available at : http://dl.free.fr/jOOTHixRC - http://dl.free.fr/jOOTHixRC
It's a French site, just click on "Télécharger ce fichier" to download it.
Thank you


Posted By: DELBEKE
Date Posted: 19 Nov 08 at 6:02AM
Good news, the next version of the library open the pdf without any problem. Just be patient a little. It's comming soon
 
 


Posted By: Eddy
Date Posted: 19 Nov 08 at 7:35AM
I can also open the documentwith my version of quickpdf. The problem is I can not do a SelectPage on the last page of the document. Could you verify that point ?
Do you know when the new version will be available ?
Eddy


Posted By: Ingo
Date Posted: 24 Nov 08 at 3:44PM
Hi Eddy,
 
i've tested it with your doc.pdf this moment and it works. Page 16 could be selected. You can make a clear preview (RenderDocumentToFile) from each page and you can initiate textextraction from each page. The current (still not published) version won't have any problems with your document.
 
I think it's still a matter of weeks publishing the new version.
 
Best regards,
Ingo 


Posted By: Fred
Date Posted: 18 Apr 09 at 5:39PM
I'm using the latest version of QuickPdf and I've got the same issue:
In fact, on a 1 page doc, SelectPage(0) works but SelectPage(1) doesn't.
Looks like page count is a 0 based counter...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk