View Single Post
Old 12-26-2013, 07:39 AM   #1
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
[GUI Plugin] Prince PDF

This plugin converts a book to PDF using Prince (www.princexml.com). Prince can create PDF files with typographical quality, and supports some advanced features like real footnotes and floats, different page styles, etc.

This is the calibre plugin version of my previous script, which is available in two other versions:
  • Bash script version: here
  • Stand-alone GUI version: here

It is implemented as a GUI plugin rather than a conversion plugin because it may use some non-standard metadata and otherwise unused files, which are not available in normal conversion.

Only a few formats can be converted with this plugin, mainly EPUB, AZW3 and HTMLZ.

The resulting PDF can be added to the book record or saved to disk.

As with the other versions, this plugin will use, if it exists in the book, a special CSS file tagged in the metadata section of the OPF file as:

Code:
<meta name="prince-style" content="pdfoutput_css" />
where "pdfoutput_css" is the id of the CSS file in the manifest. A custom CSS file to be used with all conversions can also be configured.

So far, it has only been tested with ePub files and in Linux (and to some extent in Windows). If anyone tries it with other formats and/or in other platforms, please notify me of any issues.

Special Notes:

Translations:
Want to translate the plugin to another language? Use transifex.

Older versions
If you need an older version for compatibility with an older calibre, you can find previous versions in GitHub.

Version History:
Spoiler:
  • Version 1.6.0 (2023-04-08)
    Qt 6 update
    Should be compatible with calibre 6
  • Version 1.5.0 (2020-11-20)
    Python 3 update
    Should be compatible with calibre 5
  • Version 1.4.4 (2020-09-19)
    Fix saving in different filesystem from the temporary directory
    Update translations
  • Version 1.4.3 (2018-03-11)
    Fix resizing of configuration dialog under Windows (contribution from Raffaele Mancuso)
    Update translations
  • Version 1.4.2 (2017-05-13)
    Update translations (with those complete at the time: Portuguese, Ukrainian, Turkish, Estonian)
  • Version 1.4.1 (2017-03-18)
    Update translations (with those complete at the time, i.e., French)
  • Version 1.4.0 (2017-02-25)
    Add option for additional command-line arguments to Prince
    Fix "About" dialog (bumped up minimum calibre version)
    Make sure a single instance of the plugin is running
    Update translations: now including only those that were complete for the previous version
  • Version 1.3.0 (2014-09-13)
    Add possibility to use metadata in stylesheets
    Update translations
  • Version 1.2.2 (2014-08-30)
    Fix bug when selecting executable
    Add GPL license and notice
    Update translations
  • Version 1.2.1 (2014-08-23)
    Fix bug when reading previous configurations
    Add more translations
  • Version 1.2.0 (2014-08-17)
    Compatibility with calibre 2
    Support for multiple custom stylesheets
  • Version 1.1.3 (2014-04-08)
    Fix problem with icons in help message
  • Version 1.1.2 (2014-03-05)
    Refresh info when data changes
    More informative error message
    Fix typo in help text
    Add French translation
  • Version 1.1.1 (2013-12-29)
    Fix problem with books without formats
    Fix problem when switching libraries
  • Version 1.1.0 (2013-12-28)
    Add info text, and update with selection change
    Refresh main GUI after adding PDF
    Catch errors reading/writing PDF file
    Use -l option of Prince for passing a list of input files
    Add copyright in help text
    Fix missing icons
  • Version 1.0.0 (2013-12-26)
    Initial release
Attached Thumbnails
Click image for larger version

Name:	snap1.png
Views:	3096
Size:	15.8 KB
ID:	126935   Click image for larger version

Name:	snap2.png
Views:	3302
Size:	49.2 KB
ID:	126936   Click image for larger version

Name:	snap3.png
Views:	3181
Size:	52.7 KB
ID:	126937   Click image for larger version

Name:	snap4.png
Views:	3334
Size:	40.9 KB
ID:	126938  
Attached Files
File Type: zip prince_pdf-1.6.0.zip (249.7 KB, 41017 views)

Last edited by Jellby; 04-08-2023 at 05:55 AM. Reason: Version 1.6.0
Jellby is offline   Reply With Quote