InsertPagesFromDoc Issue

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Paul - Tracker Supp, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
jeffp
User
Posts: 866
Joined: Wed Sep 30, 2009 6:53 pm

InsertPagesFromDoc Issue

Post by jeffp » Tue Sep 15, 2020 8:26 pm

I'm having an issue with inserting lots of files/pages into a document. I have one example where I'm inserting over 1,500 one page PDF files into a new PDF using InsertPagesFromDoc. It seems the inserting so many pages is causing the memory to climb so high that it crashes my program.

Is there a call I can make after every 200 files or so that will compact or reduce the memory usage? I found a work around if I close the file and reopen it, and proceed with inserting more files. I do this every 200 files or do and it seems to get rid of the bloat in memory.

Sometimes it's not convenience to save and reopen so I was wondering if there was another call I can make while the file is still open and receiving inserted pages that would do the same thing as a save, close and reopen does?

Thanks.

--Jeff

User avatar
Sasha - Tracker Dev Team
User
Posts: 5037
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: InsertPagesFromDoc Issue

Post by Sasha - Tracker Dev Team » Wed Sep 16, 2020 12:04 pm

Hello jeffp,

Well if you want precise memory control then the best language for it would be C++.
In your case there a two thing that you can do:
1) Divide the insertion process into portions (for example 200 pages max).
2) Move to x64 and solve all of your problems.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

jeffp
User
Posts: 866
Joined: Wed Sep 30, 2009 6:53 pm

Re: InsertPagesFromDoc Issue

Post by jeffp » Thu Sep 17, 2020 10:35 pm

Again, as a workaround, I can save out to temp after combining so many files, but when combining one file with say 2000 pages, we often get the memory crash as well.

The funny thing about this is it wasn't happening just a few builds ago. Seems to be something that has crept in just recently.

We'll try it again on the next build.

--Jeff

User avatar
Sasha - Tracker Dev Team
User
Posts: 5037
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: InsertPagesFromDoc Issue

Post by Sasha - Tracker Dev Team » Fri Sep 18, 2020 8:47 am

Hello jeffp,

The V9 should be out soon - maybe it will fix the problem you mentioned.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

jeffp
User
Posts: 866
Joined: Wed Sep 30, 2009 6:53 pm

Re: InsertPagesFromDoc Issue

Post by jeffp » Fri Sep 18, 2020 12:57 pm

When do you expect V9 and what are the major changes going to be?

Post Reply