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 - Range Check Error when using RenderPageToDC
  FAQ FAQ  Forum Search   Register Register  Login Login

Range Check Error when using RenderPageToDC

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


Joined: 08 Sep 10
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jason Quote  Post ReplyReply Direct Link To This Post Topic: Range Check Error when using RenderPageToDC
    Posted: 09 Sep 10 at 8:28PM

I am receiving a "Range Check Error" when using the RenderPageToDC function.  I am using Delphi 2007.  The issue first manifested itself to me with QuickPDF library version 7.19 but is also a problem with version 7.21.

It occurs when I try to render pages from a multipage document as well as with single page documents.  When rendering multipage documents, the range check error doesn't always occur on the same page. 
 
Any suggestions would be great.  Here is my code.
 
procedure TfrmPDFManager.GetPDFPreview(PDFFileName : String; DPI, PageNo : Integer);
var
   PDFLibrary : TQuickPDF0721;
   UnlockResult : Integer;
begin
Screen.Cursor := crHourglass;
Image1.Picture := nil;
PDFLibrary := TQuickPDF0721.Create;
try
 UnlockResult := PDFLibrary.UnlockKey(QUICKPDFLICENSEKEY);
 if UnlockResult = 1 then
    begin
    PDFLibrary.LoadFromFile(PDFFileName);
    Image1.Picture.Bitmap.Width := Round(PDFLibrary.PageWidth);
    Image1.Picture.Bitmap.Height := Round(PDFLibrary.PageHeight);
    PDFLibrary.SetOrigin(1); //--> Added this line to try to solve Range Check Error, no change.
    PDFLibrary.RenderPageToDC(DPI, PageNo, Image1.Canvas.Handle); //-->Range Check Error here
    PDFPAGES := PDFLibrary.PageCount;
    end;
 finally
 PDFLibrary.Free;
 end;
Image1.Repaint;
Screen.Cursor := crDefault;
end;
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: 20 Oct 10 at 2:28PM
Hi Jason,

Would you be able to upload a sample document somewhere for us to download and also let us know what DPI you're rendering at?

I'd also recommend trying 7.22 beta 2 to see if you experience this issue:


Cheers,
- Rowan.
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