![]() |
#1 |
Reader of the Reader
![]() ![]() Posts: 103
Karma: 107
Join Date: Apr 2006
Device: Sony Reader PRS-500
|
PDFRead on Mac OS X -- PDFRasterFarian for OS X!
ashkulz's amazing PDFRasterFarian-style program named PDFRead is working on Mac OS X 10.4! See his post for details on PDFRead.
I have only tested PDFRead on Mac OS X, and only when generating files for the Sony Reader. Here is how to get it working on Mac OS X 10.4: Before you do anything, you should have Apple's developer tools installed ( http://developer.apple.com/tools/ ). First, download the latest 2.4.3 python from http://www.python.org/download/releases/2.4.3/ The Mac OS X installer application puts a big "MacPython 2.4" folder in your applications folder. Go into that folder and double-click the "Update Shell Profile.command" file. Next, install pdftk ( http://www.pdfhacks.com/pdftk/#packages ) Now install fink from http://finkproject.org/ After fink is installed, type this into the command line (the Terminal application): Code:
sudo apt-get install xpdf imagemagick ghostscript ghostscript-fonts cd into the directory of the source code you just downloaded, then run this command: Code:
sudo python setup.py install https://sourceforge.net/project/show...ckage_id=91453 Extract it somewhere. The above directory will contain a command line program in Python, so you can execute it via: Code:
python src/pdfread.py <options> pdf-file If your not running python 2.5, download the ElementTree library from here: http://effbot.org/downloads/elementt...0050316.tar.gz and extract it and copy the folder 'elementtree' to the same location as pdfread.py. The last step is to download the file named "pdfread_py.txt" that is attached to this message and rename it to pdfread.py and replace the original pdfread.py file with it. Now your done! See ashkulz's original post for details about PDFRead! Last edited by sammykrupa; 04-06-2007 at 11:06 AM. |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: May 2007
Device: 9300
|
problem in executing the command the $ apt-get install ghostscript
sir i am using mac os i have install the fink and xcopy so know next step is to
execute the command $ apt-get install ghostscript i am getting the error as command not found what may be the problem |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Reader of the Reader
![]() ![]() Posts: 103
Karma: 107
Join Date: Apr 2006
Device: Sony Reader PRS-500
|
Ashkulz,
I myself am not able to install the new version. The png image proccessor is Intel-mac-only. That is as far I was I was able to get in the installiation. |
![]() |
![]() |
![]() |
#4 | ||
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#5 |
Reader of the Reader
![]() ![]() Posts: 103
Karma: 107
Join Date: Apr 2006
Device: Sony Reader PRS-500
|
I think I will wait for 1.8.
Thanks! Sam Krupa |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Nov 2008
Device: PRS505, Kindle
|
Problem with installation
Hi there:
First of all, many thanks to all of you for contributing to this forum. I've been lurking here for quite some time trying to learn as much as I can. I just acquired a Kindle and was looking for a better method to transferring my pdfs to the Kindle. Per this thread, I was able to install all of the packages. However, I keep on getting an error and only the first page gets processed. The error I get is the following: Temporary directory: /var/folders/mA/mAM-fCWAFOaq2F68laHB0E+++TI/-Tmp-/pdfread-JwOKDk Page 1/39: EXTRACT RASTERIZE CROP DILATE SAVE Traceback (most recent call last): File "/Users/john/Desktop/src/pdfread.py", line 207, in <module> main() File "/Users/john/Desktop/src/pdfread.py", line 84, in main options.unpaper_args, options.no_crop, options.no_dilate) File "/Users/john/Desktop/src/pdfread.py", line 63, in convert output.add_page(page, mode_tranform(image)) File "/Users/john/Desktop/src/common.py", line 153, in add_page self.downsample(image, filename) File "/Users/john/Desktop/src/common.py", line 163, in downsample call('pngnq', '-fs', '1', '-n', str(self.colors), 'page.png') File "/Users/john/Desktop/src/common.py", line 201, in call stderr = subprocess.STDOUT) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/subprocess.py", line 593, in __init__ errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/subprocess.py", line 1079, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory MacBook:src john$ I did notice that although I installed Python 2.6, only 2.5 is reflected here. Other than that, I can't figure out why this is not working with OS X. Anyone more knowledgeable can offer any insights? I've spent all day trying to figure this out and I want to fling my MacBook out the window (but can't because its new!) ![]() I notice that some of the directions are unclear (some say to install pngnq and the latest pdfread source code does not make any mention of it) |
![]() |
![]() |
![]() |
#7 | |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
![]() For clearer and hopefully better install instructions, see the thread PDFRead 1.8.2 released! and in particular the thread PDFRead 1.8.2 working on Mac OS X. ![]() Please report back if this works for you. Enquiring minds want to know... ![]() p.s. and welcome to Mobileread.com! |
|
![]() |
![]() |
![]() |
#8 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Nov 2008
Device: PRS505, Kindle
|
Nick:
Thanks for the prompt reply. I've actually been bouncing between this thread and the other two you posted and I still have the error. I have the Apple Developer Tool installed. I downloaded the latest Python (2.6) I installed pdktk I downloaded pngnq (how does this get installed - just curious) Installed fink and downloaded all packages as instructed downloaded PIL and installed it downloaded the latest PDFRead source from here and followed the directions I'm a bit dumbfounded as to what I could be doing wrong .... should I post this on the newer thread instead of here? Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Dec 2008
Device: Cybook
|
PDFread 1.8 on Mac Leopard
Hi! I am trying to install PDFread on my Mac running Leopard, and I have the same issue as described above (two messages above!). Has anyone solved this issue for Mac? Any success story? :-)
Thanks! M. |
![]() |
![]() |
![]() |
#10 | |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
![]() If you are installing PDFRead 1.8, then you need to follow the Mac OS X instructions in the thread PDFRead 1.8.2 working on Mac OS X. This is an old thread with an older version of PDFRead. Please post in the newer threads in the links provided. |
|
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 10
Karma: 10
Join Date: Oct 2009
Device: Kindle 2
|
Update to Mac OS X 10.5.x (Tiger) and pulling together useful links
I got PDFRead (1.8.2) to work reasonably well on Mac OS X 10.5.x, but it took a lot of effort getting all the pieces together, and required some minor hacking of PDFRead itself. Best place to start is the current thread.
And after hours spent on this, it works exactly as advertised, but the text is just so small for your typical two-column journal article that I'm not sure how much use I'll get out of it. It looks like there might be hope for this from PaperCrop, but that's back to Windows-only, sigh. Anyway, here are some PaperCrop links:I sure would love to see the big PDFRead rewrite incorporate the PDF parsing and re-layout algorithms of PaperCrop, so two-column documents could be gracefully turned into single-column documents (making sure whole-page-width figures don't get chopped), and taken all the way to .prc files. That would be my dream tool. I'm fine with using it from the command-line, though Python GUIs can be made cross-platform, which would be nice, I suppose. Anyway, a few notes on things I had to do to get PDFRead to be fully functional on Mac OS X 10.5.x are below. - larryy --------------------------------------------------------------------------------- I followed the CPAN instructions on this mobiperl page to install Palm::PDB, XML::Parser::Lite::Tree, GD, Image::BMP, Image::Size, HTML::TreeBuilder, Getopt::Mixed, Date::Parse, and Date::Format. I also had to install pngnq, which I did using FinkCommander, which requires fink, as I already had fink and FinkCommander installed. That also allowed me to do the following: sudo apt-get install xpdf imagemagick ghostscript ghostscript-fonts At a minimum, PDFRead's common.py check_commands() function needs to replacecall(command) withcall(command, '-h') as call('gs') hangs, probably waiting for input.I also had trouble with PDFRead building the html and png files, but not generating the .prc file, until I coaxed the code into telling me what pieces it was missing (in that same check_commands() function). Note: It's okay for rbmake and djvused to be missing, if you're trying to go from PDF to PRC. Sorry if that's not a complete specification. I pounded on this for hours, and these are my undoubtedly spotty recollections. |
![]() |
![]() |
![]() |
#12 | |||||
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
![]() Quote:
Quote:
![]() Quote:
Quote:
![]() |
|||||
![]() |
![]() |
![]() |
#13 | |
Member
![]() Posts: 10
Karma: 10
Join Date: Oct 2009
Device: Kindle 2
|
Quote:
I haven't had time to dig a great deal deeper... Is there perhaps enough fine-grained control to do what I'm asking already? And, nrapallo, I doubt I can possibly help with changes until the summer, but it's conceivable I could look into importing some of PaperCrop's logic into pdfread then. I'm way not promising, but I'll definitely keep it in mind. The more I can use my Kindle for the reading of journal articles, the happier I'll be! |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-500 PDFrasterFarian v2.0 beta | alex_d | Sony Reader Dev Corner | 165 | 10-29-2012 02:57 PM |
PRS-500 PDFrasterFarian - makes A4/Letter PDFs usable | alex_d | Sony Reader Dev Corner | 120 | 09-10-2007 01:41 PM |
PRS-500 pythonized PDFrasterFarian | curiouser | Sony Reader Dev Corner | 23 | 06-03-2007 11:39 PM |
PDFRasterFarian Installation | fatalfunnel | Sony Reader | 2 | 04-01-2007 10:07 PM |
Making DJVUs readable using Acrobat Professional and PDFrasterFarian | jenia | Sony Reader | 1 | 01-19-2007 10:27 AM |