Print Page | Close Window

Out of memory error - Converting PDF into images

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3427
Printed Date: 30 Apr 24 at 2:40PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Out of memory error - Converting PDF into images
Posted By: sebC
Subject: Out of memory error - Converting PDF into images
Date Posted: 27 Dec 16 at 3:18PM
Hello,

I am trying to convert multiple PDF files into images.

After a certain number of convertions, i constantly got "Out of memory" errors.

I convert my PDF like this  : 

UnicodeString cible = repDiapo + "Diapositive.jpg";
PDFLibrary->LoadFromFile(filename.c_str(), L"");
int nbPages = PDFLibrary->PageCount();
PDFLibrary->RenderDocumentToFile(300, 1, nbPages, 1, cible.c_str());

Do you have any idea how I could avoid this kind of errors ? 

Thanks.
Bye.




Replies:
Posted By: Ingo
Date Posted: 28 Dec 16 at 11:19AM
Hi Seb,

it depends on what's behind the original pdf.
How many pages... what dimensions?
Regarding this 300 dpi can be too much?
What you can see looking into the task manager while running the function (how much ram needed)?
Perhaps it's better to split this job into parts (keep the actual pagenumber in mind... then a Free... then a new instance)?
I would prefer another idea: Using the DA-functions!

Completely a different way:
What you really wanna do?
Rendering any pdf-pages with text, small pictures and so on?
Or do you want to render images which were inserted into pdf as single pages?
If this is what you want then you can export these images with the original dimensions from pdf page by page without much ram needed.
If this is what you want you should read here:
http://www.debenu.com/docs/pdf_library_reference/ImageHandling.php

Cheers and welcome here,
Ingo



-------------
Cheers,
Ingo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk