Print Page | Close Window

Access violation with CopyPageRanges in Delphi XE2

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=2313
Printed Date: 04 May 24 at 10:56PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Access violation with CopyPageRanges in Delphi XE2
Posted By: Wolfgang Denz
Subject: Access violation with CopyPageRanges in Delphi XE2
Date Posted: 22 Jun 12 at 8:26AM
Hi all,
 
when executing the following code in Delphi XE2 I get an access violation:
 
    AktPDF := PDFLibrary.SelectedDocument;  //default 1-page Doc
    if not PDFLibrary.LoadFromFile(ExtractFilePath(Application.ExeName)+'\Org.pdf','') = 1 then halt(0);
    orgPDF := PDFLibrary.SelectedDocument;
    PDFLibrary.SelectDocument(aktPDF);
    PDFLibrary.CopyPageRanges(orgPDF,'1');  // -> access violation when copying first page of loadad pdf
 
I'm really stuck at the moment
Can anyone give me a hint where my problem is?
 
Thanks
Wolfgang Confused



Replies:
Posted By: Ingo
Date Posted: 22 Jun 12 at 12:21PM
Hi Wolfgang!

What's before the line with "AktPDF"?
Is there an additional LoadFromFile?
If not that's the prob.

Cheers and welcome here,
Ingo



Posted By: Wolfgang Denz
Date Posted: 22 Jun 12 at 12:26PM
Hello Ingo,
 
no the AktPDF should point to the initial Document when creating the QPDFLib.
The error also occurs if I change the fist line to
  AktPDF := PDFLibrary.NewDocument;
 
Regards
Wolfgang


Posted By: Ingo
Date Posted: 22 Jun 12 at 12:32PM
you should check the value in "AktPDF".



Posted By: Wolfgang Denz
Date Posted: 22 Jun 12 at 1:27PM
Hello Ingo,

AktPDF and orgPDF both seem to be a valid DocID.
orgPDF is one digit hiher than AktPDF, so this seems to be OK for me.

Wolfgang


Posted By: AndrewC
Date Posted: 23 Jun 12 at 8:48AM
The PDF file is most likely maformed or corrupted.  Acrobat often repairs many documents which are corrupted and so it is not always easy to see if a document is corrupt or not.

You may need to send the PDF's to the official support pages and we can check the file.

http://www.quickpdflibrary.com/support/support-query.php - http://www.quickpdflibrary.com/support/support-query.php

Andrew.



Posted By: Wolfgang Denz
Date Posted: 25 Jun 12 at 6:47AM
As the PDF is a confidential document, how can I send the file to you?
 
Regards
Wolfgang


Posted By: AndrewC
Date Posted: 25 Jun 12 at 8:23AM
If you create a support case using the link -  http://www.quickpdflibrary.com/support/support-query.php - http://www.quickpdflibrary.com/support/support-query.php  then you will be given a case number.  If you then reply to that email you can attach the file and it will only be accessible by the support staff at Debenu and will be treated as confiential.

Andrew.



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