Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal to Support Independent Text Opacity Settings for FreeText Annotations #508

Open
AmyLin2013 opened this issue Dec 26, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@AmyLin2013
Copy link

I would like to propose an enhancement to the PDF 2.0 annotation specification, particularly regarding the opacity settings for FreeText annotations. Currently, in the PDF 2.0 specification, the /ca dictionary entry for annotations controls the opacity of all nonstroking elements, such as the background and border. However, there are cases where we would like to set the opacity of the text content independently of other elements like the border and fill color.

For example, imagine a scenario where we want to add a text box with the following characteristics:

  • The border of the text box is fully opaque (100% opacity).
  • The fill color of the text box has 10% transparency.
  • The text itself needs to remain fully opaque (100% opacity).

Under the current specification, there is no way to achieve this effect because the opacity setting applies uniformly to all nonstroking elements. This limits the flexibility in creating annotations where different elements need different transparency levels.

I suggest adding the ability to independently control the opacity of the text content in FreeText annotations, allowing for more precise control over the appearance of annotations, especially in use cases where varying transparency levels for different elements are required.

Thank you for considering this proposal. I believe this feature would enhance the usability and visual flexibility of PDF annotations.

@AmyLin2013 AmyLin2013 added the bug Something isn't correct label Dec 26, 2024
@AmyLin2013
Copy link
Author

The current specification allows for achieving different opacity effects by individually controlling the AP stream during the generation of the text stream. However, without a dedicated dictionary entry, it becomes challenging to maintain the same opacity settings when editing the FreeText annotation for the second time. Therefore, I suggest that the PDF specification consider adding a dedicated dictionary entry for the opacity of text objects within FreeText annotations. This enhancement would ensure consistent and predictable behavior during annotation edits, improving both functionality and user experience.

@petervwyatt petervwyatt added enhancement New feature or request and removed bug Something isn't correct labels Jan 2, 2025
@petervwyatt petervwyatt added this to the Annotation-related milestone Jan 2, 2025
@petervwyatt
Copy link
Member

Re "maintain[ing] the same opacity settings when editing the FreeText annotation for the second time": it has been discussed previously that the (re-)generation of annotation appearance streams needs explaining somewhere. The current view is that this should not be in ISO 32000, but a separate PDF Association publication such as an application note or tech note. There are also other errata highlighting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants