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

Allow Annotations to have different formats #2305

Open
Fellow-Bennse opened this issue Nov 23, 2023 · 2 comments
Open

Allow Annotations to have different formats #2305

Fellow-Bennse opened this issue Nov 23, 2023 · 2 comments
Labels
workflow-annotation Everything about annotating PDF files

Comments

@Fellow-Bennse
Copy link

Explanation

(on FreeText)
Right now, the /DS and /DA created from pypdf looks something like:
'/DA': '0.9333333333333333 0.9333333333333333 0.9333333333333333 rg'
'/DS': 'font: Helvetica 44pt5pt;text-align:left;color:#0000f5'

The "Problem" is, that many Browsers/Programs have struggles reading this specific format.
From what I tested (and seen from programs/browser-addons), a (so called) Stream-Format seems to be a more "universal" format to be used. Also, it does not use /DS at all.
Example:
'/DA': '/Helv 10.5 Tf 0 Tc 11.76 TL 0 0.470588 0.831373 rg '

Would be cool if there could be some "Format-Change" or Converter added to pypdf.

@ssjkamei
Copy link
Contributor

ssjkamei commented Oct 7, 2024

/DS is addressed in #2893.

I think the read compatibility is a bug or no bug issue, and the format change is a functionality issue.
I think the ability to change the internal format is out of the pypdf.

It looks like this one can be closed unless you decide you need the ability to change the internal format.

@stefan6419846
Copy link
Collaborator

@Fellow-Bennse Feel free to submit a corresponding PR for supporting multiple formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workflow-annotation Everything about annotating PDF files
Projects
None yet
Development

No branches or pull requests

4 participants