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.
[JAVA]
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());
pdf.save(fout);
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.
[JAVA]
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileInputStream;
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) {
System.out.println(e.getMessage());
}
try {
Pdf pdf = new Pdf();
//add a section
Section sec1 = pdf.getSections().add();
Table table = new Table(sec1);
table.setColumnWidths("100");
//add a row
Row row1 = new Row(table);
table.getRows().add(row1);
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
row1.getCells().add(cell11);
//add table to sec1
sec1.getParagraphs().add(table);
FileOutputStream out=new FileOutputStream(new File("c:/pdftest/TestTable.pdf"));
pdf.save(out);
}
catch (java.io.IOException ioe) {
System.out.println(ioe.getMessage() + ioe.getStackTrace());
}
}
}