Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Added function to export the annotated PDF.#6

Open
somefoo wants to merge 2 commits intosalcc:mainfrom
somefoo:main
Open

Added function to export the annotated PDF.#6
somefoo wants to merge 2 commits intosalcc:mainfrom
somefoo:main

Conversation

@somefoo
Copy link
Copy Markdown

@somefoo somefoo commented Mar 18, 2025

I added the function to export the annotated document as a new PDF.

I am aware this isn't the perfect solution, but I believe it is a nice workaround for now to get an annotated PDF :)

It uses pdf-lib and some additional functions in annotation.js.

image

@salcc salcc added the enhancement New feature or request label Mar 20, 2025
@salcc salcc self-assigned this Mar 20, 2025
@Asakamizu
Copy link
Copy Markdown

I suggest allowing annotation to be exported as FDF or XFDF, which enables the user to import the annotation into the original pdf file in Acrobat to save the annotations made in the extension.

@somefoo
Copy link
Copy Markdown
Author

somefoo commented Apr 2, 2025

Agree this would be a nice addition. This could be an option in the already existing screen used to store the annotations? In fact, it may be a good format to store in every time?

Replacing your existing PDF with the PDF stored using the pull-request approach will have the same effect and is more portable (it doesn't require Adobe Acrobat, which is not available under Linux per default).

@Butanium
Copy link
Copy Markdown

I'd love to have this feature! @salcc any plans to merge this?
Thx!

@salcc
Copy link
Copy Markdown
Owner

salcc commented Jul 6, 2025

Thanks for the contribution! I want to test it more, and would also like to be able to load the annotations written by this modification if an exported PDF is opened again in the extension. I guess it should be possible using the same library. I will try to work on it soon.

@Butanium in the meantime if you just want the modifications on this pull request, you can load the code from the fork (https://github.com/somefoo/Scholar-PDF-Reader-with-Annotations/archive/refs/heads/main.zip) and it should work.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants