Skip to content

Draft: introduce watermark element to make text non-selectable by artifact Tag (PDF 1.7 18.4.2.2.2) - #5938

Closed
LuxxxLucy wants to merge 1 commit into
typst:mainfrom
LuxxxLucy:lucy-watermark-non-selectable-br
Closed

LuxxxLucy wants to merge 1 commit into
typst:mainfrom
LuxxxLucy:lucy-watermark-non-selectable-br

Conversation

@LuxxxLucy

Copy link
Copy Markdown
Contributor

As discussed in #2249 and particular #2249 (comment)
Introduce a watermark element so to make PDF outputs the text with a tag of artifact.

As the watermark element does not have any effect on the layout, so it is implemented as a frame modifier.

NOTE:

However, it appears that the artifact tag does not really makes the text non selectable even for Adobe Acrobat.
Probably need to find a better solution.

@LuxxxLucy
LuxxxLucy marked this pull request as draft February 23, 2025 22:32
@LuxxxLucy LuxxxLucy changed the title Draft: introduce watermark by the Artifact Tag Draft: introduce watermark element to make text non-selectable by artifact Tag (PDF 1.7 18.4.2.2.2) Feb 23, 2025
@LaurenzV

Copy link
Copy Markdown
Collaborator

Note that #5420 would make it pretty easy to add non-selectable text to PDFs.

@laurmaedje

Copy link
Copy Markdown
Member

My envisioned design was more along the lines of set text(selectable: false). See also #5789.

@LuxxxLucy

Copy link
Copy Markdown
Contributor Author

My envisioned design was more along the lines of set text(selectable: false). See also #5789.

Okay I see, this would be essentially an selectable attribute to text element. I will re-do this (perhaps after the krilla pdf backend PR #5420 is merged, as we can outlines the glyphs)

@laurmaedje laurmaedje added interface PRs that add to or change Typst's user-facing interface as opposed to internals or docs changes. pdf Related to PDF export or PDF embedding. labels Mar 24, 2025
@laurmaedje

Copy link
Copy Markdown
Member

I'll close this as a solution based on #5420 likely wouldn't share any code with this, so it can be a new PR. Thanks still!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interface PRs that add to or change Typst's user-facing interface as opposed to internals or docs changes. pdf Related to PDF export or PDF embedding.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants