PDF Mosaic Library: Scoped parsing of PDF documents

Our library when you open and read pdf files using scoped parsing of document’s content. When opening a document, we extract the necessary minimum of pdf objects, and then in the process when applying to other objects we do parsing them. With this we were able to significantly reduce the time of opening and saving pdf documents, especially noticeable in the multi-pages if pdf documents. For example, the document, containing about 1300 pages, PDF Mosaic library opens for 1.5 seconds. PDF Mosaic library spends 40 seconds for saving the same document. Of course, time is approximate, since it depends on the machine on which conducted the tests, and the contents of pdf documents. But the advantages of deferred parsing clearly visible. But the advantages of delay parsing clearly visible.

If the processing time pdf documents is critical to you, or you mostly work with documents with many pages, we recommend to use the PDF Mosaic library, since this library is implemented effectively read of pdf documents.

The below a code for emulating and testing this situation:

using PDFMosaic;
using System;

namespace CreateAndSave
  class OpenAndSave
    static void Main(string[] args)
      // Open a big pdf file
      System.DateTime tmOpen = System.DateTime.Now;
      PDFDocument document = new PDFDocument(@"..\..\..\Adobe - Pdf Reference. 6th Ed.pdf");
      Console.WriteLine("Time spended for opening pdf file: {0} seconds", (System.DateTime.Now - tmOpen).Seconds);

      // Save opened file
      System.DateTime tmSave = System.DateTime.Now;
      document.Save("Adobe - Pdf Reference. 6th Ed - PDF Mosaic.pdf", true);
      Console.WriteLine("Time spended for saving pdf file: {0} minuts {1} seconds", (System.DateTime.Now - tmSave).Minutes, (System.DateTime.Now - tmSave).Seconds);

You may download the code of this project here: FastOpenAndSavePDF.zip

For example, compare the speed of PDF Mosaic library and iTextSharp. For testing we've using pdf with 1300 pages - Adobe PDF Reference.
The speed measurements were performed on computer has the fillowing configuration:
- CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ 2.30 GHz;
- RAM: 4,00 GB;
- OS: Windows 7 x64.

And we've got the following results (Speedtest and Comparsion of Open-Source iTextSharp and PDF Mosaic Library):
PDFMosaic opens the file during 0.9 sec;
iTextSharp opens the file during 27.5 sec.

Team of PDF Mosaic.


Download latest stable version

You can get latest stable version of PDF Mosaic here.

Awaiting your questions

We're really eager to hear from you. Please send us your comments, suggestions and any other feedback via the Feedback Form.

Thank you, we really need and appreciate you help! More...

Get the Latest News

June 17 2016
We are on NuGet

June 04 2016
See tutorial about using GoTo Remote action in PDF document

May 28 2016
Read our article about using PDF Mosaic .NET SDK for generating PDF reports

Subscribe to our blog feed here:

PDF Mosaic blog feed

and you will receive notifications about new releases, sample code and how-to articles.