2012-03-05 01:46:16 +00:00
|
|
|
require "unireader"
|
2011-12-07 23:45:39 +00:00
|
|
|
|
2012-03-05 01:46:16 +00:00
|
|
|
PDFReader = UniReader:new{
|
|
|
|
newDC = function()
|
|
|
|
print("pdf.newDC")
|
|
|
|
return pdf.newDC()
|
|
|
|
end,
|
2011-12-07 23:45:39 +00:00
|
|
|
}
|
|
|
|
|
2012-03-05 01:46:16 +00:00
|
|
|
function PDFReader:init()
|
|
|
|
self.nulldc = self.newDC();
|
2011-12-07 23:45:39 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
-- open a PDF file and its settings store
|
|
|
|
function PDFReader:open(filename, password)
|
2012-03-05 01:46:16 +00:00
|
|
|
self.doc = pdf.openDocument(filename, password or "")
|
2012-03-05 01:58:19 +00:00
|
|
|
return self:loadSettings(filename)
|
2011-12-07 23:45:39 +00:00
|
|
|
end
|