pass cache_document_size to document open

This is how mupdf API is structured
This commit is contained in:
Dobrica Pavlinusic
2012-03-31 14:09:50 +02:00
parent 4f0b41ebc5
commit 3e83dcc2a4
3 changed files with 4 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ function PDFReader:open(filename)
-- muPDF manages its own cache, set second parameter
-- to the maximum size you want it to grow
local ok
ok, self.doc = pcall(pdf.openDocument, filename, 64*1024*1024)
ok, self.doc = pcall(pdf.openDocument, filename, self.cache_document_size)
if not ok then
return false, self.doc -- will contain error message
end