Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/muzimuzhi/pgfpages-fix-link

Fix hyperlinks in PDF produced by LaTeX package pgfpages
https://github.com/muzimuzhi/pgfpages-fix-link

latex pdf-manipulation pgfpages pypdf2

Last synced: 22 days ago
JSON representation

Fix hyperlinks in PDF produced by LaTeX package pgfpages

Awesome Lists containing this project

README

        

# pgfpage-fix-link

LaTeX package `pgfpages` can produce a n-pages-on-1 (nup, from the Linux command [`pdfnup`](https://linux.die.net/man/1/pdfnup)) PDF from within LaTeX, except for the broken hyperlinks. This Python 3 script tries to fix it.

## Dependency
- [PyPDF2](https://github.com/mstamy2/PyPDF2/)

## Usage
```
usage: fix-coordinates.py [-h] [--output OUTPUT] raw nup

Fix links in PDF generated by LaTeX package pgfpages

positional arguments:
raw raw pdf file
nup nup pdf file using pgfpages

optional arguments:
-h, --help show this help message and exit
--output OUTPUT output pdf
```

## Limitations
* Limited support for `pgfpages` options.
* Limited support for all kinds of destinations and regions supported by PDF. At present, only named destinations and simple `/GOTO` are handled.
* Tests using PDFs produced by LaTeX engines other than XeLaTeX are not conducted yet.

## Miscellaneous

* This script is, in part, a response to GitHub issue https://github.com/CTeX-org/forum/issues/45 .