we are using the aspose pdf for java to convert html to pdf in our product. One of our customers is complaining that an image does not appear in the output pdf. The source of the image is an https link to the image file < img src=“https://…/logo.png” /> I tried to save the image to a file and use a relative path to the file, and the image appears in the output pdf, no problems.
I am attaching the source html with the problem image to the topic. What can be wrong with the image when its source is the provided link? I had had several reports about missing other images when their sources are https links so I thought there may be issues with https links but I cannot reproduce the problem with those images after upgrading to the 21.8 aspose version.
We were able to reproduce the issue in our environment while using 22.3 version of the API. Therefore, it has been logged as PDFJAVA-41566 in our issue tracking system for the sake of correction. We will further look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.
Yes, the logged ticket is about the same issue. However, we have generated a separate ticket as PDFJAVA-41902 for your case. We have linked it as well with this forum thread. You will be notified as soon as the ticket is resolved. Please be patient and spare us some time.
We are afraid that the earlier logged tickets have not been yet resolved. However, we have recorded your concerns and will surely inform you as soon as we make some progress towards their resolution. Please spare us some time.
Aspose Pdf has a method as below, but “res” object has only getData function.
Is there any method for “set image data”, maybe we can set image data manually.
htmloptions.setCustomLoaderOfExternalResources(new LoadOptions.ResourceLoadingStrategy() {
public LoadOptions.ResourceLoadingResult invoke(String resourceURI) {
// Creating a clear template resource for replacing:
LoadOptions.ResourceLoadingResult res = new LoadOptions.ResourceLoadingResult(new byte[] {});
// Accessing the data (not clear what action is intended here)
res.getData();
}
});
We are afraid that the earlier logged ticket has still not been completely investigated. Your comments and concerns have been logged under it as well and as soon as we have some news about its resolution, we will share with you via this forum thread. We apologize for the inconvenience caused.