Convert HTML to PDF with external resources using Aspose.PDF REST API

Hi,


we are evaluating your products, and we are considering using your PDF component to create PDFs from HTML we deliver.
We have a few questions we want to understand before we start evaluating the Aspose.PDF.
1. When you receive an HTML with javascript and buttons in it, does the software knows to filter them out?
2. How can we send you the resources that are used by the HTML? looking into your documentation it seems that you:
- Expect the HTML to reside on Aspose storage (or amazon, dropbox, etc.)
- that you only handle the HTML without any resources.
Do you expect all the resources (images, css) to be embedded in the HTML?

Thanks,
Yishay

Hi Yishay,

Thanks for your inquiry.

yishayh:
1. When you receive an HTML with javascript and buttons in it, does the software knows to filter them out?
Please note javascript is not preserved during HTML to PDF conversion, however buttons are rendered.
yishayh:
2. How can we send you the resources that are used by the HTML? looking into your documentation it seems that you:
- Expect the HTML to reside on Aspose storage (or amazon, dropbox, etc.)
- that you only handle the HTML without any resources.
Do you expect all the resources (images, css) to be embedded in the HTML?
Yes you are right currently Aspose.Pdf for Cloud expect embedded resources. However we have logged a new feature request SAASPDF-135 in our issue tracking system to support use of external resources. We will notify you as soon as it is resolved.

Please feel free to contact us for any further assistance.

Best Regards,

@yishayh

As an update, please note now Aspose.PDF cloud supports HTML with external resources. You can zip and upload the HTML file with the external resources to Cloud Storage and use GetHtmlInStorageToPdf API method for the conversion. Please feel free to contact us for any further assistance.

            // For complete examples and data files, please go to github.com/aspose-pdf-cloud
            string name = "HtmlWithImage.zip";
            string htmlFileName = "HtmlWithImage.html";
            int height = 650;
            int width = 250;
            using (var response = api.GetHtmlInStorageToPdf(Path.Combine(FolderName, name), htmlFileName, height, width))
            {
                Console.WriteLine(response);
            }