Hi,
I use Cairo to create PDF documents (see attached exemple). For the moment I create them assembling individual images. I do have a problem however with the maximum allowable sizes. I manage to create A0 documents with a 300 dpi resolution, but I don't manage to make them of higher quality(600 dpi). Does this mean I am hitting some physical limit within Cairo or elswhere ? Is it possible that the number of pages influences the memory limit ? Regards, @+Maarten, _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc =?UTF-8?Q?stakepoint_14_d=C3=A9cembre_2009=5F5.pdf?= (1M) Download Attachment |
A0 @ 600dpi * 32bpp is just over 1GB. The number of bytes is also out of the range of SmallInteger (about 0.5 gig). I don't know if either of those are relevant.
Interesting that you're using a big image rather than vector graphics. Is that because VW and/or Cairo is inaccurate rendering vector graphics, or to ensure pixel-identical display in print and on screen? Vectors would of course be much smaller, and so avoid memory limits. Steve > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On > Behalf Of Maarten MOSTERT > Sent: 14 December 2009 15:10 > To: VWNC > Subject: [vwnc] PDF limit > > Hi, > > I use Cairo to create PDF documents (see attached exemple). > For the moment I create them assembling individual images. > I do have a problem however with the maximum allowable sizes. > > I manage to create A0 documents with a 300 dpi resolution, but I don't > manage to make them of higher quality(600 dpi). > > Does this mean I am hitting some physical limit within Cairo or > elswhere ? Is it possible that the number of pages > influences the memory limit ? > > Regards, > > @+Maarten, _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi Steve,
Well the same example printed in A0 300 dpi takes a time to render but comes in at 1.4MB so some optimisation does seems to take place. Just to be clear I actually write to argb32 Cairo Image Surfaces. I then assemble the these into the PDF stream surface using them as a source. If I write imediately to the PDF surface, out of memory comes in very very early. Using the intermediate images is currently a workaround, and I am pretty sure that I am still doing something wrong. Writing the file is the last thing I do (see also Cairo's pdf surfce comment / example). If I could write the file incremently while painting on the pdf stream probably the situation woud improve. @+Maarten, ----- Original Message ----- From: "Steven Kelly" <[hidden email]> To: "VWNC" <[hidden email]> Sent: Monday, December 14, 2009 4:02 PM Subject: Re: [vwnc] PDF limit > > A0 @ 600dpi * 32bpp is just over 1GB. The number of bytes is also out of > the range of SmallInteger (about 0.5 gig). I don't know if either of those > are relevant. > > Interesting that you're using a big image rather than vector graphics. Is > that because VW and/or Cairo is inaccurate rendering vector graphics, or > to ensure pixel-identical display in print and on screen? Vectors would of > course be much smaller, and so avoid memory limits. > > Steve > >> -----Original Message----- >> From: [hidden email] [mailto:[hidden email]] On >> Behalf Of Maarten MOSTERT >> Sent: 14 December 2009 15:10 >> To: VWNC >> Subject: [vwnc] PDF limit >> >> Hi, >> >> I use Cairo to create PDF documents (see attached exemple). >> For the moment I create them assembling individual images. >> I do have a problem however with the maximum allowable sizes. >> >> I manage to create A0 documents with a 300 dpi resolution, but I don't >> manage to make them of higher quality(600 dpi). >> >> Does this mean I am hitting some physical limit within Cairo or >> elswhere ? Is it possible that the number of pages >> influences the memory limit ? >> >> Regards, >> >> @+Maarten, > > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Maarten MOSTERT schrieb:
> Hi Steve, > > Well the same example printed in A0 300 dpi takes a time to render but comes > in at 1.4MB so some optimisation does seems to take place. > Just to be clear I actually write to argb32 Cairo Image Surfaces. I then > assemble the these into the PDF stream surface using them as a source. > If I write imediately to the PDF surface, out of memory comes in very very > early. Using the intermediate images is currently a workaround, and I am > pretty sure that I am still doing something wrong. Writing the file is the > last thing I do (see also Cairo's pdf surfce comment / example). If I could > write the file incremently while painting on the pdf stream probably the > situation woud improve. As I am currently occupied with a project creating PDF: How about creating the PDF externally via fop (apache project) or might this not be suitable at all for your task? It would mean to create your images externally, generate an xml file in FO format and the asking the fo processor to render it into pdf. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Why not use Jasper Reports to handle the reporting completely... -Skrish On Tue, Dec 15, 2009 at 11:10 PM, Claus Kick <[hidden email]> wrote: Maarten MOSTERT schrieb: _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi Claus and Sudhakar,
Are you aware that both fop and Jasper Reports are
Java things ????
Notice that currently I made my pdf file
with simple subclassing my widgets modifying preferred bounds and changing
scale factors.
I am afraid that my problems mostly lie in me being
incapble of reading the C examples of the Cairo doc and maybe the implementation
of the initStream methd within the PDFStreamSurface. Even if I have some
problems it remains really cool to have a single API adressing all these
different formats.
@+Maarten,
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Maarten MOSTERT schrieb:
> Hi Claus and Sudhakar, > > Are you aware that both fop and Jasper Reports are Java things ???? > Notice that currently I made my pdf file with simple subclassing my widgets modifying preferred bounds and changing scale factors. > I am afraid that my problems mostly lie in me being incapble of reading the C examples of the Cairo doc and maybe the implementation of the initStream methd within the PDFStreamSurface. Even if I have some problems it remains really cool to have a single API adressing all these different formats. > Hello Maarten, yes, I am well aware of that fact. After your explanation however, I understand that it does not make sense to use an external tool. And yes, a single API for all formats is extremely cool! Cheers, Claus _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Notice that I just managed to create a document with over 1000 pages full
with images using pdf's standard 72 dpi resolution. That leaves some margin. ----- Original Message ----- From: "Claus Kick" <[hidden email]> To: "Maarten MOSTERT" <[hidden email]> Cc: "Sudhakar Krishnamachari" <[hidden email]>; "VWNC" <[hidden email]> Sent: Thursday, December 17, 2009 6:34 PM Subject: Re: [vwnc] PDF limit > > Maarten MOSTERT schrieb: >> Hi Claus and Sudhakar, >> >> Are you aware that both fop and Jasper Reports are Java things ???? >> Notice that currently I made my pdf file with simple subclassing my >> widgets modifying preferred bounds and changing scale factors. I am >> afraid that my problems mostly lie in me being incapble of reading the C >> examples of the Cairo doc and maybe the implementation of the initStream >> methd within the PDFStreamSurface. Even if I have some problems it >> remains really cool to have a single API adressing all these different >> formats. >> > Hello Maarten, > > yes, I am well aware of that fact. > After your explanation however, I understand that it does not make sense > to use an external tool. > > And yes, a single API for all formats is extremely cool! > > Cheers, > > Claus > > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Maarten MOSTERT wrote:
> Notice that I just managed to create a document with over 1000 pages full > with images using pdf's standard 72 dpi resolution. > That leaves some margin. Your original post had: > I manage to create A0 documents with a 300 dpi resolution, but I don't manage to make them of higher quality(600 dpi). So if we put these numbers together: - OKAY: 1000 pages at 72 dpi - OKAY: ? pages at 300 dpi - NOT OKAY: ? pages at 600 dpi Suppose 1000 pages at 72 dpi is the limit of your software/hardware. When scaled by the higher resolution, using the calculations: 1000 / ((300/72)**2) = 57.6 1000 / ((600/72)**2) = 14.4 You can only print 57 pages at 300 dpi, and only 14 pages at 600 dpi. The margin is not that big. -- Yanni _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |