https://github.com/hoodie/libavg_pdf
A pdfplugin for libavg
https://github.com/hoodie/libavg_pdf
Last synced: about 1 month ago
JSON representation
A pdfplugin for libavg
- Host: GitHub
- URL: https://github.com/hoodie/libavg_pdf
- Owner: hoodie
- Created: 2015-05-19T13:27:11.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-19T13:29:29.000Z (almost 10 years ago)
- Last Synced: 2025-02-10T08:44:14.203Z (3 months ago)
- Language: C++
- Size: 176 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# libavg Poppler Plugin
Renders PDF documents in libavg.
It loads the entire document,
manages pages,
caches rendered pages and
reads annotations and page layout.## Requirementse:
- poppler-glib
- libavg >= 1.8.2## Example:
Warnung! These examples are slightly dated.
Checkout plugin.h and PdfNode.py for api.```python
libavg.player.loadPlugin("popplerplugin")
popplerNode = popplerplugin.PopplerNode(path = path)if os.path.exists(possible_path):
path = "file://" + os.path.abspath(possible_path)popplerNode = libavg.PopplerNode(path = path) # loads the pdf file
someDivNode.appendChild( popplerNode )
popplerNode.rerender() # triggers first render
## switching pages
cp = popplerNode.currentPage # contains the current page
popplerNode.setCurrentPage(cp+1) # renders next page
popplerNode.setCurrentPage(cp-1) # renders previous page# previously rendered pages are being cached
## size handeling is inherited from AreaNode
# PopplerNode does not setCurrentPage automatically after resizing
popplerNode.size *= 0.5# trigger render to sharpen up
popplerNode.rerender() # this will drop the cache of rendered pages```
## TODO ( not yet implemented functionality )
- modifing pdf, including:
- adding annotations