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

Free Support Forum - aspose.com

Aspose HTML to PDF conversion


In http://www.aspose.com/documentation/java-components/aspose.pdf-for-java/html-to-pdf.html


it says

Following are the known issues of Html support.

  • HTML to PDF conversion is currently not supported in Java version. ...and similarily...

Following are the known issue when converting Word to Pdf.

  • Word to Pdf is currently not supported in Java version


But I got code from the internet which was supposed to work, and tweaked it to get it to javac compile with Archibus and aspose .jar files. Using ...

javac -target 1.5 -cp \Users\Public\ARCHIBUS\WEB-INF\lib\archibus.jar;\Users\Public\ARCHIBUS\WEB-INF\lib\aspose-pdf-kit-3.4.0.jar;.\Aspose.Words.jdk16.jar;. PmDashboardReport.java

It runs but gives

java.lang.SecurityException:class "com.aspose.words.PdfOptions'''s signer information does not match signer information of other classes in the same package

Thank you for your assistance in this matter.

Very respectfully,

T Cho

Here is the method...

import com.aspose.pdf.kit.Form;

import com.aspose.words.*;

import com.aspose.words.PdfOptions;

import com.aspose.words.PdfOptions.*;





public void PDFgen_00() {
JOptionPane.showMessageDialog(null, "PmDashboardReport.PDFgen_00 " );

try {
dd( "PmDashboardReport.PDFgen_00 sPathName ... " + sPathName );

com.aspose.words.Document doc= new com.aspose.words.Document( sPathName+"PmDashboardReport.docx" );
// com.aspose.words.Document doc= new com.aspose.words.Document( sPathName+"PmDashboardReport.html" );

dd( "PmDashboardReport.PDFgen_00 [001]");
PdfOptions options = new PdfOptions(); // PdfOptions class in com.aspose.words of Aspose.Words.jdk.jar
dd( "PmDashboardReport.PDFgen_00 [002]");

dd( "PmDashboardReport.PDFgen_00 [0021]");
// Aspose.Words for Java requires that you specify the true type fonts directory explicitly before attempting to convert any documents to PDF.
// It does not have to be an OS fonts folder. You can create your own folder and copy all the fonts there you think might ever be required.
options.setTrueTypeFontsFolder( sPathName );

dd( "PmDashboardReport.PDFgen_00 [003]");

doc.saveToPdf(0, doc.getPageCount(), sPathName + "PmDashboardReport.pdf", options);
dd( "PmDashboardReport.PDFgen_00 [004]");

} catch (Exception e) {
JOptionPane.showMessageDialog(null, "PmDashboardReport.PDFgen_00 Exception ..." +e);



This message was posted using Page2Forum from HTML to Pdf - Aspose.Pdf for Java

Hi there,

Thanks for your inquiry.

Please make sure you are only referencing one Aspose.Words.jar within your system. Also try using a fresh copy of the Aspose.Words.jar which you can download from here.

If this does not help could you please attach your document and your copy of the Aspose.Words.jar file for testing.