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!
Exception message while rendering |
Post Reply |
Author | |
bernr
Beginner Joined: 13 Aug 09 Status: Offline Points: 13 |
Post Options
Thanks(0)
Posted: 16 Aug 09 at 2:28PM |
Hello,
I seem to be having another problem rendering a PDF. When I try to render the pdf located at http://www.exitcare.com/downloads/PDFs/01MVC.pdf using the following code procedure TForm1.RenderPDF(asFileName: string; aiPageNumber: integer); var PDF_File: TQuickPDF0715; iDPI: Integer; iRenderType: integer; PDF_stream: Tmemorystream; begin iDPI := 75; iRenderType := 5; PDF_File := TQuickPDF0715.Create; try PDF_stream := Tmemorystream.create; try PDF_File.UnlockKey('INSERT_LICENSE_KEY_HERE'); PDF_File.LoadFromFile(asFileName); PDF_File.RenderPageToStream(iDPI, aiPageNumber, iRenderType, PDF_stream); finally PDF_File.Free; end; PDF_stream.Seek(0, 0); imageEn.IO.LoadFromStream(PDF_stream); finally freeandnil(PDF_File); end; end; I receive the following Exception message when doing the RenderPageToStream: Project qpdftest.exe raised exception class Exception with message ''. This PDF loads find in Adobe, and if I ignore the Exception message the PDF will render (although slower then expected). This all done using QPDF 7.15 Thanks Bern Edited by Rowan - 17 Aug 09 at 6:20AM |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
Have a try with iRenderType 0 or 1 ... The same result? All functions deliver a returning value to show if it's all okay or not. What are the values? A short time ago i've posted a sample here ... try it and compare with your code. Cheers, Ingo |
|
bernr
Beginner Joined: 13 Aug 09 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
After I either continue past all the errors, our tell it to ignore the error, the return code is a 1 and it renders the PDF. Happes with all IRenterTypes.
RenderToString and RenderToFile also gives the same error message, I have not tried RenderToDC or RenderToVariant. If you are talking about the sample code you had in my other post on how you render, I tried it and got the same error on the RenderToStream line. Thanks Bern. |
|
bernr
Beginner Joined: 13 Aug 09 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
Any Thoughts?
|
|
Rowan
Moderator Group Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
|
Hi Bern,
I've tested the PDF with both your code and Ingo's code and I have encountered the same problem. The problem as you know is specific to this one PDF. We'll examine the PDF to see what aspect of it the library is having trouble processing and try to provide a fix as soon as possible. Cheers, - Rowan.
|
|
bernr
Beginner Joined: 13 Aug 09 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
Actually it is not just this one PDF, I have about 50 it happens with.
|
|
Rowan
Moderator Group Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
|
Do the 01HDINJ.pdf and 02EYE.pdf documents render OK on your end using this function?
If you're experiencing the same problem with 50 odd documents then I presume that these documents are all coming from the same producer? I noticed that the 01MVC.pdf document came from Neevia docuPrinter, is that true for the other documents as well? I can arrange an FTP dropbox if you would like to send us all 50 files and we can run tests on them to see if there is a problem that is common in all of them. I've sent you an email from our support system, so when you reply to that I can send you the FTP dropbox details. Cheers, - Rowan.
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
Jean-Luc tried it with the last QuickPDF-version but RenderToPage and it works. He'll try tomorrow RenderPageToStream, too... and we'll see. Cheers, Ingo |
|
bernr
Beginner Joined: 13 Aug 09 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
No the 01HDINJ.pdf and 02EYE.pdf documents do not give the error, they just have the other rendering issue.
And yes all documents are coming from Docuprinter (this was our temp work around until the rendering problem I reported was fixed), but not all documents from Docuprinter give the error, we have quite a few that were produced with Docuprinter that do not. |
|
bernr
Beginner Joined: 13 Aug 09 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
Ingo, when you are testing, are you testing from the IDE or from the compiled exe? Because I have noticed the problem from within the IDE
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
"...
I have noticed the problem from within the IDE ..." So it's not a QuickPDF-prob but a settings-prob of your IDE? A new option to be checked. Cheers, Ingo |
|
DELBEKE
Debenu Quick PDF Library Expert Joined: 31 Oct 05 Location: France Status: Offline Points: 151 |
Post Options
Thanks(0)
|
Hi bern
My test was done from the exe and the ide, and i have not found any problem with rendering with RenderPage. (I use VB6 and the activeX version)
Cheers, Jean-Luc
|
|
bernr
Beginner Joined: 13 Aug 09 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
as I have said I am using RenderPageToStream and running from the EXE I do not get the error, only when running from the IDE (on one machine). My concern here is that with it having so many errors (I have clicked in the IDE to continue past like 10 errors before I gave up) that it is slowing down the rendering, or not rendering correctly parts of the PDF.
And I doubt Ingo that the statement "it's not a QuickPDF-prob but a settings-prob of your IDE?" is correct, since Rowan was also able to reproduce the same thing. |
|
marian_pascalau
Debenu Quick PDF Library Expert Joined: 28 Mar 06 Location: Germany Status: Offline Points: 278 |
Post Options
Thanks(0)
|
Hi there,
this looks lile an exception inside debugger. When program is running inside a debugger, all exceptions are cached by your Debugger but still handled by the running program. A debugger my say that an error is thrown and this may not be always an error !!!
Because the exception is handled correctly it means that the exe is working. Just ignore this problem. If your program is working then everything is ok. If something is missing (in output) there is a possible bug inside your library and somebody must investigate on the original SourceCode.
Hope this helps :-) ....
|
|
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