PDFOne .NET
Powerful all-in-one PDF library for .NET
Compatibility
VS 2005/2008/2010/2012/2013

PDF File Size Optimization With PDFOne .NET (Part 2)

Learn how to optimize PDF file size by specifying CCITT3 compression for monochrome images.
By Raju Sinha

Last month, we saw how PDFOne .NET optimized PDF document size on its own. This month, we will see how you can further optimize PDF file size by using some advanced functions provided by PDFOne .NET.

If your PDF files contain a lot of monochrome images, say scanned copies of paper documents, then you could store the images in CCITT3 format rather than in BMP or JPEG.

CCITT3 image compression format is optimized for monochrome images. File size of PDF documents with CCITT3 images are a lot less than that of documents with BMP or JPEG images.

To illustrate this, I used a black and white (B&W) image test.jpg (shown below) and created two PDF documents.

The first document was created without any specified compression for the B&W image. (The image was already compressed JPEG.) For the second document, CCITT3 compression was explicitly specified.

Dim doc1 As New PDFDocument
doc1.DrawImage("c:\test.jpg", 1, 1) 
doc1.OpenAfterCreate = True
doc1.Save("c:\jpeg_image_compression_doc.pdf")
doc1.Close()

Dim doc2 As New PDFDocument
doc2.DrawImage("c:\test.jpg", 1, 1, _
               PDFImageCompressionFormat.CCITT3) 
doc2.OpenAfterCreate = True
doc2.Save("c:\ccitt3_image_compression_doc.pdf")
doc2.Close()

The image test.jpg was 29 KB and so the first document was 31 KB. With CCITT3 compression, the PDF file became 7 KB - nearly 75% reduction in file size!

---o0O0o---

Downloads:

---o0O0o---

Our .NET Developer Tools
XtremeDocumentStudio .NET

Multi-format document-processing component suite for .NET developers.

PDFOne .NET

A .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications.

Our Delphi/C++Builder developer tools
XtremeDocumentStudio Delphi

Multi-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms.

eDocEngine VCL

A Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools.

PDFtoolkit VCL

A Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents.

Our Java developer tools
XtremeDocumentStudio (for Java)

Multi-format document-processing component suite for Java developers.

PDFOne (for Java)

A Java PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java applications.

Our Platform-Agnostic Cloud and On-Premises APIs
StarDocs

Cloud-hosted and On-Premises REST-based document-processing and document-viewing APIs

Privacy | Legal | Feedback | Newsletter | Blog | Resellers © 2002-2017 Gnostice Information Technologies Private Limited. All rights reserved.