05-28-2012, 10:02 AM | #226 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Thanks again Kovid.
(1) would mean more work for me than I want to deal with, (plus cross platform is a big problem I can't support) and (2) would likely involve a lag of months even if they did agree, leaving users stuck in the meantime. BTW if anyone else out there wants to raise the feature request to the poppler team on our behalf anyway please do so, I can't be bothered with mailing lists personally as a way of support. Option (3) of pypdf sounds a possibility, obviously it will be slower than pdfreflow but given that isn't an option any more it should hopefully still be faster than pdftohtml on the worst pdfs. I shall have to do some testing. Worst case it is going to be (4). Though I recall from some examples in the early days of this plugin calibre easily taking an hour or more to process the pdf which is not nice when all you want is to see if it has an ISBN - particularly if after all that time the PDF doesn't actually have one! |
05-28-2012, 11:03 AM | #227 |
creator of calibre
Posts: 43,870
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I just committed code that will allow you to use podofo to extract the pages, which should be pretty fast. You will need to wait till the next binary calibre release to actually use the code, since it involved making additions to the podofo C bindings in calibre.
|
Advert | |
|
05-28-2012, 12:14 PM | #228 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Thanks Kovid.
I had started doing some testing with pyPdf (and now pdofo as well, for the latter I am doing nothing but calling open at this point obviously). It is interesting that unlike pdftohtml & pdfreflow, both pyPdf and podofo choke on an epub which has security applied to it. pyPdf throws a DRMError. podofo spits an *enormous* # of console lines out all saying like this: 3 m_nPredictor=12 m_nCurPredictor=12 before throwing an exception of: ePdfError_UnsupportedFilter Any way of preventing the console output? Still working out which is the least evil combination as yet |
05-28-2012, 12:29 PM | #229 |
creator of calibre
Posts: 43,870
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
05-29-2012, 03:02 PM | #230 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@Kovid - was there any particular reason why you are steering me towards podofo rather than pyPdf? Is it purely performance? As the pyPdf API (with a DRMError) and not having to fork a console make it a bit nicer to use. Plus I can reverse order the back pages which might make a difference for a small # of books to reliability of match.
Obviously once 0.8.54 is released I will do my own testing to see how significant the performance difference is. The reality is that I just need to grab 10 front and 5 back pages so it may not be that significant? @everyone else - just to summarise if you hadn't guessed already from all the techy speak, this plugin is broken using calibre 0.8.53. I have a fixed version here ready to go, but it needs calibre 0.8.54. I should be able to release it by this weekend I would assume, so either avoid using the plugin until then or use 0.8.52 in the meantime... |
Advert | |
|
05-29-2012, 03:33 PM | #231 |
creator of calibre
Posts: 43,870
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
pypdf hangs (as in goes into an infinite loop) on some PDF files. So really if you want to use it you should be running it in a worker process anyway. That's why calibre uses podofo rather than pypdf to set pdf metadata.
|
05-29-2012, 03:39 PM | #232 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Thanks for the warning, that sounds like it is best avoided then, darn it.
|
06-01-2012, 12:47 PM | #233 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Beta for next version - requires calibre 0.8.54
As posted above, this plugin has been broken for PDF scanning due to a change made in calibre 0.8.53. So users have either had to stick to earlier versions, or learn not to extract from PDFs .
Attached is my next intended version which requires calibre 0.8.54 - it would be appreciated if someone could give it a quick whirl before I officially release it. I believe there is still a very slim chance in exceptional circumstances that scanning a PDF could still cause a calibre crash. I haven't had this happen, but in theory it could do. However when the next calibre 0.8.55 is available some code I have already included in this plugin version will automatically become active and safely handle that situation without crashing. I didn't want users to be stuck waiting for another week for the sake of something they probably won't have happen. Please can one or two of you try this and let me know on the thread if any issues, then I will officially release it. Last edited by kiwidude; 06-03-2012 at 08:10 AM. Reason: Removed attachment as officially released |
06-03-2012, 08:12 AM | #234 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
v1.4.2 Released
Changes in this release:
Anyone who tried the beta version above, please make sure you force an update to this officially released version (has the same version number). |
06-03-2012, 11:50 AM | #235 |
Grand Sorcerer
Posts: 12,177
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
I might be pedantic but I am confused by these entries in the change log...
Surely no users on calibre 0.8.51 can install this version to get the reduced computation fix.. |
06-03-2012, 11:54 AM | #236 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Yes you are being pedantic . The performance change Kovid made was in calibre 0.8.51, and that *was* going to be the minimum version for the next release of this plugin. Then 0.8.53 came out, broke the PDF extraction so I delayed releasing and the new minimum is now 0.8.54, with 0.8.55 preferred when it gets released this week.
|
06-10-2012, 03:02 PM | #237 |
Groupie
Posts: 199
Karma: 76476
Join Date: Feb 2012
Location: Poland
Device: none
|
I'm so glad to see your plugin working again! Thank you!
And one little improvement idea: I guess plugin authors cannot change anything in the "Edit metadata" dialog but there is one thing that has been bugging me for quite a long time: I would love to have a little "Extract ISBN" button next to the IDs row in "Edit metadata" (right next to "Clear IDs" or "Paste the contents..."). It's not doable, though, is it? This would be great as I would often go to the "Edit metadata" dialog, than realize there is no ISBN for a given book, close the dialog, extract ISBN and open the "Edit metadata" dialog once again... not very practical. |
06-10-2012, 03:42 PM | #238 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@Joanna, no it is not currently possible. There is no provision in calibre to enable launching a plugin from the edit metadata dialog, only from the main toolbars or context menu.
All I can suggest is having a custom column to display isbn or having a look at the book details panel on the right before opening the edit metadata window. |
06-10-2012, 04:11 PM | #239 |
Groupie
Posts: 199
Karma: 76476
Join Date: Feb 2012
Location: Poland
Device: none
|
Thanks, that's what I thought . It's a pity, Extract ISBN should be a built-in Calibre feature .
Thanks for the tips; unfortunately I don't have enough space to have ISBN shown as a custom column or in book details. My workaround consists of trying to extract ISBN before I even go to the "Edit metadata" dialog . |
06-15-2012, 10:10 PM | #240 |
Connoisseur
Posts: 56
Karma: 1234
Join Date: Apr 2011
Device: kindle
|
can i ask a reallllllly silly question? what is the main benefit of extracting an isbn? is it so you can then easier grab proper metadata?
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extract ISBN from PDF? | mdroberts | Calibre | 14 | 12-16-2016 07:32 AM |
[Old Thread] Extract ISBN from file name | ChristianQ | Calibre | 59 | 12-09-2015 05:08 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |
[Old Thread] Auto Extract ISBN-Feature request | UnraisedArc | Calibre | 60 | 03-23-2011 09:31 AM |
Displaying ISBN column in the main GUI | tilleydog | Library Management | 26 | 02-25-2011 04:08 AM |