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

PDF annotation fixes #4

Closed
4 of 5 tasks
ublefo opened this issue Jul 31, 2022 · 1 comment
Closed
4 of 5 tasks

PDF annotation fixes #4

ublefo opened this issue Jul 31, 2022 · 1 comment
Assignees
Labels
bug Something isn't working pdfgen

Comments

@ublefo
Copy link
Owner

ublefo commented Jul 31, 2022

Upstream issue

doubtfire-lms#326

Limitations

This fix will only preserve links (hyperlinks and internal links) and nothing else. This is a limitation of the TeX packages we have available, both pax and newpax can only extract links and nothing else. The TeX engine can insert annotations with a package like pdfcomment, but we cannot extract them from the PDFs we are including.

Currently there are no better solutions unless we stop processing PDF submissions with the TeX engine.

Main tasks

  • Update erb templates
    • Global preamble app/views/layouts/application.pdf.erbtex
    • Task submission PDF template app/views/task/task_pdf.pdf.erb
    • Portfolio PDF template app/views/portfolio/portfolio_pdf.pdf.erb
  • Update installation script to install newpax with tlmgr
  • Update installation script to patch the current version of newpax (call tlmgr info --only-installed --data cat-version newpax and ensure we are only patching v0.52)
  • Ensure our GhostScript compression calls will preserve these links (ImageMagick can't preserve them)

Nice to have

  • PDF test submission files with annotations (links) and unit tests that verifies generated PDFs still has annotations
@ublefo ublefo added bug Something isn't working pdfgen labels Jul 31, 2022
@ublefo ublefo self-assigned this Jul 31, 2022
@ublefo
Copy link
Owner Author

ublefo commented Aug 3, 2022

doubtfire-lms#389 (merged)

@ublefo ublefo closed this as completed Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pdfgen
Projects
None yet
Development

No branches or pull requests

1 participant