This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

toPDF update

Some time ago, I wrote about toPDF. It's a simple web application that allows office format to PDF conversion using PDFCreator. It's open source and allows synchronuous conversion via http post requests or REST calls.

We made some changes in toPDF that makes it possible to use different converter tools/SDKs. It's now possible to use PDFCreator or easyPDF SDK. The first solution is OpenSource and the last is commercial. I prefer the commercial SDK because it has a lot of useful features, offers a Java bridge and works super fast in server environments. The OpenSource solution also works, but needs some tinkering.

Anyway, the toPDF application supports both and it's easy to integrate other converter. Simply implement the interface

public interface IPdfOperator
{
    public void convert(File pDocument, File pPdf, PdfSettings pSettings) throws Exception;
}

Set the context parameter: operatorClass in your web.xml, e.g.

<context-param>
  <description>PDF operator</description>
       
  <param-name>operatorClass</param-name>
  <param-value>com.sibvisions.topdf.operator.pdfforge.PdfCreatorOperator</param-value>
</context-param>

The default operator is com.sibvisions.topdf.operator.bcl.EasyPdfOperator.