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

Free Support Forum - aspose.com

Pdf to HTML ImageCallback

Hi all!

I need to be able to dictate where any embedded images are saved to. With the Aspose.Words product this is handled in an HtmlSaveOption with an ImageSavingCallback. I’ve included the code below which works in the Aspose.Wordsnamespace, is there any way I can invoke something similar for the PDF saving that I’m missing?

Document document = new Document(inputStream);
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.setImageSavingCallback(new IImageSavingCallback() {
public void imageSaving(ImageSavingArgs args) throws Exception {
if (imageCallback != null) {
OutputStream imageOutputStream = imageCallback.createImageStream(args.getImageFileName());
} else {
args.setImageStream(new ByteArrayOutputStream());
document.save(outputStream, saveOptions);

I see that something like that is implemented for .NET ( PDF to HTML - Retrieve raw HTML and Handle Images ).
What about Java?

Hi there,

Thanks for your inquiry. I am afraid the requested feature is not available in Aspose.Pdf for Java. However we have logged a feature request as PDFNEWJAVA-34088 for further investigation and resolution. We will update you via this forum thread as soon as it is implemented.

We are sorry for the inconvenience caused.

Best Regards,

The issues you have found earlier (filed as PDFNEWJAVA-34088) have been fixed in Aspose.Pdf for Java 9.5.0.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.