Rob Rob is a multi-language developer. In his spare time, he enjoys riding his motorcycle and playing guitar in his band.

Annotations Creation and Editing in JPedal 7 Java PDF Library SDK

1 min read

In the latest version of the JPedal Java PDF Library, we implemented new features allowing you to create and edit annotations on your PDF files. Here’s a quick summary of what we’ve been up to:

Creating annotations

We’ve added a new tab to the sidebar, labelled “Annotations”. From here, you can select a variety of annotation types to add to your PDF. Most require a simple click and drag/move, but each button has a helpful tool-tip if you’re unsure on what to do.

The new Annotations sidebar
The new Annotations sidebar, with Polyline selected

After selecting an annotation type, the cursor will change to a crosshair when you move your mouse over the page (or if using the highlight tool, an I-cursor when over un-highlighted text). You’re now free to start drawing!

Editing annotations

To select an existing annotation, simply left click anywhere over it. You’ll know if it’s selected – there will now be a fancy border around it and tabs around the edges for resizing the annotation.

A selected annotation
A selected annotation

To move annotations, simply click and hold anywhere on one, then drag it wherever you please on the page. Additionally, resizing is just as easy – click and drag one of the tabs around the edge of the annotation.

For more in-depth customisation, right-clicking an annotation will open a context menu from which you can select “properties”. This will open the properties window, where you can edit the line width, line colour and fill colour (where these options are supported) to your heart’s content – just click on an option to change it.

The properties panel
The properties window. Click on the coloured box to open the colour selection window
The colour selection window
The colour selection window
The properties panel, with the new colours
The properties window, with the new colours. Click OK and you’re all done!
The annotation with the updated properties
The annotation with the updated properties

Of course, we aren’t stopping here – we already have plans to add more annotation types and features in the near future.

Is there anything you’d like to see in the next annotations update? Let us know in the comments below.

IDRsolutions develop a Java PDF Viewer and SDK, an Adobe forms to HTML5 forms converter, a PDF to HTML5 converter and a Java ImageIO replacement. On the blog our team post anything interesting they learn about.

Rob Rob is a multi-language developer. In his spare time, he enjoys riding his motorcycle and playing guitar in his band.

Leave a Reply

Your email address will not be published. Required fields are marked *

IDRsolutions Ltd 2019. All rights reserved.