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 - Exception message while rendering
  FAQ FAQ  Forum Search   Register Register  Login Login

Exception message while rendering

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


Joined: 13 Aug 09
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote bernr Quote  Post ReplyReply Direct Link To This Post Topic: Exception message while rendering
    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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 17 Aug 09 at 6:28AM
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

Back to Top
bernr View Drop Down
Beginner
Beginner


Joined: 13 Aug 09
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote bernr Quote  Post ReplyReply Direct Link To This Post Posted: 17 Aug 09 at 1:51PM
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.

Back to Top
bernr View Drop Down
Beginner
Beginner


Joined: 13 Aug 09
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote bernr Quote  Post ReplyReply Direct Link To This Post Posted: 18 Aug 09 at 8:08PM
Any Thoughts?
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 27 Aug 09 at 4:54AM
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.
Back to Top
bernr View Drop Down
Beginner
Beginner


Joined: 13 Aug 09
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote bernr Quote  Post ReplyReply Direct Link To This Post Posted: 27 Aug 09 at 5:04AM
Actually it is not just this one PDF, I have about 50 it happens with.
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 27 Aug 09 at 5:12AM
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.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Aug 09 at 7:15PM
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

Back to Top
bernr View Drop Down
Beginner
Beginner


Joined: 13 Aug 09
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote bernr Quote  Post ReplyReply Direct Link To This Post Posted: 27 Aug 09 at 10:32PM
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.
Back to Top
bernr View Drop Down
Beginner
Beginner


Joined: 13 Aug 09
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote bernr Quote  Post ReplyReply Direct Link To This Post Posted: 27 Aug 09 at 10:33PM
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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 28 Aug 09 at 6:05AM
"...
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

Back to Top
DELBEKE View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert
Avatar

Joined: 31 Oct 05
Location: France
Status: Offline
Points: 151
Post Options Post Options   Thanks (0) Thanks(0)   Quote DELBEKE Quote  Post ReplyReply Direct Link To This Post Posted: 28 Aug 09 at 6:33AM
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
Back to Top
bernr View Drop Down
Beginner
Beginner


Joined: 13 Aug 09
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote bernr Quote  Post ReplyReply Direct Link To This Post Posted: 28 Aug 09 at 12:49PM
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.

Back to Top
marian_pascalau View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 28 Mar 06
Location: Germany
Status: Offline
Points: 278
Post Options Post Options   Thanks (0) Thanks(0)   Quote marian_pascalau Quote  Post ReplyReply Direct Link To This Post Posted: 28 Aug 09 at 1:35PM
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 :-) ....
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