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 - Access violation with CopyPageRanges in Delphi XE2
  FAQ FAQ  Forum Search   Register Register  Login Login

Access violation with CopyPageRanges in Delphi XE2

 Post Reply Post Reply
Author
Message
Wolfgang Denz View Drop Down
Beginner
Beginner


Joined: 22 Jun 12
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wolfgang Denz Quote  Post ReplyReply Direct Link To This Post Topic: Access violation with CopyPageRanges in Delphi XE2
    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
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: 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

Back to Top
Wolfgang Denz View Drop Down
Beginner
Beginner


Joined: 22 Jun 12
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wolfgang Denz Quote  Post ReplyReply Direct Link To This Post 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
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: 22 Jun 12 at 12:32PM
you should check the value in "AktPDF".

Back to Top
Wolfgang Denz View Drop Down
Beginner
Beginner


Joined: 22 Jun 12
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wolfgang Denz Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post 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.


Andrew.

Back to Top
Wolfgang Denz View Drop Down
Beginner
Beginner


Joined: 22 Jun 12
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wolfgang Denz Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jun 12 at 6:47AM
As the PDF is a confidential document, how can I send the file to you?
 
Regards
Wolfgang
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jun 12 at 8:23AM
If you create a support case using the link -  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.
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