Today we are very excited to introduce version 6.10.4 of PDFTron's Android PDF SDK . This release includes new freeform rotation for stamp annotations, more viewer customization APIs, calibration for measurement tools, and much more. This blog post will go through the major changes in 6.10.4. For the full list of changes, please head over to our changelog for PDFTron 6.10.4 for Android .

Stamp freeform rotation

A new annotation handle is added for stamp annotation to allow your users to rotate it to any angle pivot at the center. Guiding lines are shown and snapped to for every 45 degree angles. This allows users to create beautiful and accurate content with rotated stamps.

Here's a preview:

stamp rotation

Viewer customization APIs

A new ViewerBuilder API has been added that makes even easier to customize or create a viewer.

For example with custom classes MyCustomTabFragment and MyCustomTabHostFragment that extend PdfViewCtrlTabFragment and PdfViewCtrlTabHostFragment:

// Returns a custom fragment viewer
public MyCustomTabHostFragment createCustomViewer(@NonNull Context context, @
        NonNull Uri fileUri, @NonNull ViewerConfig config) {
    return ViewerBuilder.withUri(fileUri)
            .usingConfig(config)                                  // Specify a custom viewer config
            .usingNavIcon(R.drawable.ic_arrow_back_white_24dp)    // Specify a custom navigation component
            .usingCustomToolbar(new int[]{}) // Specify a custom toolbar
            .usingTabClass(MyCustomTabFragment.class)             // Specify a class extending PdfViewCtrlTabFragment
            .build(context, MyCustomTabHostFragment.class);       // Specify a class extending PdfViewCtrlTabHostFragment

See detailed tutorial here:

Calibration for measurement tools

A new "Calibrate" menu option is added for measurement annotations to allow you to determine a PDF's scale, enabling accurate measurements.

Here's a preview:

measure calibrate

See detailed tutorial here:

And more...

For a full list of changes, please see the changelog for PDFTron 6.10.4 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...