Loading...

PdfRasterizerRenderingPageError on PdfReaderRenderPageToGdPi

Discussions about image processing in GdPicture.NET using GdPictureImaging.

PdfRasterizerRenderingPageError on PdfReaderRenderPageToGdPi

Postby TimB » Wed Apr 13, 2011 4:26 pm

Hi,

I've done some tests in converting a bigger PDF file into separated GDPicture image pages, to finally process each page separately, and store it again as one file.
When I use DPI 300, it's giving me a PdfRasterizerRenderingPageError status after the function 'PdfReaderRenderPageToGdPi ' on page 47 (from total 55 pages).
When I set the DPI to 600 it's already giving me this error on the 8th page. And using 100 DPI it's processed fine.

Looking to my tests, I think it's a memory related problem.
Loading a , even bigger, tiff image into an array of GDPicture images it's working fine. (I know you can't compare these 2 functions as PDF has to be rendered)
I've noticed it's using 1,6Gb of memory at the point it fails. I've 8Gb installed, so no limitation of my system I guess.

I'm using v7.4.0.3 on Win7-64bit

What can I do?
Thanks!
TimB
 
Posts: 8
Joined: Tue Dec 28, 2010 11:05 pm

Re: PdfRasterizerRenderingPageError on PdfReaderRenderPageTo

Postby Loïc » Thu Apr 14, 2011 2:21 pm

Hi,

I suppose you are running to an out of memory problem because you don't release unused resources.

If you provide a code snippet i will probably able to investigate.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: PdfRasterizerRenderingPageError on PdfReaderRenderPageTo

Postby TimB » Thu Apr 14, 2011 3:53 pm

Loïc wrote:Hi,

I suppose you are running to an out of memory problem because you don't release unused resources.

If you provide a code snippet i will probably able to investigate.

Kind regards,

Loïc


Hi Loïc,

Hereby my snippet:

Code: Select all
this.originalImageId = this.GDImaging.PdfReaderLoadFromFile(imagefile);

GdPictureStatus _gdStatus = GDImaging.GetStat();
if (_gdStatus == GdPictureStatus.OK)
{
   this.pagecount = this.GDImaging.PdfReaderGetPageCount(this.originalImageId);

   for (int pagenr = 1; pagenr <= this.pagecount; pagenr++)
   {
      this.GDImaging.PdfReaderSelectPage(this.originalImageId, pagenr);
      int _image = this.GDImaging.PdfReaderRenderPageToGdPictureImage(this.originalImageId, 300, true);
      
      if (GDImaging.GetStat() == GdPictureStatus.OK)
         this.documentPages.Add(_image);
      else
      {
         _result = false;
         break;
      }
   }
}


I can't release the pages after I've loaded them, because there are some processings to do on the pages after the loading.
Of course at the end I'm releasing them, but between my load and unload there are some processings, like barcode scanning and OCR.

Thanks for looking at it!!
TimB
 
Posts: 8
Joined: Tue Dec 28, 2010 11:05 pm

Re: PdfRasterizerRenderingPageError on PdfReaderRenderPageTo

Postby ccmb » Wed Apr 20, 2011 9:56 am

I think because of using the PDFReader Namespace i assume your program runs in 32bit mode, so the maximum adressable memory of the process is 2gb. Can you approve this Loic?

Question to Loic: When will the 64bit PDF Plugin be available?
ccmb
 
Posts: 1
Joined: Wed Apr 20, 2011 9:50 am


Return to Image Processing

Who is online

Users browsing this forum: No registered users and 0 guests

cron