https://github.com/rafalkaron/princepal
Preview your PDFs like a prince!
https://github.com/rafalkaron/princepal
automation css html5 pdf pdf-generation prince prince-xml python-script python3
Last synced: 15 days ago
JSON representation
Preview your PDFs like a prince!
- Host: GitHub
- URL: https://github.com/rafalkaron/princepal
- Owner: rafalkaron
- License: mit
- Created: 2020-07-18T13:16:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-21T17:41:48.000Z (over 2 years ago)
- Last Synced: 2025-02-17T07:43:39.099Z (3 months ago)
- Topics: automation, css, html5, pdf, pdf-generation, prince, prince-xml, python-script, python3
- Language: Python
- Homepage:
- Size: 11.9 MB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PrincePal
*Preview your PDFs like a prince!***Before you begin:**
* Download the latest **PrincePal** version. See [PrincePal Download](https://github.com/rafalkaron/PrincePal/releases/latest)
**NOTE:** You can download a Windows bundle, macOS bundle, or a non-compiled Python script.
* If you want to run non-compiled **PrincePal**, install **Python 3.8.2** or higher. See [Properly Installing Python](https://docs.python-guide.org/starting/installation/).
* Install **Prince**. See [Prince - Getting Started](https://www.princexml.com/doc/installing/).
* Begin developing a Prince PDF style. See [Your First Document](https://www.princexml.com/doc/first-doc/).
**TIP:** Ensure that the HTML files do not contain any broken references because they significantly slow down conversion.**Do any of the following:**
* To convert the HTML files in the **PrincePal** directory:
* Put **PrincePal** in the HTML files directory.
* Run **PrincePal** with the *-cwd* attribute.
* To convert the HTML files in a given directory, run **PrincePal** with the *-i* attribute followed by the directory path.
* To convert a single HTML file, run **PrincePal** with the *-i* attribute followed by the file path.
* If needed, accept any security prompts. See [Accepting macOS Security Prompts](https://github.com/rafalkaron/PrincePal/wiki/Accepting-macOS-Security-Prompts) or [Accepting Windows Security Prompts](https://github.com/rafalkaron/PrincePal/wiki/Accepting-Windows-Security-Prompts).
**NOTE:** You may need to run **PrincePal** as an administrator.
Every PDF file opens in the default application determined by your OS settings. I recommend setting a web browser (e.g. Chrome or Brave) to open PDFs by default in your OS settings. This way, each time you run **PrincePal**, a new tab opens so you can quickly compare your styling modifications.**Optional arguments:**
* To use a CSS style, use the *-s* attribute followed by the file path to the CSS file.
* To prevent the PDF preview from opening use the *-nopr* attribute.
* To set the number of concurrent jobs, use the *-jobs* attribute.
**NOTE:** The number of concurrent conversion, removal, and preview jobs defaults to 12. You can use this attribute with other attributes.