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

-dPreserveAnnotTypes NOT Working #116

Closed
Geo-Van opened this issue Sep 21, 2023 · 3 comments
Closed

-dPreserveAnnotTypes NOT Working #116

Geo-Van opened this issue Sep 21, 2023 · 3 comments

Comments

@Geo-Van
Copy link

Geo-Van commented Sep 21, 2023

-dPreserveAnnotTypes NOT Working

Taking a look under the PreserveAnnots switch here:
https://ghostscript.readthedocs.io/en/latest/VectorDevices.html#pdf-file-output-pdfwrite

Trying to apply the -dPreserveAnnotTypes is NOT working, for example lets try the following to preserve HYPERLINKS:
Example:
gs -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf -c "/PreserveAnnotTypes [/Link] def" -f basic_link_1.pdf

BUT, please note that this is NOT working, unfortunately..... it flatten NOTHING, all annotations are NOT flatten, and hyperlinks are also NOT flatten.

Also we try the following, and it doesn't work either:
gs -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf -dPreserveAnnots=false -c "/PreserveAnnotTypes [/Link] def" -f basic-link-1.pdf

Please see the relevant issue at:
#113

Can you please examine where is the error regarding -dPreserveAnnotTypes switch ?

@jhabjan
Copy link
Contributor

jhabjan commented Sep 22, 2023

Hi Geo-Van, like I said, please report this to the core Ghostscript website: https://bugs.ghostscript.com/

This here is Ghostscript.NET wrapper repository.

@jhabjan jhabjan closed this as completed Sep 22, 2023
@Geo-Van
Copy link
Author

Geo-Van commented Sep 22, 2023

Thank you, please see:

https://bugs.ghostscript.com/show_bug.cgi?id=707198

@Geo-Van
Copy link
Author

Geo-Van commented Sep 23, 2023

Hello,
The latest version 10.02 works:
gs -sDEVICE=pdfwrite -o output.pdf -c "/PreserveAnnotTypes [/Link] def" -f input.pdf

Thank you!

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

No branches or pull requests

2 participants