ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* PDF/A-3, XMP and Factur-X
@ 2022-05-18 15:26 Henning Hraban Ramm via ntg-context
  0 siblings, 0 replies; only message in thread
From: Henning Hraban Ramm via ntg-context @ 2022-05-18 15:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm

Hi again,

I’m looking into extending my ConTeXt-made invoices with embedded XML 
data according to the DE/FR Factur-X standard (in Germany also known as 
ZUGFeRD).

Does anyone have some experience with that?

For that, I need PDF/A-3(a) compliant documents – current documentation 
is only on PDF/A-1(a), but that doesn’t seem to be the problem.

Now I’m supposed to put additional information into the XMP metadata.
I found lpdf-xmp.lua; but it seems like I can’t just use

\startluacode
lpdf.addtoinfo("TEST","Hraban was here!")
lpdf.addxmpinfo("UStID","123456")
\stopluacode

Would I need to add my tags to the mapping table of lpdf-xmp.lua?

Or circumvent it after a look at the function concerned:

function lpdf.addxmpinfo(tag,value,check)
     local pattern = permitdetail(tag)
     if type(pattern) == "string" then
         xmlfillin(xmp or valid_xmp(),pattern,value,check)
     end
end

If I try to use xml.fillin, I apparently need the name of the current 
xml file, but valid_xmp is a local function. If just use the default...

xml.fillin("lpdf-pdx.xml","metadata","UStID","123456")

... at least I find no traces of that key in the extended metadata 
dialog of Acrobat Pro 9. I also tried different values like "xmp" 
instead of metadata. Clearly I don’t understand what I’m doing here ;)

Is there a check against some schema involved?

It looks like I should include an additional XMP schema for Factur-X 
with the URI "urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#", 
prefix "fx". How can I do that?

This is the example from the docs:

<rdf:Description
	rdf:about=""
	xmlns:fx="urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#">
	<fx:DocumentType>INVOICE</fx:DocumentType>
	<fx:DocumentFileName>factur-x.xml</fx:DocumentFileName>
	<fx:Version>1.0</fx:Version>
	<fx:ConformanceLevel>EXTENDED</fx:ConformanceLevel>
</rdf:Description>

Then I’d use \attachment to include my "factur-x.xml" invoice (that I 
must generate from my Lua invoice code), but that’s a task for another 
day ;)

Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-18 15:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18 15:26 PDF/A-3, XMP and Factur-X Henning Hraban Ramm via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).