

- PDFCOMPRESS REVIEW HOW TO
- PDFCOMPRESS REVIEW PDF
- PDFCOMPRESS REVIEW LICENSE
- PDFCOMPRESS REVIEW DOWNLOAD
PDFCOMPRESS REVIEW PDF
(Windows, Linux, macOS, iOS, Android) and PDF viewers (Adobe, Foxit, etc.). Please always test PDF documents with unembedded fonts in your target operating systems If (Array.Exists(alwaysUnembedList, name => font.Name = name))ĭo not use this technique with PDF/A documents. SystemFontLoader loader = SystemFontLoader.Instance īyte fontBytes = loader.Load(font.Name, font.Bold, font.Italic) If (font.Format = PdfFontFormat.TrueType || font.Format = PdfFontFormat.CidType2) String alwaysUnembedList = new string Īrray.Exists(alwaysKeepList, name => font.Name = name)) / private static void unembedFonts(PdfDocument pdf) / /// This method unembeds any font that is: /// * installed in the OS /// * or has its name included in the "always unembed" list /// * and its name is not included in the "always keep" list.
PDFCOMPRESS REVIEW HOW TO
This sample shows how to optimize PDF fonts in C#: Removing glyphs unused in a PDF documentĬan significantly reduce the output file size. PDF documents usually embed fonts used to draw text. Look at the Optimize images in PDF document in C# and VB.NET Or you can optimize images yourself by using a 3rd-party tool and then You can also resize or downscale images to reduce PDF file size even more. JPEG 2000, and zip/deflate compression algorithms. Optimizing PDF images is usually the most effective compression method for documents with raster images.ĭocotic.Pdf library provides built-in methods to recompress PDF images using JPEG, CCITT Group 3 and 4 (fax), Method will be able to deduplicate converted images, too. The method will convert the inline images to regular ones, and then the ReplaceDuplicateObjects Use PdfCanvas.MoveInlineImagesToResources If your document contains inline images, then

PdfDocument.ReplaceDuplicateObjects methodĭoes not replace inline images. Otherwise, a lot of extra work will be done to optimize copies of the same images or fonts. It is recommended to remove duplicate objects before compressing images or unembedding fonts. Using ( var pdf = new PdfDocument( "merged.pdf")) Here is the C# sample for this operation: Replacing duplicate objects helps to reduce size of the produced PDF file. When you merge PDF documents, the produced PDF often contains duplicate fonts and images. Remove duplicate objects in PDF documents Unless you have strong reasons to keep the unused objects. They only affect how PDF objects are written and compressed in the output PDF file.ĭeleting unused PDF objects is important for other techniques discussed below.ĭo not set PdfSaveOptions.RemoveUnusedObjects property to false Pdf.Save( "compressed.pdf", saveOptions) Īll these optimizations don't affect visible contents (text, images, bookmarks, and anything else) of the PDF document. These options are enabled by default and applied implicitly: //saveOptions.Compression = PdfCompression.Flate //saveOptions.RemoveUnusedObjects = true //saveOptions.OptimizeIndirectObjects = true //saveOptions.UseObjectStreams = true //saveOptions.WriteWithoutFormatting = true Using ( var pdf = new PdfDocument( "input.pdf")) This sample shows how to optimize PDF objects in C#: packs PDF objects to compressed object streams.compresses PDF streams with Flate encoding.When saving a PDF file, Docotic.Pdf applies the following lossless optimizations by default: Internally, a PDF file is a collection of low-level PDF objects: dictionaries, streams, arrays, and others. Let's review these compression methods in more detail. Sample to see all these techniques in action. You can use all the above to get the best compression ratio for your PDF documents. remove duplicate PDF objects (fonts, images, etc.).
PDFCOMPRESS REVIEW LICENSE
To try the library without evaluation mode restrictions, you may get the free time-limited license keyĭocotic.Pdf provides different optimization means:
PDFCOMPRESS REVIEW DOWNLOAD
You can download the binaries of the library or use its NuGet package. Use Docotic.Pdf library to compress PDF documents in. Reducing PDF file size is especially important for archiving purposes. Smaller PDF documents are easier to transfer through network and cheaper to store. In many cases, it is a common desire to compress and optimize PDF documents.
