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 - Error on CapturePageEx
  FAQ FAQ  Forum Search   Register Register  Login Login

Error on CapturePageEx

 Post Reply Post Reply
Author
Message
ExEE View Drop Down
Beginner
Beginner
Avatar

Joined: 10 Nov 05
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote ExEE Quote  Post ReplyReply Direct Link To This Post Topic: Error on CapturePageEx
    Posted: 10 Nov 05 at 11:30PM

Hello.  I'm using QuickPDF 5.11 on VB6 and am cropping a one-page document and imposing it onto a second document of the same size as the crop.  But for some reason, the CapturePageEx command generates an overflow error.  Here is my code.  Any ideas? 
--------------------------------------------------------------
    Dim DocID, CrpID, CapID As Integer
    Dim w, h, wCr, hCr As Integer
   
    Set QP = New iSED.QuickPDF
    QP.UnlockKey "<key>"
   
    QP.LoadFromFile "C:\WINDOWS\Desktop\Giraffe.pdf"
    DocID = QP.SelectedDocument
    QP.SelectPage 1
    QP.SetMeasurementUnits 2
    QP.SetOrigin 1
    w = QP.PageWidth
    h = QP.PageHeight
    wCr = w / 2
    hCr = h / 2
    QP.SetCropBox w / 4, h / 4, wCr, hCr
   
    QP.NewDocument
    CrpID = QP.SelectedDocument     'Target document of imposition
    QP.SelectPage 1
    QP.SetMeasurementUnits 2
    QP.SetOrigin 1
    QP.SetPageDimensions wCr, hCr
    QP.MergeDocument DocID
                                    '<--- Verified Pg Count = 2 and SelectedPage = 1
    CapID = QP.CapturePageEx(2, 1)  '<--- Overflow Error 
    QP.SelectPage 1
    QP.DrawCapturedPage CapID, w / 4, h / 4, wCr, hCr
   
    QP.SaveToFile "C:\WINDOWS\Desktop\Cropped.pdf"
   
    QP = Nothing

Back to Top
PhilG View Drop Down
Beginner
Beginner
Avatar

Joined: 02 Nov 05
Location: United States
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote PhilG Quote  Post ReplyReply Direct Link To This Post Posted: 11 Nov 05 at 5:54PM
I'm still not sure why this error happens, but I found that it goes away if I save and reload the document before CapturePageEx.  I shouldn't have to do that, though. 

Edited by PhilG
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 13 Nov 05 at 3:01PM
Originally posted by PhilG PhilG wrote:

I'm still not sure why this error happens, but I found that it goes away if I save and reload the document


Hi!
I've made the same experiences. Save and reload and few errors will dissapear... Not a solution but a workaround ;-)
Seems that sometimes the temporary created pdf looks inside a bit different as a saved file.


Edited by Ingo
Cheers,
Ingo

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