Tiff to Pdf conversion: filesize gets increased

Hi Team,

I am using Aspose.PDF API for .Net and trying to convert single page .tiff files to .pdf files. While doing so, the size the converted pdf file is getting increased a lot. I need help here.

Regards,
Nilotpal

@Neel1510

Thank you for contacting support.

Would you please share narrowed down code snippet along with source and generated files so that we may try to reproduce and investigate further. Before sharing requested data, please ensure using Aspose.PDF for .NET 19.5.

Hi Farhan,

Thank you for replying back.

We have purchased the license for using Aspose.Pdf V19.5 and have been using it efficiently.

Below is the code that I am using for converting tiff to pdf. The output pdf file is lot more larger in filesize than the tiff file. Please help me here, as we have a plan to convert thousands of single paged tiff files to pdf and filesize is a concern.

                    Aspose.Pdf.Document doc = new Document();
                    // add blank page to pages collection of Document instance
                    doc.Pages.Add();
                    doc.PageInfo.IsLandscape = false;
                    // create Image object
                    Aspose.Pdf.Image image = new Aspose.Pdf.Image();


                    image.File = sourceFile;
                    // add image to paragraphs collection of PDF page
                    doc.Pages[1].Paragraphs.Add(image);
                    // save the file to the destination location, inside the folder (named as docid value)
                    doc.Save(destinationPDFfile);

13439.zip (101.5 KB)

@Neel1510

The size of generated PDF document generally decreases when IsBlackWhite property of Image class is set to true. However, the program execution does not finish with your image file. Therefore, a ticket with ID PDFNET-46431 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

Hi Farhan,

Thanks for your reply. We have an active license till October 2019. Just to let you know.

Can you please let me know when can I expect a resolution for this issue?

Regards,
Nilotpal

@Neel1510

Please note that the issue has been logged under free support model and will be investigated on first come first serve basis. Therefore, it may take some months to resolve. As soon as we have some definite updates or ETA regarding ticket resolution, we will let you know.

However, we also offer Paid Support, where issues are used to be investigated with higher priority. In case your reported issue is a blocker, you may please consider subscribing for Paid Support. For further information, please visit Paid Support FAQs.

We have an active license for Aspose.Total, shouldn’t we get support by default?
Do we need to log a post while logging in from the corporate account that we have for Aspose?

@Neel1510

Your license entitles you for upgrades up-to 12 months and free support is provided to everyone, whereas Paid Support is only available to the customers who subscribe to it. Therefore, you may contact our sales team over purchase forum for further information about your access to Paid Support Helpdesk.

Is there any update on this, is has been a very long time.

@Neel1510

Thank you for getting back to us.

We are afraid PDFNET-46431 has not been resolved yet. However, we have recorded your concerns and will let you know once any update is available in this regard.

@Neel1510

You should set the IsBlackWhite parameter for the readed image to true.

var doc = new Document();            
doc.Pages.Add();
doc.PageInfo.IsLandscape = false;

var image = new Aspose.Pdf.Image();

image.File = dataDir + "46431.tiff";
image.IsBlackWhite = true;  // <------------  This line added.

doc.Pages[1].Paragraphs.Add(image);            
doc.Save(GetOutputPath("46431_out.pdf"));