Skia PDF- pdf file size is large.

674 views
Skip to first unread message

bj

unread,
Aug 12, 2014, 12:09:24 AM8/12/14
to skia-d...@googlegroups.com
I used skia pdf libarary.

The PDF file size is large and I have analyzed the file.
This is pdf tags.
============================
<<Type /XObject
/Subtype /Image
/Width 1696
/Height 1583
/colorSpace /DeivceGray
/BitsPerComponent 8
/Length 2684768  
>> stream
============================
/Length 2684768  -> largeSize.
The image need to compress the image.

Is this a feature?





Mike Reed

unread,
Aug 12, 2014, 9:29:11 AM8/12/14
to skia-d...@googlegroups.com, Hal Canary
Seems like we should compress the image. Can you describe or provide code that shows how you created this?


--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.

Hal Canary

unread,
Aug 12, 2014, 9:42:14 AM8/12/14
to skia-d...@googlegroups.com
This is a feature in the sense that the Skia library can be compiled with or without the zlib compression library.  By default on Windows, we do not  use zlib.

I plan on requiring zlib on all platforms so that our PDF output will be more uniform.

Note that our main Windows customer, Chromium, uses zlib on windows.

On Tue, Aug 12, 2014 at 12:09 AM, bj <h2o...@gmail.com> wrote:
I used skia pdf libarary.

The PDF file size is large and I have analyzed the file.

Mike Reed

unread,
Aug 12, 2014, 9:47:29 AM8/12/14
to skia-d...@googlegroups.com
Is it easy to document how this client can opt-in to use zlib, so he gets compression?


--

van...@chromium.org

unread,
Aug 12, 2014, 10:52:49 AM8/12/14
to skia-d...@googlegroups.com
See SK_ZLIB_INCLUDE in include/config/SkUserConfig.h

Hal Canary

unread,
Aug 15, 2014, 10:29:39 AM8/15/14
to skia-d...@googlegroups.com
I didn't figure out how to compile zlib for static linking on Windows, but I do have a CL that provides an alternate implementation of the Deflate algorithm via the Miniz library:

http://crrev.com/469813002

I'm putting this on hold for now since it does not produce identical compression as zlib.  If the original poster wants to use Skia to produce PDFs on Windows, he can use that patch.
Reply all
Reply to author
Forward
0 new messages