How do I deal with 'DPI parameter is too large' when converting PDF to Image?
117 views
Skip to first unread message
Support
unread,
Jul 28, 2011, 3:28:53 PM7/28/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PDFTron PDFNet SDK
Q: I am using 'pdftron.PDF.PDFDraw' to convert to PDF to bitmaps.
On one file I get the following error:
> Exception Message: DPI parameter is too large. Consider using tiled rasterizer instead.
from pdftron.PDF.PDFDraw.GetBitmap(page As Page)
Any idea what is wrong?
-----------------------
A: The problem here is that you are running out of memory (most likely
because the physical dimensions of the page are large - i.e.
page.GetMediaBox()). You could go around it either by:
a) Using pdfdraw.SetImageSize(...) instead of pdfdraw.SetDPI(...).
b) Decreasing the DPI (in pdfdraw.SetDPI()).
c) Using 64-bit version of PDFNet, which does not have 2GB RAM
restriction of a 32-bit processes.
d) Rendering the large page in stripes, instead of in the single shot.