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 - split pages out to new file - memory issue
  FAQ FAQ  Forum Search   Register Register  Login Login

split pages out to new file - memory issue

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


Joined: 24 Jan 12
Location: United Kingdom
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote hobnob Quote  Post ReplyReply Direct Link To This Post Topic: split pages out to new file - memory issue
    Posted: 23 Jul 12 at 9:58AM

I'm trying to load a large PDF file and split every page out to a new filename... but memory usage goes up and up and up for every new file until the machine crashes.

It appears it's the new output file created that causes this,   how do you release that new file from memory after save?

Here's a test to show the problem:-

int MainDocID = QP2->SelectedDocument();

for(int a=0;a<1000;a++)
{
QP2->NewDocument();
fileBW = QP2->SelectedDocument();

QP2->SelectDocument(fileBW);

QP2->CopyPageRanges(MainDocID, _L("1-1"));

QP2->DeletePages(1,1); // remove new file 1st blank page
QP2->SaveToFile(tempBW);
}


Back to Top
hobnob View Drop Down
Beginner
Beginner


Joined: 24 Jan 12
Location: United Kingdom
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote hobnob Quote  Post ReplyReply Direct Link To This Post Posted: 23 Jul 12 at 10:15AM
found the problem, needed: RemoveDocument
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