Results 1 to 4 of 4
Discuss ebook reading at the General - Hackint0sh.org; ...
  1. #1
    Newbie Array

    Join Date
    Dec 2007
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default ebook reading

    Hey all.
    I purchased an eBook in pdf format and was looking for a way to read my ebook on my ipod touch.
    I just thought I would share with everyone a simple applescript which I wrote to capture every page of of the book as a picture. It has a hardcoded number of pages and crop size, and only works if you position the window right in the center of the screen, but maybe someone who has ever written applescript could improve on it.

    the only problem i found was that itunes downsamples the images and converts them to jpg making them a little blurry. Haven't tried viewing them in a different image viewing app directly, but it works ok.
    And given that this method is so easy to implement, and impossible to stop anyone from doing, i'm left wondering what the point of any type of drm on eBooks is.

    ----------------

    on add_leading_zeros(this_number, max_leading_zeros)
    set the threshold_number to (10 ^ max_leading_zeros) as integer
    if this_number is less than the threshold_number then
    set the leading_zeros to ""
    set the digit_count to the length of ((this_number div 1) as string)
    set the character_count to (max_leading_zeros + 1) - digit_count
    repeat character_count times
    set the leading_zeros to (the leading_zeros & "0") as string
    end repeat
    return (leading_zeros & (this_number as text)) as string
    else
    return this_number as text
    end if
    end add_leading_zeros

    set nPages to 410

    set save_location to
    (choose folder with prompt "Choose where to save screenshots")

    delay (3) -- delay so you can activate window

    repeat with page from 1 to nPages

    do shell script "screencapture " &
    quoted form of POSIX path of save_location & "page" & add_leading_zeros(page, 2) & ".tif"

    tell application "System Events"
    keystroke (ASCII character 12)
    end tell

    delay (1) -- delay one 1 second to make sure the page is finished drawing
    end repeat


    tell application "Image Events" to launch

    repeat with page from 1 to nPages

    set imgname to save_location & "page" & add_leading_zeros(page, 2) & ".tif" as string as file specification
    tell application "Image Events"
    set img to open imgname
    tell img
    crop to dimensions {415, 655}
    save
    close
    end tell
    end tell
    end repeat



  2. #2
    Advanced Array

    Join Date
    Dec 2007
    Posts
    40
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    cool man.
    however you can upload PDF files to the iphone to the library:
    var\root\media\PDF

    (you should create the last directory)

    and you can read PDF files with no FUSS

  3. #3
    Newbie Array

    Join Date
    Dec 2007
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I'm talking about DRM pdf files purchased from ebooks.com
    They do not even work with Preview on the mac. You have to use Adobe Digital Editions or Adobe Reader.

  4. #4
    Advanced Array

    Join Date
    Dec 2007
    Posts
    40
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    ohh
    i see...

 

 

Similar Threads

  1. Replies: 0
    Last Post: 03-18-2010, 01:10 PM
  2. eBook reader for iphone
    By bootleg in forum iPhone Developer Exchange
    Replies: 0
    Last Post: 07-07-2009, 08:06 PM
  3. eBook Reader
    By maccabbi in forum Free Toolchain Software (Cydia App's)
    Replies: 9
    Last Post: 01-10-2008, 05:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 09:42 AM.
twitter, follow us!