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

Free Support Forum - aspose.com

Pdf to html conversion results in bad background

When I use aspose-pdf-10.4.1.java to convert the attached pdf to html, the resulting html has background. The conversion code is simple.


//
// Generate html from the pdf
//
ByteArrayInputStream inStream = new ByteArrayInputStream(pdfBytes);
com.aspose.pdf.Document doc = new com.aspose.pdf.Document(inStream);
int pageCount = doc.getPages().size();
logger.info("pdf pageCount: " + pageCount);
com.aspose.pdf.HtmlSaveOptions saveOptions = new com.aspose.pdf.HtmlSaveOptions();
saveOptions.FontSavingMode = HtmlSaveOptions.FontSavingModes.SaveInAllFormats;
doc.save(docName, saveOptions);


%%%

I’ve had the same issue with some other pdf file in past. I’ve asked a colleague who has some knowledge of pdf to take a look. His remark about the problematic pdfs is that “they are highly compressed and have mixing of RGB and CMYK file types”.

-An
Hi there,

ahong:
When I use aspose-pdf-10.4.1.java to convert the attached pdf to html, the resulting html has background. The conversion code is simple.

//
// Generate html from the pdf
//
ByteArrayInputStream inStream = new ByteArrayInputStream(pdfBytes);
com.aspose.pdf.Document doc = new com.aspose.pdf.Document(inStream);
int pageCount = doc.getPages().size();
logger.info("pdf pageCount: " + pageCount);
com.aspose.pdf.HtmlSaveOptions saveOptions = new com.aspose.pdf.HtmlSaveOptions();
saveOptions.FontSavingMode = HtmlSaveOptions.FontSavingModes.SaveInAllFormats;
doc.save(docName, saveOptions);


%%%

Thanks for your inquiry. I have tested your scenario with shared document using Aspose.Pdf for Java 10.4.1 and managed to observe the reported issue. For further investigation, I have logged an issue in our issue tracking system as PDFNEWJAVA-35008 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

Please feel free to contact us for any further assistance.

Best Regards

Hi there,

ahong:
I've had the same issue with some other pdf file in past. I've asked a colleague who has some knowledge of pdf to take a look. His remark about the problematic pdfs is that "they are highly compressed and have mixing of RGB and CMYK file types".
-An

Thanks for sharing your findings. We have passed on it to our product team, they will consider it while investigating the issue. We will keep you updated about the resolution progress.

Best Regards,