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 > General Discussion
  New Posts New Posts RSS Feed - DrawCapturedPage - How many times?
  FAQ FAQ  Forum Search   Register Register  Login Login

DrawCapturedPage - How many times?

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


Joined: 24 May 12
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Proset Quote  Post ReplyReply Direct Link To This Post Topic: DrawCapturedPage - How many times?
    Posted: 24 May 12 at 3:33PM
Hi
I'm want to CapturePage - once, then draw captured page(by ID) onto other pages. The code looks like this:
... some code...
CaptureID=qp.CapturePage(PageNo);

.... some code...

result= qp.DrawCapturedPage(CaptureID, 0, new_h, new_w, new_h);

....some code ...
qp.NewPage();
result= qp.DrawCapturedPage(CaptureID, 0, new_h, new_w, new_h);

All works ok Captured page is drawn on all pages. But when I'm call

qp.DeletePages(CurrentFilePagePointer,1) - for example

DrawCapturedPage with used CAptureID don't work anymore - despite of result is ok( ==1) but no content is drawn on page.
But if I'm use any "unused" CaptureID - for other captured page that page is drawn ok. So it's looks like qp.DeletePages destroy used capturedpage?

How I'm can workaround this odds feature? Now I'm forced to create a document with doubled amount of pages, capture all pages and use "unused" captureID when I'm need to.
But this method lead to very heave memory consumption and not affordable for some large files.

Any ideas?

I'm trying this on Q813-Q815 no mean. I'm use ActiveX version on C#








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: 28 May 12 at 6:21AM

I haven't had a chance to look at the code but I am guessing for optimisation purposes that captured pages are stored in the page tree and by calling DeletePages it reorganises the pages in this tree and invalidates the CapturePageID.  

1 option is to only call DeletePages at the end of your processing.  Another option is to split the document into smaller 1 or 2 page documents and process them later.  You can always recapture the page when required.

We would need to know more about your files and what you are trying to do.

Memory is cheap.  Using the 64bit version might make life easier for you as well.
Back to Top
Proset View Drop Down
Beginner
Beginner


Joined: 24 May 12
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Proset Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 12 at 7:41AM

Back to Top
Proset View Drop Down
Beginner
Beginner


Joined: 24 May 12
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Proset Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 12 at 8:06AM
Thank you I'm see that behavour is a library feature.
The code do something for imposition, some additional elements created from content that have been drawn on newpage, then rendering to images, but after I'm should to delete this page to create right one.
So in my mind library should'nt delete or invalidate captureId while document in memory. The qp.Newpage function dont destroy or invalidate CaptureId for example.

But about memory
I'm working with files with size about 20-30Mb to 180-300Mb or more. Software do the imposition of many files. When I'm load file the code eat memory as specified in manual, thats ok. But when I'm remove document from memory(qp.RemoveDocument), computer memory don't releases. After some 100Mb files the computer have no memory.

How to cope with this problem?


 
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