在Mern Project嵌入的Zugferd XML中创建发票PDF
我正在尝试在我的网站上创建具有Zugferd格式的发票PDF。 客户下订单后,应将订单信息保存在Zugferd XML文件中,然后创建具有XML文件作为附件的发票PDF文件。 该项目是由Mern Stack构建的。 我试图在线找到解决方案,但我们只有Java和C#内置库。 有没有用于处理Zugferd发票的JavaScript项目的库? 如果需要从头开始构建,应该需要哪些步骤?
谢谢您的建议!
I am trying to create an invoice pdf with ZUGFeRD format on my site.
After customer placing his order, the order information should be saved in ZUGFeRD xml file and then create invoice pdf file which has the xml file as an attachment.
The project is built with MERN stack.
I tried to find solutions online but there we only JAVA and C# built-in libraries.
Is there any library for javascript projects to handle ZUGFeRD invoicing?
If it needs to be built from the ground up, which steps should be needed?
Thank you for your advice!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于XML要遵守Zugferd/factur-X,因此它是一个非常专业的,可以符合标准。速度是hevierWeaight Java或C#是必需的,尽管您可以从限制的html.js的任何脚本 命令
这是欧洲富裕制度,但只有那些控制金钱的人才会互相付款。有关更广泛的代码导向用法定义,请参见 https://duckduckgo.com/?q= een+++++++%2B16931 < /a>
此处显示的密钥编码元素。是一个严格定义的XML输入(右图4页)(可能是在ODT中写的更简单),以生成100%同步的颜色PDF输出(左图1页),然后又必须包括该颜色100%可验证的XML源和颜色配置文件以及字体!都包裹在一个PDFA档案中(如果只有一个zipped.docx,但不是!)。
XML嵌入在PDF中进行提取和处理

您需要确保XML相对于布局匹配PDF数据,这完全取决于客户的自定义,因此这里没有人可以指导该步骤。但是,它(愚蠢地愚蠢地)需要精确的颜色配置文件和匹配颜色设置!,可以自动将其模板自动用于命令行插入,但是您必须正确地完成它,因此可以重复进行。
因此,您应该能够使用ghostscript进行操作,并仔细阅读 https:/ghostscript.com/blog/zugferd。但是,html 然而,鬼视自然应该被您的商业用途许可。
有关基于Java的替代开源最新项目,请参见野马项目
它不是轻量级的读取无论哪种情况,都可以兼容考虑这两个工具和比较。
Since the xml is to comply with Zugferd/Factur-X then it is a very specialist embed to match the standards. Hevierweight Java or C# is required for speed, though you could command line from any script outside of restricted HTML.js
This is European Plutocracy at its finest, only those controlling money will pay each other. For a wider code orientated usage definition see https://duckduckgo.com/?q=EN+%2B16931
The key coding elements shown here. Are a strictly defined XML input (4 page on right in example) (could have been much simpler written as ODT) is processesed to generate a 100% synchronized colour PDF output (1 page in example on left) Which then in turn must include the 100% verifiable XML source and colour profile plus fonts!, all wrapped into one PDFA archive (could have been simpler if as just one Zipped.docX but was not to be!).
XML embedded in PDF for extract and process

You will need to ensure your XML matches the PDF data with respect to layout and that is entirely down to customer customization, so nobody here can guide on that step. However, it then (IMHO stupidly) requires a precise combination of colour profile and matching colour setting!, those can be auto templated for command line insertion, but you must get it right once, so its repeatable.
Thus you should be able to do it using Ghostscript and read carefully https:/ghostscript.com/blog/zugferd.html however Ghostscript should naturally be licensed by you for your commercial use.
For an alternative Java based Open Source up to date project see the Mustang Project
It is not a lightweight read in either case, but for compatibly consider both tools and compare.
阅读非常容易,您可以使用pdf.js的getAttachments()功能,如我们的e-Invoice查看器Quba所示, https://github.com/zugferd/quba-viewer/blob/master/master/app/main.js.js 。
写作的问题是,需要将文件嵌入到PDF/A-3+结构中,该结构可与Ghostscript,Itext或PDFBox一起使用。
通常,一个人会使用库,因为PDF具有许多功能,例如,每个节点(称之为流)可以从其他流中独立压缩。从我的头顶上,我不知道能够产生有效的PDF/A输出的任何JS库。据称( nodejs库,用于创建/转换PDF/A PDFME CAN这样做。
然后,您
帮助您。
请让我知道它是否确实与PDFME(或任何其他LIB)一起使用。
亲切的问候
乔钦
Reading is quite easy, you can use pdf.js's getAttachments() functionality as demonstrated in our e-invoice viewer Quba, https://github.com/ZUGFeRD/quba-viewer/blob/master/app/main.js .
The issue with writing is that need to embed a file into a PDF/A-3+ structure, which works with Ghostscript, itext, or PDFbox.
Usually one would use a library for that because PDF has many features, e.g. each node (called stream there) can be compressed, independetly from other streams. From the top of my head I do not know any JS library that would be able to produce valid PDF/A output. Allegedly (Nodejs library for creating/converting PDF/A) PDFme can do that.
Then you
hope that helps.
Please let me know if it actually works with PDFme (or any other lib).
kind regards
Jochen