Closed pr-apes closed 1 month ago
Thank you very much! Let me do some experiments:
The following layout:
<Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<PDFOptions creator="CREATOR" />
<Record element="data">
<PlaceObject>
<Textblock>
<Paragraph>
<Value>Hello world</Value>
</Paragraph>
</Textblock>
</PlaceObject>
</Record>
</Layout>
creates
Version 4.19.3, just `sp`
---------
Creator: CREATOR
Producer: speedata Publisher 4.19.3 using LuaTeX
with sp --suppressinfo
Creator: CREATOR
Producer: speedata Publisher 4.19.3 using LuaTeX
Without the <PDFOptions
command:
sp
Creator: speedata Publisher 4.19.3 using LuaTeX
Producer: LuaTeX 1.15.0 (build 7509)
sp -s
Creator: speedata Publisher
Producer: LuaTeX
So this is probably the bug you mention. Setting /Creator
puts speedata Publisher 4.19.3 using LuaTeX
into the /Producer
info, right? (second test)
With your patch, the same tests again:
sp
Creator: CREATOR
Producer: speedata Publisher 4.19.3 using LuaTeX
sp -s
Creator: CREATOR
Producer: speedata Publisher 4.19.3 using LuaTeX
without the creator=... in PDFOptions:
sp
Creator: speedata Publisher 4.19.3 using LuaTeX
Producer: LuaTeX 1.15.0 (build 7509)
sp -s
Creator: speedata Publisher
Producer: LuaTeX
I don't see any difference. Perhaps I did not apply your patch correctly?
Can you try?
I don't see any difference. Perhaps I did not apply your patch correctly?
Sorry, it was totally my fault, @pgundlach.
I copied and pasted my local code, but not respecting the conditional logic.
I added the new elseif
with three requirements after an elseif
with its two first requirements, so it could not be even reached.
I mean. if the conditional checks first for a non-empty documentcreator
and then for a non-empty documentcreator
and another requirement, the second check is never reached.
This is why it worked on my computer, but the patch was wrong.
Many thanks for your help.
@pgundlach,
I have just downloaded version 4.9.3. Many thanks for the new release.
I have just discovered that setting
/Creator
introduces the program version number in/Producer
:https://github.com/speedata/publisher/blob/ba1e56c80aaa5093af3c232675a9a826c1c9f32a/src/lua/publisher.lua#L966-L976
But the new code doesn't consider
--suppressinfo
(as before):https://github.com/speedata/publisher/blob/29d41a7fcbb4de21306667842440b857ce29ddeb/src/lua/publisher.lua#L1626-L1636
I'm sending a PR to allow the use of
<PDFOptions creator="">
and--suppressinfo
(with a constant/Producer
value).Many thanks for your help.