pass cache_document_size to document open

This is how mupdf API is structured
This commit is contained in:
Dobrica Pavlinusic committed 2012-03-31 14:10:41 +02:00
1 parent 4f0b41ebc5
commit 3e83dcc2a4
3 files changed
+4 -6

No files matched your search

+1 -1
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