Closed pr-apes closed 2 years ago
This is surely possible to extend. Just waiting for someone that really needs this.
(Development is currently prioritised for https://github.com/speedata/boxesandglue - if there is an urgent need for a feature here, I'll add it of course)
Sorry for not being explicit, I asked because I need this.
Not every document has attachments, but there are some types that need them.
But first I have to make Publisher work for my needs.
I’m closing the issue. When I’m ready to use attachments (because everything else is fine on my side), I’ll reopen it.
I have just discovered that name
allows non Unicode characters and description
doesn't handle them right.
<AttachFile filename="invoice.xml" name="χαλεπἀ.xml" description="ñÜß" type="ZUGFeRD invoice"/>
I think utf8_to_utf16_string_pdf()
is missing. But replacing this line contents
with this line content works fine:
/Desc %s
/EF <<
/F %d 0 R
/UF %d 0 R
>>
/F (%s)
/Type /Filespec
/UF %s
>>]],utf8_to_utf16_string_pdf(description), fileobjectnum,fileobjectnum,destfilename,utf8_to_utf16_string_pdf(destfilename)))
In short, /Desc %s
should read /Desc %s
and escape_pdfstring(description)
should read utf8_to_utf16_string_pdf(description)
.
Sorry for the mess, but providing a patch (without writing rights in this repository) has been in the past a pain for both you and me.
I hope it helps.
BTW, I would really appreciate having attachment abilities for PDF and other document types.
But we can discuss that later.
Sorry for the mess, but providing a patch (without writing rights in this repository) has been in the past a pain for both you and me.
Thank you, next version will have this patch.
Thank you, next version will have this patch.
Great news.
Closing, since I'd try a different approach.
@pgundlach,
I have just learnt that there is an
AttachFile
command, but only implemented for https://github.com/speedata/publisher/blob/7a422e778aeb0973ca37a6b7547a873bac98fbaf/src/lua/publisher/commands.lua#L207-L212How about extending it to attach PDF documents (to start with)?
I mean, in some PDF documents, being able to attach other (PDF) documents may be an essential feature.
One may send a letter with an invoice and/or a report attached to it (just to name an example).
Many thanks for your help.