09-03-2010, 10:51 AM | #31 |
Connoisseur
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. |
09-03-2010, 03:46 PM | #32 |
Groupie
Posts: 185
Karma: 1004070
Join Date: Jul 2010
Location: Italy
Device: Kindle for Android, Google Play Books
|
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.
|
Advert | |
|
11-02-2010, 03:55 PM | #33 |
Junior Member
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 |
12-19-2010, 10:46 PM | #34 |
Aficionado
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. |
01-27-2011, 08:55 PM | #35 |
Connoisseur
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). |
Advert | |
|
01-30-2011, 04:20 PM | #36 |
Sigil Developer
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 |
02-01-2011, 12:05 AM | #37 |
Connoisseur
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.
|
02-01-2011, 12:08 AM | #38 |
Connoisseur
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). |
02-04-2011, 11:22 PM | #39 |
Sigil Developer
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 |
11-02-2011, 10:48 PM | #40 |
Guru
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? |
11-03-2011, 08:16 AM | #41 |
Wizard
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 |
11-03-2011, 08:26 AM | #42 | ||
Guru
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:
Quote:
Last edited by Kevin8or; 11-03-2011 at 08:42 AM. |
||
11-03-2011, 09:14 AM | #43 |
Wizard
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" |
11-03-2011, 09:21 AM | #44 | |
Guru
Posts: 977
Karma: 43409226
Join Date: Sep 2011
Location: Bay Area, CA
Device: Kindle 3
|
You hit the mark! This did it:
Quote:
You've made my day frabjous. Thank you so much. |
|
11-03-2011, 09:22 AM | #45 |
Wizard
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.
|
Tags |
pdf, reflow, utility |
Thread Tools | Search this Thread |
|
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 |