Converting HTML Documents to PDF

Hello, I was wondering the best way to convert HTML Documents to PDF in classic asp. Should I be using Aspose.Pdf or Aspose.Words to perform this conversion? Is there anywhere I can find a list of which document extensions should use which Aspose object in classic asp? Thanks!


Edit:
After writing this, I was able to convert my HTML document to PDF by converting the html to a stream and then creating a Aspose.Words.DocBuilder instance. I used the InsertHTML function in DocBuilder to add my html stream. One concern I have now is enabling ActiveX / Javascript in the HTML to display the html as it would if viewed through a browser. Is there a different setting or function I need to use to have this display properly?

Hello Brett,


Thanks for contacting support.

I am a representative from Aspose.Pdf team. Please note that Aspose.Pdf for .NET provides the capability to convert HTML documents into PDF format. Please visit the following link for information on How to Convert HTML to PDF using InLineHTML approach

However as you are need to perform the conversion in classic ASP, you can use Aspose.Pdf for .NET through COM Interoperatibility. For further information, please visit Utilize Aspose.Pdf for .NET in other Programming Languages

Hi,


Thank you for your interest in Aspose.Words. I am representative of Aspose.Words team.

Yes, using Aspose.Words you can convert your HTML documents to PDF documents. Aspose.Words support CSS, but does not execute ActiveX/JavaScript upon loading HTML. Also, you should note that Aspose.Words was originally designed to work with MS Word documents. That is why upon processing HTML some features of HTML might be lost.

Unfortunately, currently we do not have a list of features supported/unsupported upon loading HTML. However, we have a list of supported feature upon exporting to HTML. Most of these features can be roundtrip:
http://www.aspose.com/docs/display/wordsnet/Save+in+the+HTML+%28.HTML%2C+.XHTML%2C+.MHTML%29+Format

If we can help you with anything else, please feel free to ask.

Best Regards,

Hi
Brett,


It is to update you that we’ve recently updated API documentation of Aspose.Words and now we do provide a list of features supported/unsupported upon loading HTML. You can find this list by visiting the following link:
http://www.aspose.com/docs/display/wordsnet/Load+in+the+HTML+%28.HTML%2C+.XHTML%2C+.MHTML%29+Format

Best Regards,

Thank you for your response. I was able to convert the HTML to PDF, but I was wondering if Aspose.PDF supports the execution of ActiveX / Javascript while converting to PDF. I know from the other responses that Aspose.Words does not do this. The reason I ask is because our current conversion software that we are trying to move away from allows ActiveX / Javascript execution, and our clients are now expecting resulting PDF’s to have these incorporated with converting HTML. Is there any method / workaround to accomplish this? Thanks!

Hi Brett,

I am sorry to inform you that currently Aspose.Pdf for .NET ignores JavaScript and ActiveX controls present inside HTML page during its conversion into PDF format. However I have discussed this requirement with development team to share their comments on either this feature can be supported or not. Soon you will be updated with the status of correction. Please be patient and spare us little time. We are sorry for your inconvenience.

Besides this, please note that Aspose.Pdf for .NET supports the feature to add JavaScript to Pdf documents. For further information, please visit Create JavaScript Link in Existing PDF File (Facades) and also Working with the PdfContentEditor class

Hi there,


Thanks for your inquiry.

You may beable to achieve what you are looking for by using Aspose.Words and using the code from the following thread to execute Javascript before conversion: https://forum.aspose.com/t/55138

Please let us know if this is suitable for you.

Thanks,

Is there any update on including the functionality of executing javascript during conversion from html to pdf? It is a critical requirement if we plan to fully migrate our code from ABCPDF to Aspose.PDF.


Thank you,
Brett

Hi Brett,


I am afraid the requested feature is
currently not supported but for the sake of implementation, we already have logged this
requirement in our issue tracking system under New Features list as PDFNEWNET-38447.
We will further investigate this requirement in details and will keep you
updated on the status of a correction. <o:p></o:p>

We apologize for your inconvenience

Any update on this?


Thank you,
Brett

Hi Brett,


As we recently have been able to notice this issue, and until or
unless we have investigated and have figured out the actual reasons of this
problem, we might not be able to share any timelines by which this problem will
be resolved.<o:p></o:p>

However,
as soon as we have made some significant progress towards the resolution of
this issue, we would be more than happy to update you with the status of
correction. Please be patient and spare us little time. Your patience and
comprehension is greatly appreciated in this regard.

Is there any update on including the functionality of executing javascript during conversion from html to pdf? It is still a critical requirement if we plan to fully migrate our code from ABCPDF to Aspose.PDF.

Hi Brett,


Thanks for your patience.

I am afraid the feature requested earlier is not yet implemented. However I have intimated the product team to try scheduling the implementation of this feature in their plans and as soon as we have some definite updates regarding its availability, we will let you know. We are sorry for this delay and inconvenience.

Hello, is there any update on the status of this issue? It remains a critical requirement.

Hi Brett,


Thanks for your patience.

Due to complexity of earlier requested feature, its not yet implemented. However as soon as we have some definite updates, we will let you know.

Hello, is there any updated on including the functionality of executing javascript during conversion from html to pdf? It is still a critical requirement if we plan to fully migrate our code from ABCPDF to Aspose.PDF. It has been 6 years since orginally requested. What kind of timeframe are we looking at for this?

Thank you,
Brett

@InfoEdGlobal

Thanks for your inquiry.

I am afraid that earlier logged issue has not been yet resolved, due to large number of pending issues in the queue and our product team has been working to provide fixes against them. Depending upon their development schedule, they will surely investigate the feasibility of the requested feature and share their feedback accordingly.

Please note that we have raised the priority of this ticket and intimated respective team about your concerns as well. As soon as we receive some updates regarding resolution progress of the logged ticket, we will let you know. Please be patient and spare us little time.

We are sorry for the inconvenience.

Hello, is there any update on including the functionality of executing javascript during conversion from HTML to PDF? Can this be achieved now with the new Aspose.HTML component?

Thank you,
Brett

@InfoEdGlobal

Thank you for getting back to us.

We are afraid PDFNET-38447 has not been resolved yet. Regarding Aspose.HTML for .NET API, a ticket with ID HTMLNET-1681 has been logged in our issue management system for detailed investigations. We will let you know as soon as some significant updates will be available in this regard. Please spare us little time.

Hello! I am back for my yearly check-in on this issue. I see a number of other posts asking for the same thing (JavaScript execution during HTML to PDF conversions). Has there been any progress made? Any sense on when this may become available?

Thank you,
Brett