[cairo-bugs] [Bug 23170] It's better to add an option to generate uncompressed content for PDF.
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Sep 21 17:46:55 PDT 2009
http://bugs.freedesktop.org/show_bug.cgi?id=23170
--- Comment #3 from Lance <lliu at microstrategy.com> 2009-09-21 17:46:53 PST ---
(In reply to comment #2)
> > (In reply to comment #0)
> > In cairo-pdf-surface.c, I found more hard coded code for "compressed"
> > parameter, such as Line 1386, 1496, 1504, 1755, 3012, 3181, 3336. I suggest
> > replacing these hard coded "TRUE" or "FALSE" by an internal variable.
> The "hard coded" booleans are for binary data such as images and fonts. I only
> made the compress_content variable control the compression of the human
> readable parts (ie the content stream) for debugging purposes. I was not aware
> of any PDF consumers that can not handle any compression.
> > Then we
> > can add one public API to set this internal variable. The new API may looks
> > like follows.
> > cairo_public void
> > cairo_surface_set_PDF_compressed (cairo_surface_t *surface, bool compressed);
> There is a lot of resistance to adding APIs for controlling the non graphics
> related capabilities of backends. See for example this thread:
> http://lists.freedesktop.org/archives/cairo/2006-September/007956.html
> The current proposals/ideas for solving this are:
> - Provide a CAIRO_DEBUG environment variable that can be used for controlling
> debugging options such as compression, fallback images and printing backtraces.
> http://lists.freedesktop.org/archives/cairo/2008-April/013797.html
> http://lists.freedesktop.org/archives/cairo/2008-May/014059.html
> I'm not sure what the current status of this is.
> - Providing a generic PDF API for inserting objects and/or obtaining only the
> content stream. An external library will use this API to provide control over
> all the non graphics related parts of the PDF specification such as hyperlinks,
> encryption, compression etc.
> This is something I'm slowly working on.
> > Since our application needs uncompressed PDF output, it would be appreciated if
> > the API above can be added to later versions of cairo.
> Another option is to use pdftk to uncompress the PDF.
Thank you for your comments. Actually, our application needs to combine
multiple pages of cairo PDF output into one PDF document. And also add some new
content into this PDF document. We know that we can uncompress cairo PDF output
in our application. But that will not give the best possible performance. So it
would be nice if there's some way to get completely uncompressed cairo PDF
output directly.
Thanks,
Lance
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the cairo-bugs
mailing list