Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 09-05-2014, 09:55 AM   #46
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,048
Karma: 9175645
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I was going to say no, but now that I think of it, it may be possible to use calibre-provided metadata (with custom columns, templates and everything) in the custom CSS. I'll have to play a bit with it and implement it, but my idea currently is something like this in your CSS:

Code:
body {
string-set: booktitle @{title}@
}
where @{title}@ would be converted into "Book Title" by calibre before passing the CSS to Prince. I'll have to think about the syntax too.
Jellby is offline   Reply With Quote
Advert
Old 09-05-2014, 01:34 PM   #47
ST-One
Addict
ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.
 
ST-One's Avatar
 
Posts: 283
Karma: 182106
Join Date: Aug 2010
Device: Icarus8, Kindle DXG
Hey, now this would be very nice if you could make this work.
ST-One is offline   Reply With Quote
Old 09-13-2014, 08:43 AM   #48
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,048
Karma: 9175645
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I've implemented it and uploaded v. 1.3.0.

The syntax is: @{@{title}@}@. Use that in your custom CSS (in the configuration), and it should be replaced with the value before converting (check with "show stylesheets" that the "Custom CSS" tab contains the correct values). An example is included in the default stylesheet and can be seen in the snapshot of the configuration screen in the first post, note that you need to include the quotes.
Jellby is offline   Reply With Quote
Old 09-14-2014, 08:22 AM   #49
ST-One
Addict
ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.ST-One can program the VCR without an owner's manual.
 
ST-One's Avatar
 
Posts: 283
Karma: 182106
Join Date: Aug 2010
Device: Icarus8, Kindle DXG
This works perfectly. Thank you.
ST-One is offline   Reply With Quote
Old 03-13-2015, 05:31 AM   #50
n_777
Junior Member
n_777 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2015
Device: Kindle DXG
How to run Prince PDF plugin in batch mode?

Hi, thanks for this great plugin. However, I would like to run it in a batch mode in order to convert multiple EPUBs into pdfs. As far as I can tell this is not an option in the Prince plugin as it stands (the plugin instructs to select only one single book if multiple books are selected).

Is there a workaround for this so that I can set up a queue of multiple EPUBs to be converted with the plugin?

Again, many thanks for a great addition to Calibre.
n_777 is offline   Reply With Quote
Advert
Old 01-16-2016, 10:05 AM   #51
cmbaldwin
Junior Member
cmbaldwin began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2016
Device: Kindle Paperwhite
htmlz problem

Hi,
Thanks for a great plugin. It works for me much better than the default pdf conversion. However, I tried to use htmlz as the input source and ended up with the following bug:
calibre, version 2.33.0
ERROR: Unhandled exception: <b>OEBError</b>:Spine is empty

calibre 2.33 isfrozen: False is64bit: True
Linux-4.2.0-23-generic-x86_64-with-Ubuntu-15.10-wily Linux ('64bit', 'ELF')
('Linux', '4.2.0-23-generic', '#28-Ubuntu SMP Sun Dec 27 17:47:31 UTC 2015')
Python 2.7.10
Linux: ('Ubuntu', '15.10', 'wily')
Successfully initialized third party plugins: DeDRM && Prince PDF && KindleUnpack - The Plugin
Traceback (most recent call last):
File "calibre_plugins.prince_pdf.main", line 187, in convert_to_PDF
File "calibre_plugins.prince_pdf.main", line 280, in unpack
File "/usr/lib/calibre/calibre/ebooks/oeb/reader.py", line 71, in __call__
self._all_from_opf(opf)
File "/usr/lib/calibre/calibre/ebooks/oeb/reader.py", line 696, in _all_from_opf
self._spine_from_opf(opf)
File "/usr/lib/calibre/calibre/ebooks/oeb/reader.py", line 343, in _spine_from_opf
raise OEBError("Spine is empty")
OEBError: Spine is empty
cmbaldwin is offline   Reply With Quote
Old 01-16-2016, 11:51 AM   #52
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,048
Karma: 9175645
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Can you post an HTMLZ file showing the error? From what I see, this is due to a malformed HTML. Can you convert it to EPUB with calibre?
Jellby is offline   Reply With Quote
Old 06-14-2016, 10:40 AM   #53
readin
Enthusiast
readin is on a distinguished road
 
Posts: 25
Karma: 50
Join Date: Apr 2016
Device: calibre
Hi Jellby,

Thanks for providing this plugin.

I'm having the following problem: the bottom of the configure dialog is cut off, as can be seen in the attached image.

calibre 2.58 [64bit] on Windows 10 Pro
Attached Thumbnails
Click image for larger version

Name:	Prince PDF configure dialog.png
Views:	95
Size:	81.6 KB
ID:	149406  
readin is offline   Reply With Quote
Old 06-14-2016, 01:46 PM   #54
DaltonST
Deviser
DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.
 
DaltonST's Avatar
 
Posts: 810
Karma: 26890
Join Date: Aug 2013
Location: Texas
Device: 8" Windows 10 Tablet
Calibre configuration/customization dialogs are resizable

@readin:

Most Calibre customization dialogs are resizable to some degree via the mouse. Drag a top corner down, reposition it, then resize and reposition repeatedly as needed.

You can then use the scroll-bar to see what is otherwise not visible.


DaltonST
DaltonST is offline   Reply With Quote
Old 06-14-2016, 02:08 PM   #55
readin
Enthusiast
readin is on a distinguished road
 
Posts: 25
Karma: 50
Join Date: Apr 2016
Device: calibre
Quote:
Originally Posted by DaltonST View Post
Drag a top corner down, reposition it, then resize and reposition repeatedly as needed.

You can then use the scroll-bar to see what is otherwise not visible.
Hi DaltonST,

Thanks very much for offering that suggestion.

Unfortunately, it doesn't solve the problem.

The first attached screenshot shows what the dialog looks like after I try to drag the top border down -- it won't drag down more than a tiny amount.

If I attempt to move the dialog around, I can sometimes get the dialog to look like in the second screenshot, with part but not all of the bottom panel showing.

Also, as can be seen in the second screenshot, the scrollbar is only for the CSS stylesheet in the middle panel, and doesn't scroll to the bottom of the dialog.
Attached Thumbnails
Click image for larger version

Name:	Prince PDF configure dialog after dragging top border down.png
Views:	80
Size:	79.4 KB
ID:	149408   Click image for larger version

Name:	Prince PDF configure dialog after moving window.png
Views:	82
Size:	79.5 KB
ID:	149409  
readin is offline   Reply With Quote
Old 06-14-2016, 03:44 PM   #56
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,048
Karma: 9175645
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I don't think I have added anything that should affect this, and I can shrink the dialog until the CSS stylesheet is only 2 lines high.

The size is adjusted (when the dialog is created) with the adjustSize() method, maybe the window manager is affecting how this works. In other words, I have no idea what's the problem or how to fix it.
Jellby is offline   Reply With Quote
Old 06-14-2016, 04:54 PM   #57
readin
Enthusiast
readin is on a distinguished road
 
Posts: 25
Karma: 50
Join Date: Apr 2016
Device: calibre
Hi Jellby,

In case it helps, I discovered that changing my Windows settings to auto-hide the Taskbar allows the entire dialog to show, as in the attached screenshot.

calibre 2.58 [64bit] on Windows 10 Pro
Attached Thumbnails
Click image for larger version

Name:	Prince PDF after hiding Taskbar.png
Views:	78
Size:	75.9 KB
ID:	149411  
readin is offline   Reply With Quote
Old 06-14-2016, 05:35 PM   #58
DaltonST
Deviser
DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.DaltonST is not intimidated by interfenestral monkeys.
 
DaltonST's Avatar
 
Posts: 810
Karma: 26890
Join Date: Aug 2013
Location: Texas
Device: 8" Windows 10 Tablet
@readin:

I too have Windows 10, so I installed Prince PDF. Same issue as you. However, it was simply fixed by right-clicking the Windows Taskbar then clicking "Show Windows Stacked". To seal the deal, I clicked "OK" in the customization dialog, which causes its current dialog geometry to be saved. I entered config again, and it was just like it was when I last clicked "OK".




Don't try this at home, but in the past while actively developing an oversized dialog, I had to do it this way:

Edit file "C:\Users\???\AppData\Roaming\calibre\gui.json " after making a safe backup copy (if you corrupt that file, Calibre will crash with no notice and no stated reason)

and delete:

Code:
, 
  "plugin config dialog:User Interface Action:Prince PDF": {
    "__class__": "bytearray", 
    "__value__": "AdnQywACAAAAAAA0AAAANAAABmEAAAL7AAAAPAAAAFMAAAZZAAAC8wAAAAAAAAAAB4A="
  }

then save.

That bit above is your saved window geometry for that dialog. Deleting it resets it to nothing, causing the "factory defaults" to kick in. You can then resize the dialog before clicking "OK" to save.

You should do it the easy way as I indicated in the first paragraph.




DaltonST
DaltonST is offline   Reply With Quote
Old 06-14-2016, 05:52 PM   #59
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 8,077
Karma: 6993173
Join Date: Mar 2012
Location: Sydney Australia
Device: none
What happens if you snap the window to maximum height? This solves a similar problem I have in Windows 10 with dialogues in a video editor.

BR
BetterRed is offline   Reply With Quote
Old 06-14-2016, 06:27 PM   #60
readin
Enthusiast
readin is on a distinguished road
 
Posts: 25
Karma: 50
Join Date: Apr 2016
Device: calibre
Quote:
Originally Posted by DaltonST View Post
I too have Windows 10, so I installed Prince PDF. Same issue as you. However, it was simply fixed by right-clicking the Windows Taskbar then clicking "Show Windows Stacked". To seal the deal, I clicked "OK" in the customization dialog, which causes its current dialog geometry to be saved. I entered config again, and it was just like it was when I last clicked "OK".
Thanks for installing the plugin to try it out.

I was able to view the entire dialog by stacking the windows as you suggested, but clicking OK didn't save the dialog size for me -- next time I opened it, it was too big again.

Quote:
Originally Posted by BetterRed View Post
What happens if you snap the window to maximum height?
If I just move the window around, sometimes it will show part of the bottom panel, as in the second screenshot here. When I drag the window up to the top of the screen, it appears to snap, but it actually makes the stylesheet panel longer, so that I can not see any of the bottom panel.

I also tried pressing <Windows logo key> + <Shift> + <Up Arrow>, which normally stretches a window to the top and bottom of the screen, but that has the same effect as dragging the window to the top of the screen. I also checked the system menu (upper left corner), but the dialog can't be maximized.

In any case, by hiding my Taskbar I was able to configure the plugin, but now I have a new problem:

My conversions are failing.

The logs for two books contained error messages similar to this:

Quote:
prince: loading XML input: %40public%40vhost%40g%40gutenberg%40html%40files%4 0100%40100-0.txt.html
prince: loading document: %40public%40vhost%40g%40gutenberg%40html%40files%4 0100%40100-0.txt.html
prince: %2540public%2540vhost%2540g%2540gutenberg%2540html %2540files%2540100%2540100-0.txt.html: error: can't open input file: No such file or directory
prince: warning: failed to load external entity "%2540public%2540vhost%2540g%2540gutenberg%2540htm l%2540files%2540100%2540100-0.txt.html"

prince: loading XML input: CR%21AQB922Y8V17J95CHM5ZN2RNHQ4NJ_split_000.html
prince: loading document: CR%21AQB922Y8V17J95CHM5ZN2RNHQ4NJ_split_000.html
prince: CR%2521AQB922Y8V17J95CHM5ZN2RNHQ4NJ_split_000.html : error: can't open input file: No such file or directory
prince: warning: failed to load external entity "CR%2521AQB922Y8V17J95CHM5ZN2RNHQ4NJ_split_000.htm l"
For another book, the only error message I could see was this:

Quote:
prince: Converting document...
prince: styles/XXXXXXXXXXXXXXXX: warning: cannot open resource
Unfortunately, I'm just not having much luck

calibre 2.58 [64bit] on Windows 10 Pro
readin is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 402 03-05-2017 10:31 AM
[GUI Plugin] EpubMerge JimmXinu Plugins 286 01-31-2017 09:33 PM
[GUI Plugin] Ex Libris AlPe Plugins 74 01-21-2017 02:38 AM
[GUI Plugin] Wordpress frescogamba Plugins 11 04-06-2015 09:09 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 10:52 PM.


MobileRead.com is a privately owned, operated and funded community.