MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Plugins (https://www.mobileread.com/forums/forumdisplay.php?f=268)
-   -   PrincePDF: PDF export (https://www.mobileread.com/forums/showthread.php?t=274972)

Doitsu 12-26-2018 01:21 PM

Quote:

Originally Posted by Djeturn (Post 3791336)
How easy (or difficult) would you say it might be to port this plugin so that it uses WeasyPrint? It's not as "complete" as Prince is, but from my brief usage it feels like it's good enough for ebooks, and is a free alternative.

I've looked at the installation instructions and setting up WeasyPrint is not exactly easy, because of the many dependencies. OTOH, Prince requires only a single binary. This doesn't make WeasyPrint a good candidate for a plugin.

AutomaticSync 01-09-2019 01:48 PM

PRINCE PDF
 
Hello,

I'm reaching out about a similar issue with the Prince PDF plug-in. I am a MAC OS user.

I downloaded the Prince PDF plug-in and the prince installation file.

I am having trouble installing the Prince file. When I open it to install it simply expands to a folder, and within that folder there is an install file (install.sh). When I open this, it simply opens a text file with a lot of code. Do you know if this is supposed to happen?

You mention in the plug-in section for Prince PDF on this forum that we need to "Make sure to install prince in the default location."

Where is the default location? I'm wondering if this is related to my issue using prince pdf on Sigil.

After doing this I tried to use the Prince PDF plug-in in Sigil and it's giving me this response:

Status: failed

prince not found: /usr/local/bin/prince

I have prince in my files but it's not detecting it. Can you help me with this issue?

Doitsu 01-09-2019 04:23 PM

Quote:

Originally Posted by AutomaticSync (Post 3797018)
I downloaded the Prince PDF plug-in and the prince installation file.

I am having trouble installing the Prince file. When I open it to install it simply expands to a folder, and within that folder there is an install file (install.sh).

The Prince developers apparently didn't provide a proper installer. Users are expected to run a shell script, which will install prince in /usr/local/bin/prince.

For detailed instructions see the Prince PDF website.

Note that you'll need to replace to prince-9.0-macosx with prince-12.4-macosx. For example:

Code:

tar xzf prince-12.4-macosx.tar.gz
cd prince-12.4-macosx

If you have additional questions about other plugins, ask the plugin developers not the Sigil developers.

RbnJrg 04-01-2019 08:31 PM

Hi Doitsu;

Would it be possible to modify your "plugin.py" file so the path to Prince.exe is able to be different from the standar location?

TIA
Rubén

Doitsu 04-02-2019 03:27 AM

Quote:

Originally Posted by RbnJrg (Post 3826782)
Would it be possible to modify your "plugin.py" file so the path to Prince.exe is able to be different from the standar location?

You can specify a custom prince path by inserting the following entry at the beginning of PrincePDF.json:

Code:

  "prince_path" : "D:\\Program Files (x86)\\Prince\\engine\\bin\\prince.exe",
(Obviously, you'll need to change the path.)

Note also that you'll have to use double backslashes (\\) in Windows paths.

RbnJrg 04-02-2019 09:05 AM

Quote:

Originally Posted by Doitsu (Post 3826845)
You can specify a custom prince path by inserting the following entry at the beginning of PrincePDF.json:

Code:

  "prince_path" : "D:\\Program Files (x86)\\Prince\\engine\\bin\\prince.exe",
(Obviously, you'll need to change the path.)

Note also that you'll have to use double backslashes (\\) in Windows paths.

Thank you Doitsu but, where can I find PrincePDF.json in my system? I can't find it anywhere.

Doitsu 04-02-2019 09:33 AM

Quote:

Originally Posted by RbnJrg (Post 3826917)
Thank you Doitsu but, where can I find PrincePDF.json in my system? I can't find it anywhere.

In Sigil, select Edit > Preferences > Open Preferences Location then double-click the plugins_prefs folder and create a new PrincePDF folder. In the PrincePDF folder, create a PrincePDF.json text file with the following contents:

Code:

{
  "prince_path" : "D:\\Program Files (x86)\\Prince\\engine\\bin\\prince.exe"
}

If you add additional entries, you'll need to terminate the line with a comma:

For example:

Code:

{
  "prince_path" : "D:\\Program Files (x86)\\Prince\\engine\\bin\\prince.exe",
  "cpdf": true
}


RbnJrg 04-02-2019 10:26 AM

Quote:

Originally Posted by Doitsu (Post 3826926)
In Sigil, select Edit > Preferences > Open Preferences Location then double-click the plugins_prefs folder and create a new PrincePDF folder. In the PrincePDF folder, create a PrincePDF.json text file with the following contents:

Code:

{
  "prince_path" : "D:\\Program Files (x86)\\Prince\\engine\\bin\\prince.exe"
}

If you add additional entries, you'll need to terminate the line with a comma:

For example:

Code:

{
  "prince_path" : "D:\\Program Files (x86)\\Prince\\engine\\bin\\prince.exe",
  "cpdf": true
}


Many thanks!! :thumbsup: All worked perfectly.

roger64 12-20-2019 06:42 AM

Sigil 1.0.

I have to adapt the output to create my custom 9×12 size. It was easy three years ago, Now I find it difficult... Life goes like that.

Can we select a preference which tells the plugin to follow the Sigil structure every time? (furthermore, it seems we have no choice on this regard because it can only work this way)

Edit: Done. Would have been quicker if I did not throw away the epub.css file... Happily save exists.

Reader0531 02-11-2020 12:04 AM

permission denied error
 
Hello,

I am trying to run PrincePDF with Sigil.
When I run the plugin It seems to be OK but I get a "permission denied" error in the last leg of the process (see below)
I run Linux Mint.
Thanks

...
prince: used font: Times New Roman, Italic
prince: /home/xxx/Desktop/xxx.pdf: error: can't open output file: Permission denied
prince: Finished: failure

Return code: 1
Prince failed!

Doitsu 02-11-2020 03:25 AM

Quote:

Originally Posted by Reader0531 (Post 3952051)
I am trying to run PrincePDF with Sigil.
When I run the plugin It seems to be OK but I get a "permission denied" error in the last leg of the process (see below)

This might happen if your Desktop folder has name other than "Desktop" or if the output file is locked by another process. Try changing the following entry in PrincePDF.json:

Code:

  "output_dir": "/home/xxx/Desktop/"
so that it points to an existing folder.

Reader0531 02-11-2020 11:32 AM

Quote:

Originally Posted by Doitsu (Post 3952081)
This might happen if your Desktop folder has name other than "Desktop" or if the output file is locked by another process. Try changing the following entry in PrincePDF.json:

Code:

  "output_dir": "/home/xxx/Desktop/"
so that it points to an existing folder.

Thank you for the quick answer.
It fixed my problem instantly.
Thank you very much.
Great Sigil plugin :thanks:

Sonotoki 09-26-2020 12:42 PM

Error
 
Hello everyone!
I've installed all the prerequisites (Python 3x, PrincePdf, cpdf.exe to the Windows folder), but there's error when launching the plugin:
Code:

Status: failed

Traceback (most recent call last):
  File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 142, in launch
    self.exitcode = target_script.run(container)
  File "C:\Users\Sonotoki\AppData\Local\sigil-ebook\sigil\plugins\PrincePDF\plugin.py", line 115, in run
    if not os.path.isfile(prince_path):
  File "genericpath.py", line 30, in isfile
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
Error: stat: path should be string, bytes, os.PathLike or integer, not NoneType


Sonotoki 09-26-2020 12:56 PM

Quote:

Originally Posted by Sonotoki (Post 4039395)
Hello everyone!
I've installed all the prerequisites (Python 3x, PrincePdf, cpdf.exe to the Windows folder), but there's error when launching the plugin:
Code:

Status: failed

Traceback (most recent call last):
  File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 142, in launch
    self.exitcode = target_script.run(container)
  File "C:\Users\Sonotoki\AppData\Local\sigil-ebook\sigil\plugins\PrincePDF\plugin.py", line 115, in run
    if not os.path.isfile(prince_path):
  File "genericpath.py", line 30, in isfile
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
Error: stat: path should be string, bytes, os.PathLike or integer, not NoneType


Ahh! I'm really sorry, my bad! I thought that I don't need to set the path of PrincePDF, since it's installed properly, but when I wrote the path in PrincePDF.json, then everything worked out ))

codrut_popescu 02-04-2021 03:55 PM

epub to pdf converted book does not contain the cover
 
Hi,

I am new to this. I am trying to convert my ebooks (which I own and purchased) from epub to pdf. The ebooks are actually DRM free, they are ebooks from raywenderlich but I would like to read them on my pdf e-reader (Quaderno). For this I have installed Calibre and Sigil and the Prince PDF plugin and conversion went fine, actually better than I have expected, except the pdf does not have a cover.
Now, the original book when I open in iBooks it does have a cover. But when I open it in ebook-viewer it does not have a cover. So, what is wrong here?

Thanks


All times are GMT -4. The time now is 08:28 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.