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

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 04-30-2019, 09:00 AM   #1696
Sciamano
Member
Sciamano began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Mar 2011
Device: Kindle 3
EDIT: I downloaded the file again and now it works. It must have been a temporary network problem during the downloading of the file. Scratch the question below.

ORIGINAL MESSAGE:

Hello!
I have installed wine v4.00 on my Linux Mint 19 installation and tried launching k2pdfopt v2.51a 32-bit.
It won't run, instead a popup error message saying "Error - Access denied" will show up, immediately followed by a series of popups saying "Error - File not found".
Version 2.42 works, though.
Any insights? Should I stick with v2.42?
Thanks

Last edited by Sciamano; 04-30-2019 at 10:29 AM.
Sciamano is offline   Reply With Quote
Old 06-27-2019, 01:48 AM   #1697
MarjaE
Evangelist
MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.
 
Posts: 430
Karma: 1548692
Join Date: Jun 2015
Device: Iriver Story HD and Amazon Kindle DX
"Unexpected end of file" and "Invalid data type"

Hi,

I've been using k2 to pre-process my pdfs. I've also been using Calibre to organize them, track important topics, etc.

My pdf software on my computer often shows the wrong titles for these files, which makes it harder to keep track of things. I've tried using Calibre to copy its metadata to its copies of these book files, to get my pdf software to show the right titles.

But the import sometimes fails with k2 files, with either "unexpected end of file," or "invalid data type." I've tried creating a new copy from one of the originals, importing it into Calibre, and copying its metadata, and again, the same error.

Do you have any idea why some k2 pdfs might do this?

Thanks
MarjaE is offline   Reply With Quote
Old 06-28-2019, 10:28 AM   #1698
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 1,057
Karma: 8500441
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by MarjaE View Post
Hi,

I've been using k2 to pre-process my pdfs. I've also been using Calibre to organize them, track important topics, etc.

My pdf software on my computer often shows the wrong titles for these files, which makes it harder to keep track of things. I've tried using Calibre to copy its metadata to its copies of these book files, to get my pdf software to show the right titles.

But the import sometimes fails with k2 files, with either "unexpected end of file," or "invalid data type." I've tried creating a new copy from one of the originals, importing it into Calibre, and copying its metadata, and again, the same error.

Do you have any idea why some k2 pdfs might do this?

Thanks
@Marja--we've been through this before. You complain about the behavior of k2pdfopt but offer me no examples of source files that cause the problem. I cannot help you if you do not attach some examples. Please attach a file, that when you process it with k2pdfopt, results in "unexpected end of file" or "invalid data type". Please indicate the exact command-line options you are using to process the file, and also let me know what version of k2pdfopt you are using.
willus is offline   Reply With Quote
Old 06-30-2019, 06:38 AM   #1699
MarjaE
Evangelist
MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.
 
Posts: 430
Karma: 1548692
Join Date: Jun 2015
Device: Iriver Story HD and Amazon Kindle DX
Yes, we have been through this before. Unfortunately, the files I was keeping the best notes on are ones I'd bought and can't share, as before. I've been up all night trying to track down which of the others glitched out at the end.

But I am using -ui -mode copy -dev dx

Also -dev ? gives an error: "device profile '?' not known"

Is there a list of available profiles?

Thanks.
MarjaE is offline   Reply With Quote
Old 06-30-2019, 05:12 PM   #1700
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 1,057
Karma: 8500441
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by MarjaE View Post
Yes, we have been through this before. Unfortunately, the files I was keeping the best notes on are ones I'd bought and can't share, as before. I've been up all night trying to track down which of the others glitched out at the end.

But I am using -ui -mode copy -dev dx

Also -dev ? gives an error: "device profile '?' not known"

Is there a list of available profiles?

Thanks.
In linux or OSX, you have to put the ? in quotation marks:

k2pdfopt -dev "?"


(See response below.)


I sent you a PM.


Code:
Available devices:
    Kindle 1-5 (alias k2): 560 x 735, 167 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kindle DX (alias dx): 800 x 1180, 167 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,0,0

    Kindle Paperwhite (alias kpw): 658 x 889, 212 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kindle Paperwhite 2 (alias kp2): 718 x 965, 212 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kindle Paperwhite 3 (alias kp3): 1016 x 1364, 300 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kindle Voyage/PW3+/Oasis (alias kv): 1016 x 1364, 300 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kindle Oasis 2 (alias ko2): 1200 x 1583, 300 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Pocketbook Basic 2 (alias pb2): 600 x 800, 167 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Nook Simple Touch (alias nookst): 552 x 725, 167 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,0,0

    Kobo Touch (alias kbt): 600 x 730, 167 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kobo Glo (alias kbg): 758 x 942, 213 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kobo Glo HD (alias kghd): 1072 x 1328, 250 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kobo Glo HD Full Screen (alias kghdfs): 1072 x 1448, 250 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kobo Mini (alias kbm): 600 x 730, 200 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kobo Aura (alias kba): 758 x 932, 211 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kobo Aura HD (alias kbhd): 1080 x 1320, 250 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kobo H2O (alias kbh2o): 1080 x 1309, 265 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kobo H2O Full Screen (alias kbh2ofs): 1080 x 1429, 265 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4

    Kobo Aura One (alias kao): 1404 x 1713, 300 dpi
        Mark corners=0, Padding (l,t,r,b)=0,0,3,4

    Nexus 7 (alias nex7): 1187 x 1811, 323 dpi
        Mark corners=1, Padding (l,t,r,b)=0,0,3,4
willus is offline   Reply With Quote
Old 06-30-2019, 08:17 PM   #1701
MarjaE
Evangelist
MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.
 
Posts: 430
Karma: 1548692
Join Date: Jun 2015
Device: Iriver Story HD and Amazon Kindle DX
Thank you. I'm still trying to find free pdfs which are reliably-enough broken.
MarjaE is offline   Reply With Quote
Old 07-01-2019, 05:33 AM   #1702
MarjaE
Evangelist
MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.
 
Posts: 430
Karma: 1548692
Join Date: Jun 2015
Device: Iriver Story HD and Amazon Kindle DX
After several more tries, I finally processed the hardest of these files... so none are completely broken.

I don't know if it caused any of the trouble, but I uninstalled Malwarebytes for the time being.

Here is a free pdf which gave me a lot of trouble though: https://gallica.bnf.fr/ark:/12148/bpt6k6348270v (there's an option to download the book as a pdf.)

When running in the command line with -mode copy -dev dx, I was getting frequent seg faults. I still get some.

When running in the Mac Automator, I get other error messages, and the Automator still often drops out when the regular interface would keep going.
MarjaE is offline   Reply With Quote
Old 07-01-2019, 11:25 PM   #1703
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 1,057
Karma: 8500441
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by MarjaE View Post
After several more tries, I finally processed the hardest of these files... so none are completely broken.

I don't know if it caused any of the trouble, but I uninstalled Malwarebytes for the time being.

Here is a free pdf which gave me a lot of trouble though: https://gallica.bnf.fr/ark:/12148/bpt6k6348270v (there's an option to download the book as a pdf.)

When running in the command line with -mode copy -dev dx, I was getting frequent seg faults. I still get some.

When running in the Mac Automator, I get other error messages, and the Automator still often drops out when the regular interface would keep going.
Okay, well, I couldn't get any seg faults or other funny behavior with my version of k2pdfopt on that file with Windows 10, but there are several options you may want to use to help it fit your DX screen better and to improve the contrast and conversion speed. Try this, for example:

k2pdfopt -mode tm -m 0.8,0.8,0.8,1.5 -n- -dev dx -idpi 144 french_book.pdf

I attached this conversion for pages 50-70 of the book. Here's what each option does:

-mode tm Tells k2pdfopt to trim each page to eliminate wasted margin space and save each new source page to a new destination page.

-m 0.8,0.8,0.8,1.5 Cuts off 0.8 inches around each source page, 1.5 inches off the bottom edge.

-n- Turn off native output mode so k2pdfopt can change the contrast of each page.

-idpi 144 This is probably most important. It overrides k2pdfopt's default mode of doubling the device resolution for rendering the PDF pages. Without this, k2pdfopt will render each input page at 333 dpi, which slows things way down and uses lots more memory than necessary. The source file has bitmaps that are only 72 dpi, so 144 dpi for rendering them internally in k2pdfopt is plenty.
Attached Files
File Type: pdf french_book_k2opt.pdf (2.98 MB, 19 views)
willus is offline   Reply With Quote
Old 07-05-2019, 01:20 AM   #1704
MarjaE
Evangelist
MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.
 
Posts: 430
Karma: 1548692
Join Date: Jun 2015
Device: Iriver Story HD and Amazon Kindle DX
Thank you. With -idpi 144, it runs straight through.
MarjaE is offline   Reply With Quote
Old 07-19-2019, 12:19 AM   #1705
MarjaE
Evangelist
MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.
 
Posts: 430
Karma: 1548692
Join Date: Jun 2015
Device: Iriver Story HD and Amazon Kindle DX
I got a bit mixed-up about what was going wrong, it's not that these can't complete processing, it's that they give errors when imported into Calibre and when trying to import Calibre metadata into the pdf.

[I.S. -toc- seems to solve the problem. The version there uses -idpi and not -toc-]

-idpi 144 doesn't seem to help with that.

I've attached an excerpt of one of the French histories, run through

-ui -mode copy -dev dx -idpi 144 -o %s_k2opt144.pdf

-p 778-780

Last edited by MarjaE; 07-19-2019 at 02:16 PM.
MarjaE is offline   Reply With Quote
Reply

Tags
ebook apps, k5 tools, kindle tools, kindle touch, tools

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing PDFs with another font Font PocketBook 4 11-12-2010 08:27 AM
Viewing Textbook PDFs... NJReader enTourage Archive 4 08-17-2010 05:17 PM
PRS-600 Restart bug while viewing PDFs? conundrum Sony Reader 2 03-04-2010 08:46 PM
More on viewing pdfs dso371 Bookeen 8 03-11-2008 07:15 PM
Viewing Untagged PDFs on Palm T|X Eroica Reading and Management 3 12-10-2007 01:44 PM


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


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