Recently we have been making some improvements to the way we handle sticky note / pop-up icons found within PDFs. Up until now the pop-up / sticky note icons have been basic and workable, but have also looked a dull, boring, out of place and I didn’t like them (oh vanity, thy name is Kieran). So we have added the following functionality to make the pop-up icons look cleaner and clearer.
1. Added new pop-up icon types.
Until recently we had only one type of icon used to open and close a pop-up. There are actually multiple “types” of pop-up that can and should have their own icons. This “type” is actually just a value you can set to the pop-up such as “note” or “comment” that can specify the intent of the pop-ups text content. So we have replaced the existing icon with a new icon set that will display different icons depending on the type of pop-up. Currently this icon set is particularly small, only containing the most commonly used pop-up types. Should the required type for a pop-up not exist within the icon set we then use a default icon. We currently have plans to expand this icon set to cover all pop-up types.
2. Added pop-up icon transparency.
Our original icon has served us well but it is a basic image with a white background. This has led to the image looking out of place on documents that have different coloured backgrounds or if the icon appears of an image. After making the icon set mentioned above, we found the same to be true with the new set. What we have done to improve this is to replace the background of the image with complete transparency. This has allowed the icon to appear more natural on the display and the annotations looks cleaner.
3. Added icon colour support.
The original icon we used was a flat image that looked the same regardless of the icon type or colour values. Considering we were already altering the icons we added the functionality to allow the icon to alter its own colour to that specified in the PDF. This colour is also used in the corresponding pop-up so that they match. Now you can immediately tell which icon is linked to which pop-up (assuming you are using different colours for each pop-up). This may sound like a superficial change but becomes very useful when a document has 10 open pop-ups and you are trying to find which icon corresponds to which pop-up.
4. Added support for a default pop-up object.
Occasionally some files are created with an icon that stores all the contents of the pop-up but no actual pop-up object. For these rare cases we have a default pop-up that will be used when no pop-up object is specified and one is required. This default pop-up is built from the data found within the icon object and sets all other values to their defaults as specified by the PDF specification.
These changes will be live in the next release later this month. So expect to see cleaner, smarter, new and improved icons appearing when viewing your PDF pop-ups.
Latest posts by Kieran France (see all)
- PDF Portfolio support added to JPedal, so what are they? - April 4, 2017
- Our Goals for the JPedal Java PDF Library SDK in 2017 - December 16, 2016
- Annotations in PDF Files, what are they and why use them? - July 27, 2016
- What is XMP metadata and why it is useful - June 7, 2016
- Improving our JUnit tests - August 6, 2015