We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF file generated from an image is too large


I am creating a PDF with an scanned TIFF image of 29kb and the file generated with

PdfConformance.PdfA1B is of 232 kb. Is this normal?

Acrobat optimizes the same document into 38kb !!

Thanks in advance,


Hello Minguel,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have tested the scenario and I am able to notice the same results. In fact, while generating PDF/A-1b compliant document, some extra information is embedded other than Pdf contents, to ensure that the visual appearance of a document is preserved even after the long time. Mean while I will also discuss the size issue with development team and check if we can optimize this factor or not, and will keep you updated with the status of implementation.

Also, please share your sample TIFF file so that we can test the issue at our end.

Dear Minguel,

Thanks for your inquiry.
In PDF/A-1b files, standard device-independent color should be used. So, we have to embed a color space file to convert RGB color into device-independent color. And if any fonts are used in the .pdf file, the font file should be embedded as well. Just as Nayyer stated, this extra information is embedded and increase the resultant file’s size while generating PDF/A-1b document.
In Acrobat, it optimize each image and the format of the image may be changed. So, it don’t need to embed any color space file. However, in Aspose.Pdf, once the color space file is embedded, we don’t need to change images’ formats and our solution is better than Acrobat’s when processing document of a large number of images.

Best regards.

The image is black / white and it does not use any font.

Hello Minguel,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have tested the scenario and have noticed that the resultant Pdf/A-1b being generated is of 329KB. We are looking into the feasibility so check, if we can optimize the code to reduce the resultant Pdf size, and will keep you updated with the status of correction.

Dear Minguel,

You should add IsBlackWhite=“true” for this image.

Best regards.

Dear Hans,

Efectively I am using IsBlackWhite = true. If not, the resultant file is greather (330 kb).

The code I am using is this:

// Set license

Aspose.Pdf.License license = new Aspose.Pdf.License();


//Instantiate a Pdf object by calling its empty constructor

Pdf pdf1 = new Pdf();

// Set conformance specification

pdf1.Conformance = PdfConformance.PdfA1B;

// Page setup

pdf1.PageSetup.Margin.Left = 0;

pdf1.PageSetup.Margin.Top = 0;

pdf1.PageSetup.Margin.Right = 0;

pdf1.PageSetup.Margin.Bottom = 0;

// Create a section in the Pdf object

Section sec1 = pdf1.Sections.Add();

// Create an image object in the section

Aspose.Pdf.Image image1 = new Aspose.Pdf.Image(sec1);

// Set the path of image file

image1.ImageInfo.IsBlackWhite = true;

image1.ImageInfo.TiffFrame = -1; // Multipage !!

image1.ImageInfo.File = @"C:\transfer\BR925000.TIF";

// Add image object into the Paragraphs collection of the section


// Set the type of image using ImageFileType enumeration

image1.ImageInfo.ImageFileType = ImageFileType.Tiff;

// Save the Pdf


Hello Minguel,

Currently the PDF/A function provided by our product is still a beta version and it has no optimization for documents that contains only images. We will try to optimize it in the future version. Sorry for the inconvenience.