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 09-03-2010, 10:51 AM   #31
Pranananda
Connoisseur
Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.
 
Pranananda's Avatar
 
Posts: 98
Karma: 122982
Join Date: Apr 2010
Location: Humboldt County, California
Device: ipad, iPod touch, JetBook Lite
Paolo,

If you are running under Linux, the lowercase pdfreflow command should run the command line interface. The GUI is in PDFReflow.jar, and requires you to run it as:

java -jar PDFReflow-0.8.6.1.jar

Could it be that you have another pdfreflow command? In the terminal, type:

which pdfreflow
type pdfreflow

to see the full path of the the command line.

If you created a shell script to invoke the GUI, this could be the problem. The lowercase pdfreflow command must be in your path, and it must the the command line version.
Pranananda is offline   Reply With Quote
Old 09-03-2010, 03:46 PM   #32
amoroso
Groupie
amoroso ought to be getting tired of karma fortunes by now.amoroso ought to be getting tired of karma fortunes by now.amoroso ought to be getting tired of karma fortunes by now.amoroso ought to be getting tired of karma fortunes by now.amoroso ought to be getting tired of karma fortunes by now.amoroso ought to be getting tired of karma fortunes by now.amoroso ought to be getting tired of karma fortunes by now.amoroso ought to be getting tired of karma fortunes by now.amoroso ought to be getting tired of karma fortunes by now.amoroso ought to be getting tired of karma fortunes by now.amoroso ought to be getting tired of karma fortunes by now.
 
amoroso's Avatar
 
Posts: 185
Karma: 1004070
Join Date: Jul 2010
Location: Italy
Device: Kindle for Android, Google Play Books
Quote:
Originally Posted by Pranananda View Post
If you created a shell script to invoke the GUI, this could be the problem. The lowercase pdfreflow command must be in your path, and it must the the command line version.
I did two mistakes: 1) I forgot to download pdfreflow 2) I created a shell script named pdfreflow that run the PDFReflow JAR. Installing pdfreflow and renaming the script solved my problem. PDFReflow works great, thanks.
amoroso is offline   Reply With Quote
Advert
Old 11-02-2010, 03:55 PM   #33
Raulnuto
Junior Member
Raulnuto began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2010
Device: PRS-650
Hello, is there any other tool which supports also pictures? pdfreflow simply removes them...

Thanks a lot, I found the information here very useful
Raulnuto is offline   Reply With Quote
Old 12-19-2010, 10:46 PM   #34
Francesco
Aficionado
Francesco will become famous soon enoughFrancesco will become famous soon enoughFrancesco will become famous soon enoughFrancesco will become famous soon enoughFrancesco will become famous soon enoughFrancesco will become famous soon enoughFrancesco will become famous soon enough
 
Francesco's Avatar
 
Posts: 391
Karma: 710
Join Date: Jul 2003
Location: Denver, CO, USA
Device: Nexus 7, Kindle Touch
pdfReflow + calibre = good job!
pdfReflow does a great job removing headers. Even though the result might not be too pleasing to the eye (I opened the resulting html in OpenOffice and didn't like what I saw: quite a few different font sizes, lots of space between paragraphs, etc), Calibre produced a quite decent document. This is cool stuff, hanks!

By the way, I used the GUI, haven't tried the command line.
Francesco is offline   Reply With Quote
Old 01-27-2011, 08:55 PM   #35
michaelbr
Connoisseur
michaelbr began at the beginning.
 
michaelbr's Avatar
 
Posts: 77
Karma: 10
Join Date: Aug 2010
Location: Murcia/Spain
Device: Android 12
Hi Pranananda,
Thanks for this great job. I think I found two bugs in your pdfreflow, could you please confirm it or tell where I can report it? One suggestion, if you can leave the open file button stays at the last location, it'll be great (when you have some spare time, of course, this is just a nice feature).
1) There's a </body> at the top of generated html file, I think this should be an opening instead of closing <body> (almost at the end, there's another </body>).
2) Sometimes there's missing </p>. For instances, the chapter sometimes has a closing </p> tag, sometime it's missing (so 2 paragraphs close by are merged together, this seems random).
michaelbr is offline   Reply With Quote
Advert
Old 01-30-2011, 04:20 PM   #36
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Is the source code available anyplace?

Hi,

Just found pdfreflow and was amazed at how good a job it does using the additional xml information available from the pdftohtml program.

I would very much like to see/study the source code to see if inter-paragraph spacing can be improved and how you detect paragraph starts but the svn command on sourceforge produces nothing.

svn co https://pdfreflow.svn.sourceforge.net/svnroot/pdfreflow pdfreflow

Is there a tar.gz version of the latest java source available someplace? Or a new place to checkout the code from?

Very nice work btw!

KevinH
KevinH is offline   Reply With Quote
Old 02-01-2011, 12:05 AM   #37
Pranananda
Connoisseur
Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.
 
Pranananda's Avatar
 
Posts: 98
Karma: 122982
Join Date: Apr 2010
Location: Humboldt County, California
Device: ipad, iPod touch, JetBook Lite
@michaelbr, thanks for the bug report. I will incorporate bug fixes you reported into the next version of pdfreflow.
Pranananda is offline   Reply With Quote
Old 02-01-2011, 12:08 AM   #38
Pranananda
Connoisseur
Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.Pranananda is often consulted by the I Ching.
 
Pranananda's Avatar
 
Posts: 98
Karma: 122982
Join Date: Apr 2010
Location: Humboldt County, California
Device: ipad, iPod touch, JetBook Lite
@KevinH,

The source code for the command line is on sourceforge, and there is a link to the source code on the original post. I haven't put the Java code out there, because the building procedure is so different for the Mac and Windows platform. But all the logic is in the command line, so you can just replace the command line program with the source that is available that the GUI is using (though this doesn't allow you to change the GUI, I realize).
Pranananda is offline   Reply With Quote
Old 02-04-2011, 11:22 PM   #39
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Hi,

Okay, I found the C source code for pdfreflow and looked it over, very nice job!

Do you have any plans to convert your styles from absolute margins using "px" values to relative values using either "em" or "%" as the default?

Given the page width in px is available, it would seem to be possible to scale things just before writing it to the file replacing margin-left px (and margin-right if needed) with % of width. This would allow better reflowing on smaller devices since larger fixed px margins can be a real pain for many mobile devices. If you change it just when written to the file it should change nothing else internally so no other code need change.

Is the style Rect r.width for a paragraph aware/set at all by the page width or is it simply the width of the text in the paragraph? What would be the easiest way to access the page width in the htmlprintstyle routine to make the conversions?

Thanks,

KevinH
KevinH is offline   Reply With Quote
Old 11-02-2011, 10:48 PM   #40
Kevin8or
Guru
Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.
 
Kevin8or's Avatar
 
Posts: 977
Karma: 43409226
Join Date: Sep 2011
Location: Bay Area, CA
Device: Kindle 3
I'm really pleased by pdftohtml + pdfreflow. Thank you. The programs handle individual files beautifully, but I've not been able to batch process files.

If I enter "pdftohtml -xml *.pdf", I receive "Error: Couldn't open file '*.pdf': Invalid argument."

If I enter "pdfreflow --top=36 --bottom=743 *.xml", the application processes the first file it encounters, and stops.

I have very little experience at the command line. Am I doing something wrong?
Kevin8or is offline   Reply With Quote
Old 11-03-2011, 08:16 AM   #41
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Kevin8or,

Probably best to use a for-loop, e.g., on mac or linux:

Code:
for file in *.pdf ; do pdftohtml -xml "$file" ; done
(Can't remember the right syntax for Windows off the top of my head, but I'll look it up if need be.)
frabjous is offline   Reply With Quote
Old 11-03-2011, 08:26 AM   #42
Kevin8or
Guru
Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.
 
Kevin8or's Avatar
 
Posts: 977
Karma: 43409226
Join Date: Sep 2011
Location: Bay Area, CA
Device: Kindle 3
Ah, cool .. Eh, no joy, but you've given me an avenue of exploration. Thankyou.

Edit: In my Windows XP reference, in a table of batch commands, the syntax is listed as:

Quote:
for %%var in (set)
do [cmd] %%var
I made a .bat file with this:
Quote:
for %%var in *.pdf
do pdftohtml -xml %%var
It didn't work, unsurprisingly. I assume I need to replace %%var with something related to the real names of the files I'm using, which are "RT01.pdf", "RT02.pdf", & "RT03.pdf". (I have more pdf files to do, but these are the ones I'm using for practice.)

Last edited by Kevin8or; 11-03-2011 at 08:42 AM.
Kevin8or is offline   Reply With Quote
Old 11-03-2011, 09:14 AM   #43
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
My best guess is something like (all one line)
Code:
for %%I in (*.pdf) do pdftohtml -xml "%%I"
Or a single % in both instances if typing in at the command prompt. I don't use Windows so I can't test that.
frabjous is offline   Reply With Quote
Old 11-03-2011, 09:21 AM   #44
Kevin8or
Guru
Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.Kevin8or ought to be getting tired of karma fortunes by now.
 
Kevin8or's Avatar
 
Posts: 977
Karma: 43409226
Join Date: Sep 2011
Location: Bay Area, CA
Device: Kindle 3
You hit the mark! This did it:
Quote:
for %I in (*.pdf) do pdftohtml -xml "%I"
Out of curiosity, what does the "I" stand for? I mean, why not "A" or "T"?

You've made my day frabjous. Thank you so much.
Kevin8or is offline   Reply With Quote
Old 11-03-2011, 09:22 AM   #45
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
It's just the name of variable. You can make it A or T or whatever you want.
frabjous is offline   Reply With Quote
Reply

Tags
pdf, reflow, utility

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
<pre> tags and no text reflow in EPUB sergio blum Calibre 24 10-14-2010 08:07 PM
What is the best reader read real reflow PDF ( not refow text ) ? familyhandh Which one should I buy? 1 08-05-2010 08:44 AM
Help with reflow text file siulayhumga Workshop 9 07-31-2010 06:36 PM
80-column text reflow - Hanlin V3 elewton Other formats 1 02-10-2009 05:00 AM
Now that the Sony 505 can reflow PDFs ... mollybo Sony Reader 6 07-27-2008 11:29 PM


All times are GMT -4. The time now is 06:15 AM.


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