Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 10-23-2014, 03:19 PM   #931
rodgerx
Junior Member
rodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 2
Karma: 12698
Join Date: Oct 2014
Device: Aura H2O
region/column

Hi, Willus

thanks for your excellent job!

I have one question about the priority of region and column, for example, I have two columns in pdf like this:

"item1" on the left(middle justification vertically) corresponds to several lines of description on the right,
then "item2" on left and its descitipon on right, so and so on.

how to make each item and its description a region first, and then, make it two columns whithin each region?

I can make the regions right by setting col as 1, when setting col as 2, looks that the column selection has higher priority than region selection. the result was 2 big columns and there were regions within the right column, thus there seemed no way to achieve the following result from reflow:

"item1"
its description...

"item2"
its description..

..

I used the windows GUI, -wrap+ -vb -2 -sm -ocr t -p 156 -odpi 265 -h 1300 -w 1000 -ws 0.15
also with additional options -vb 1.1 -ch 0.01 -crgh 0.01 (tried different values)

thanks
Rodger
rodgerx is offline   Reply With Quote
Old 10-23-2014, 08:30 PM   #932
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,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by rodgerx View Post
I have one question about the priority of region and column, for example, I have two columns in pdf like this:

"item1" on the left(middle justification vertically) corresponds to several lines of description on the right,
then "item2" on left and its descitipon on right, so and so on.

how to make each item and its description a region first, and then, make it two columns whithin each region?

I can make the regions right by setting col as 1, when setting col as 2, looks that the column selection has higher priority than region selection. the result was 2 big columns and there were regions within the right column, thus there seemed no way to achieve the following result from reflow...
@Rodger -- Welcome to MR forums. Thank you for your post. It would really help to have an actual example of the PDF source file so that I could experiment with the settings and see exactly what the gaps are between the "items" that you refer to. You might want to experiment with my -nl and -nr options which are intended to handle notes in the margins of books but might work for this case depending on the spacings between sections. You are right, though, that breaking up into columns is the higher priority than breaking into top / bottom regions. Let me review how the column logic works--I may be able to add a user-specified parameter that would relatively easily do what you want, but again, it would help to see your source PDF.
willus is offline   Reply With Quote
Old 10-24-2014, 04:15 PM   #933
rodgerx
Junior Member
rodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterrodgerx can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 2
Karma: 12698
Join Date: Oct 2014
Device: Aura H2O
Hi, Willus

thanks for the quick help. Sometimes there's just no way to automate a particular page unless certain human intervene can be introduced

I have a wish, not a request
It would be great that there is a cfg file for converting each pdf file including the global options and also options for particular pages. The GUI can provide a button ("preview next original page"). This way we can still go over most pages of the pdf quickly(just a glance) and can pause for few pages to change the options which will be written to the cfg file. This provides the WYSIWYG to certain extent and saves lots of manual work.

thanks again for your great job!
Rodger
rodgerx is offline   Reply With Quote
Old 10-25-2014, 11:49 AM   #934
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,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by rodgerx View Post
...It would be great that there is a cfg file for converting each pdf file including the global options and also options for particular pages. The GUI can provide a button ("preview next original page"). This way we can still go over most pages of the pdf quickly(just a glance) and can pause for few pages to change the options which will be written to the cfg file. This provides the WYSIWYG to certain extent and saves lots of manual work...
The capability is effectively there to do this already, although it's not quite as automated as you might like. You could do various sets of pages that need to be treated differently in the GUI and copy and paste the command-line options to a batch file for each set of pages. You could then run the batch file and stitch the outputs together with something like jpdftweak or PDFSAM.
willus is offline   Reply With Quote
Old 10-30-2014, 05:01 AM   #935
jdofo
Junior Member
jdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic something
 
Posts: 3
Karma: 18818
Join Date: Nov 2013
Device: Kindle Paperwhite
Hey Willus! I wrote you quite a while ago, I totally forgot to reply... I have included my previous post below:

--------------------------------------------------------------------------
Hi Willus!

Thank you very much for your effort making your program, even for free. It's a magnificent idea!

Anyway, I don't know why but I can't make it work correctly for a Kindle PaperWhite. The new optimised pdf looks fine in the computer after the program conversion (choosing Kindle PaperWhite as the device within your program; last version from November), but when I try to read it in my device, it's at low resolution and with the right margin distorted. Unfortunately, it makes it unreadable. What am I doing wrong?

Thank you very much in advance for the feedback!

Cheers and keep up the good work

P.S.1: I got the same error with the previous version (September, if I'm not mistaken).
P.S.2: I have attached all the files you required me. I had cropped it with Briss, but the result was the same without using it.
--------------------------------------------------------------------------
Attached Thumbnails
Click image for larger version

Name:	Kindle Paperwhite_IMG_20141030_192644.jpg
Views:	353
Size:	653.7 KB
ID:	130335   Click image for larger version

Name:	Kindle Paperwhite_IMG_20141030_192604.jpg
Views:	361
Size:	1.40 MB
ID:	130336   Click image for larger version

Name:	k2pdfopt_distorted_config.jpg
Views:	355
Size:	111.6 KB
ID:	130337  
Attached Files
File Type: pdf Source file_Water-Food-Nexus Report.pdf (4.73 MB, 836 views)
File Type: pdf Water-Food-Nexus Report_cropped_k2opt.pdf (13.36 MB, 344 views)
jdofo is offline   Reply With Quote
Old 10-30-2014, 11:20 PM   #936
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,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
@jdofo -- There are a couple issues here. The first issue is that you appear to have uncovered a bug in k2pdfopt where the -c (color output) option inadvertently keeps k2pdfopt from putting tiny dots at the corners of the page (done by the -mc option). These tiny dots get the kindle to correctly fit the page to its screen. But since you're using a kindle paperwhite, you should just turn off the color output. That should fix your problem. In the mean time I'll get that bug fixed for the next release.

The second issue is that you don't need to turn on OCR for your particular example. Your source PDF already has a text layer, and this will automatically be passed on to the k2pdfopt output by default. Turning on OCR (with Tesseract) only slows down the processing significantly.

Let me know if turning off the color output fixes your issue.
willus is offline   Reply With Quote
Old 10-31-2014, 10:08 PM   #937
jdofo
Junior Member
jdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic somethingjdofo has a certain pleonastic something
 
Posts: 3
Karma: 18818
Join Date: Nov 2013
Device: Kindle Paperwhite
It's definitely fixed!!! Wow, thank you very much Willus, you're very skillful. Thank you also for the quick reply and sorry for this long delay. Cheers and have a good day!
jdofo is offline   Reply With Quote
Old 11-02-2014, 08:13 AM   #938
agelos100
Enthusiast
agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!
 
Posts: 29
Karma: 100000
Join Date: Oct 2013
Device: kindle
Margins at either side

Hello Willus,

I have a problem with the file attached.

I cannot get rid of the margins at the sides of the page. (If I open input file on kindle, I also get quite large margins)

I have k2pdfopt v2.21 and options:

-dev kpw -mode fw -ls-

Thank you in advance!

Angelos
Attached Files
File Type: pdf Input.pdf (1.42 MB, 238 views)
File Type: pdf Input_k2opt.pdf (1.41 MB, 415 views)
agelos100 is offline   Reply With Quote
Old 11-02-2014, 10:09 AM   #939
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,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by agelos100 View Post
...
I cannot get rid of the margins at the sides of the page. (If I open input file on kindle, I also get quite large margins)

I have k2pdfopt v2.21 and options:

-dev kpw -mode fw -ls-
...
Sumatra PDF reader indicates that your source PDF is only 3 x 4 inches in size (Ctrl-D in Sumatra to get the dimensions). This is the issue. Add -ds 2 to your command-line (or put in the "Additional Options" box in the MS Windows GUI). This will make k2pdfopt think your document is twice as large -- 6 x 8 inches, and it will then fit it correctly to your kindle's screen when it processes it.
willus is offline   Reply With Quote
Old 11-02-2014, 10:16 AM   #940
agelos100
Enthusiast
agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!agelos100 rocks like Gibraltar!
 
Posts: 29
Karma: 100000
Join Date: Oct 2013
Device: kindle
Quote:
Originally Posted by willus View Post
Sumatra PDF reader indicates that your source PDF is only 3 x 4 inches in size (Ctrl-D in Sumatra to get the dimensions). This is the issue. Add -ds 2 to your command-line (or put in the "Additional Options" box in the MS Windows GUI). This will make k2pdfopt think your document is twice as large -- 6 x 8 inches, and it will then fit it correctly to your kindle's screen when it processes it.

Thank you Willus!
agelos100 is offline   Reply With Quote
Old 11-21-2014, 03:51 AM   #941
rzykov
Junior Member
rzykov began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2014
Device: Kindle PaperWhite
Segmentation fault on Mac

Hello Willus,

Thank you for excellent tool!
But sometimes the process of conversion is failed with message like this one:

SOURCE PAGE 153 of 362 (8.3 x 11.7 in) ... Segmentation fault: 11

after restarting the process it failed at another page:

SOURCE PAGE 258 of 362 (8.3 x 11.7 in) ... warning: freetype could not find any cmaps
Segmentation fault: 11


It depends on the command line settings. For example, with Kindle failed, with Kindle Paperwhite works OK.


My version is
k2pdfopt v2.21 (w/MuPDF,DjVuLibre,OCR) (c) 2014, GPLv3, http://willus.com
Compiled Jul 25 2014 with Gnu C v4.2.1 for OS/X on x64.
MAC OSX Maverics

I could share with you my example of pdf file.
rzykov is offline   Reply With Quote
Old 11-24-2014, 08:58 PM   #942
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,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by rzykov View Post
Hello Willus,

Thank you for excellent tool!
But sometimes the process of conversion is failed with message like this one:

SOURCE PAGE 153 of 362 (8.3 x 11.7 in) ... Segmentation fault: 11

after restarting the process it failed at another page:

SOURCE PAGE 258 of 362 (8.3 x 11.7 in) ... warning: freetype could not find any cmaps
Segmentation fault: 11


It depends on the command line settings. For example, with Kindle failed, with Kindle Paperwhite works OK.


My version is
k2pdfopt v2.21 (w/MuPDF,DjVuLibre,OCR) (c) 2014, GPLv3, http://willus.com
Compiled Jul 25 2014 with Gnu C v4.2.1 for OS/X on x64.
MAC OSX Maverics

I could share with you my example of pdf file.
@rzykov -- Sorry for the late reply. Yes, if you could post the PDF or send it to me via a private message that would be helpful--along with the setting that caused the fault. Then I can try to reproduce the error on my system.
willus is offline   Reply With Quote
Old 11-26-2014, 10:06 PM   #943
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,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
k2pdfopt v2.30 released

K2pdfopt v2.30 is released. It now has wide character support (UTF-16) in Windows for file names (e.g. it should work with file names that have Chinese or other non-8-bit characters). There are a few other new features and bug fixes. See the web site for details.
willus is offline   Reply With Quote
Old 11-27-2014, 01:23 PM   #944
jldg
Junior Member
jldg began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2013
Location: france
Device: koboglo
text reflow not very good

hello
thank you a lot for "k2opt", I can read Paths pdf on koboglo. result is generally good enough without fine tuning.
but with this simple one column text, result is not confortable to read, due to reflow. lines are splitted, but not joined...
you can see on the second page of the attached pdf..
would it be possible to suppress all "line break" which are at the right side of the text zone??

Thank you in advance!
-dev kbg -o %s_k2
-om 0.1
-dev kbg -dr 1 -mb 0.1 -mt 0.1 -ml 0.1 -mr 0.1
Attached Files
File Type: pdf ethnomusic_p2.pdf (41.0 KB, 211 views)
File Type: pdf ethnomusic_p2_k2.pdf (129.6 KB, 217 views)
jldg is offline   Reply With Quote
Old 11-27-2014, 07:23 PM   #945
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,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by jldg View Post
hello
thank you a lot for "k2opt", I can read Paths pdf on koboglo. result is generally good enough without fine tuning.
but with this simple one column text, result is not confortable to read, due to reflow. lines are splitted, but not joined...
you can see on the second page of the attached pdf..
would it be possible to suppress all "line break" which are at the right side of the text zone??

Thank you in advance!
-dev kbg -o %s_k2
-om 0.1
-dev kbg -dr 1 -mb 0.1 -mt 0.1 -ml 0.1 -mr 0.1
@jldg -- What version of k2pdfopt are you using? When I try your source file with the latest version (v2.30), it comes out nicely (see attached). Also, -dr 1 is the default, so you don't need to specify that option.
Attached Files
File Type: pdf ethnomusic_p2_k2opt.pdf (231.0 KB, 190 views)
willus is offline   Reply With Quote
Reply

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


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 01:29 PM.


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