Today we are excited to introduce new APIs to PDFTron SDK for Android for converting HTML to PDF, stamping documents with preset images, real-time annotation moving & editing, and more see full list of changes.

linkHTML to PDF conversion

The HTML to PDF conversion API accepts different sources, such as HTTP/HTTPS URLs, HTML strings, and everything that can be loaded in a WebView.

For example, to convert a URL to PDF, simply:

HTML2PDF.fromUrl(context, "http://developer.android.com/about/index.html", new HTML2PDF.HTML2PDFListener() {
    @Override
    public void onConversionFinished(String pdfOutput) {
        // do something with the PDF output
    }

    @Override
    public void onConversionFailed() {
        // handle error
    }
});

HTML to PDF conversion is available for Android API 21 and above. See tutorial here: Converting HTML to PDF.

linkPreset rubber stamps

Along with a number of new tools introduced in v6.8.3 such as PolylineCreate, PolygonCreate, CloudCreate and FreeHighlighterCreate, today we have a new tool in the collection: RubberStampCreate.

It's now easier to add predefined rubber stamps to Android apps for fast 2-click stamping of invoices, contracts, documents, images, and more. Here's a preview:

Customizable predefined rubber stamps include:

  • Approved
  • Not approved
  • Final
  • Draft
  • Completed
  • Void
  • For public release
  • Not for public release
  • For comment
  • Confidential
  • Preliminary results
  • Information only
  • Witness
  • Initial here
  • Sign here
  • Checkmark
  • Cross mark

linkReal-time annotation moving and editing

With our new real-time annotation editing & moving API, you can choose to show annotation adjustments in real-time, or with a bounding box. Here's a preview of the new real-time API:

Here's a preview of the bounding box approach:

Read more about the ToolManager.

linkAnd more...

For a full list of changes, please see the changelog for PDFTron 6.8.5 for Android.

We hope you like these changes and any feedback is greatly appreciated. Please don't hesitate and contact us if you have any questions or suggestions. We also have many exciting new features planned for the coming weeks and months. Stay tuned...