Questions concerning the Java Version

Hello, I have a bit more than a few questions for you concerning the Java version of your product.

My first is if the setting of the password and other security features are turned off in the trial version. If so, you can attest that they do in fact work in the real version.

Second, I was unable to get the pdf.bindHTML to work using a test of a page we need converted. It uses: ,

, , , , , and various others. Are these supported in the evaluation and /or real product?

In trying to set up a pdf by code, I was getting this error: cannot find symbol Cell cell1 = new Cell(table1); It also failed for Cell(row1). (I am importing com.aspose.pdf.elements.*)

If you can, please indicate where I might be going wrong or a blog entry that might explain this. We definitely want your product. Thank you for your time.

Hello James,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for considering Aspose.

Let me share some thing related to Trial version of Aspose.Pdf. It offers the complete set of functionalities that are available in full licensed version, except for the fact that, an evaluation watermark is displayed in the resultant Pdf file.

1) Regarding your query for setting the security features, you can set the User and Master password, encrypt the Pdf file using 40 or 128 Bits encryption and set document access privileges to restrict or allow annotations modification, contents modification, copying the content, degraded printing, document assembling, form filling, printing the pages and screen readers. For more related information please visit Security Features

2) The HTML tags that you have specified are supported by Aspose.Pdf component except for and  . HTML2pdf is in Beta version and our development team is working hard to improve this feature. Please try using the following code snippet.


File htmlFile =new File("C:/pdftest/test.html");
Pdf pdf= new Pdf();
FileInputStream fin = new FileInputStream(htmlFile);
FileOutputStream fout = new FileOutputStream(new File("C:/pdftest/HtmlExample_James.pdf"));
pdf.bindHTML(fin, htmlFile.toURI().toURL());;

For information on list of supported HTML tags please visit Converting Html or Aspx to PDF (Beta version)

3) Regarding creation of Pdf through code, please make sure you have provided the reference to Aspose.pdf.jar in your project. If still it does not work, please try using the complete class reference i.e. com.aspose.pdf.elements.Cell cell11 = new com.aspose.pdf.elements.Cell(row1, "Hello World");

I have tested the issue using following code snippet and its working fine at my end.



import com.aspose.pdf.elements.*;
import com.aspose.pdf.elements.Row.*;
import com.aspose.pdf.exception.AsposeBaseException;

public class onecell{

public static void main(String args[]) throws Exception {
com.aspose.pdf.License lic = new com.aspose.pdf.License();

try {
lic.setLicense(new FileInputStream(new File("Aspose.Total.Java.lic")));
} catch (Exception e) {
try {

Pdf pdf = new Pdf();

//add a section
Section sec1 = pdf.getSections().add();

Table table = new Table(sec1);

//add a row
Row row1 = new Row(table);

Cell cell11 = new Cell(row1, "Hello World");
com.aspose.pdf.elements.Cell cell11 = new com.aspose.pdf.elements.Cell(row1, "Hello World"); //use this if above does not work
//add table to sec1

FileOutputStream out=new FileOutputStream(new File("c:/pdftest/TestTable.pdf"));;

catch ( ioe) {
System.out.println(ioe.getMessage() + ioe.getStackTrace());

Thank you for your fast reply. However I feel I did not do a good job explaining my problem.
It was noticed that when I used the security class that the password was not being challenged.

The html limitations are incredibly helpful to me, thank you!

As to the use of the Cell class, I am sorry to inform you that neither
Cell cell1 = new Cell(table1); nor
com.aspose.pdf.elements.Security.Cell cell1 = new com.aspose.pdf.elements.Security.Cell(table1);
work. They were tested before I wrote the question. I was wondering if there is a know problem and work around, my guess is that it might be a problem confined to my environment somehow.

Again, thank you very much! The bindHTML is the preferred method and I plan on making full use of it.


Hello James,

We apologize for your inconvenience.

1) Regarding Security class issue, please share the Pdf file and the Code snippet that you are using so that we can test the issue at our end.

2) Regarding Cell class issue, as far as I can see, the issue seems to be with the environment. Please check you have properly paced the jar file and referenced it properly in your project. And also you are using this class while compiling the code.

3) Regarding HTML2Pdf, our development team is working hard to fully support this feature. As soon as we have made progress, we would be pleased to inform you. Your patience in this regard is highly appreciated.