Allow setting PDF version number
In contrast to LuaTeX, the version number does not affect the used PDF features and can be changed at any time.
This commit is contained in:
parent
15052dbc43
commit
2e1616f18c
2 changed files with 4 additions and 1 deletions
|
@ -58,7 +58,8 @@ callback.register("stop_run", function()
|
|||
pfile:indirect(id, require'luametalatex-pdf-font'(pfile, f, sorted))
|
||||
end
|
||||
pfile.root = pfile:getobj()
|
||||
pfile:indirect(pfile.root, string.format([[<</Type/Catalog/Version/1.7/Pages %i 0 R>>]], pfile:writepages()))
|
||||
pfile.version = string.format("%i.%i", pdf.variable.majorversion, pdf.variable.minorversion)
|
||||
pfile:indirect(pfile.root, string.format([[<</Type/Catalog/Version/%i.%i/Pages %i 0 R>>]], pfile.version, pfile:writepages()))
|
||||
pfile.info = write_infodir(pfile)
|
||||
pfile:close()
|
||||
end, "Finish PDF file")
|
||||
|
|
|
@ -77,6 +77,8 @@
|
|||
\texAlloc{dimen}{pagewidth}{297mm}
|
||||
\pdfAlloc{dimen}{horigin}{1in}
|
||||
\pdfAlloc{dimen}{vorigin}{1in}
|
||||
\pdfAlloc{count}{majorversion}{1}
|
||||
\pdfAlloc{dimen}{minorversion}{7}
|
||||
\directlua{
|
||||
lua.prepared_code[\csstring#lua.prepared_code+1] = tex.toks[0] .. "end"
|
||||
\the\toks0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue