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!
DrawCapturedPage - How many times? |
Post Reply |
Author | |
Proset
Beginner Joined: 24 May 12 Status: Offline Points: 7 |
Post Options
Thanks(0)
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# |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
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.
|
|
Proset
Beginner Joined: 24 May 12 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
|
|
Proset
Beginner Joined: 24 May 12 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
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? |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store