Created
December 11, 2009 22:04
-
-
Save kitplummer/254556 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pdftohtmlr' | |
require 'nokogiri' | |
include PDFToHTMLR | |
file = PdfFilePath.new("test.pdf", # source pdf file path | |
nil, # target html file path - not implemented | |
nil, # user password | |
nil # owner password | |
) | |
string = file.convert | |
puts string | |
doc = file.convert_to_document | |
puts doc.to_s | |
# Can now fetch a remote file, and convert (as of 0.3.1) | |
remote = PdfFileUrl.new("http://somesite.com/test.pdf") | |
string2 = remote.convert | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment