Closed pr-apes closed 2 years ago
This is a bug. A workaround would be to add string()
here:
<Value select="string(sd:aspectratio($myfile))"/>
Thank you!
BTW, in https://github.com/speedata/publisher/discussions/388#discussioncomment-3098943 you mention imagewidth()
.
I cannot find this expression (imagewidth()
) in the docs or in this repository (searching inside GitHub).
I guess it is related to current PDF (the document generated by Publisher), but how would be imagewidth()
invoked?
Many thanks for your help.
Sorry, I think that with this:
sd:imageheight($myfile, 'mm')
returns the number of millimetres (same withimagewidth()
).
you simply meant sd:imagewidth($myfile, 'mm')
.
Sorry for the noise again.
Sorry, I think that with this:
sd:imageheight($myfile, 'mm')
returns the number of millimetres (same withimagewidth()
).you simply meant
sd:imagewidth($myfile, 'mm')
.
exactly, sorry for not being clear.
Many thanks for the fix.
This has some unwanted side effects... I need to re-open the issue.
<Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<Record element="data">
<PlaceObject>
<Textblock>
<Paragraph>
<Span background-color="lightgray">
<Value>abcdef</Value>
<Value> </Value>
</Span>
</Paragraph>
</Textblock>
</PlaceObject>
</Record>
</Layout>
Hi @pgundlach, this issue comes from #388:
The output from
sp -v external_pdfdoc=../a.pdf --autoopen --dummy
reads:With any PDF document, I get no space before the output from
<Value select="sd:aspectratio($myfile)"/>
.I only get an space before, if I replace it with
&nnbsp;
(I get no space even with
).Is this a bug or am I missing something basic?
Many thanks for your help.