Reputation: 4329
So, I have a need to export large-format paper sizes (33 x 44 inches) at up to 300 DPI from my web app as PDF. I'm currently handling 8.5 x 11 and 11 x 17 sheets just fine using PDFSharp. These pages contain mostly image data, minus some margins and a small amount of text; i.e. not much is vector inside this PDF page.
The problem I'm encountering for the large formats is this: a 33 x 44 inch sheet at 300 DPI with a bit depth of 32 bits per pixel is 522,720,000 bytes - almost half a gigabyte. I can't have this kind of memory consumption in my web app.
Is there any possible way that I can render the PDF in tiles or chunks to avoid needing to have this entire block in memory at one time? Is there any functionality in PDFSharp that can help me here?
Upvotes: 1
Views: 1220
Reputation: 21729
PDFsharp was designed to keep everything in memory, so the PDF file can finally be written very fast. Currently (and in the foreseeable future) there is no way to handle image data that does not fit into memory.
Upvotes: 1