使用XSL:FO将附件添加到PDF

编程入门 行业动态 更新时间:2024-10-10 15:20:57
本文介绍了使用XSL:FO将附件添加到PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在SO的帮助下解决内嵌图像后,我需要整理内联附件. PDF可以包含附件,我发现: fo:declarations-pdf:embedded-文件,但它再次指向外部文件.如何附加属于MIME消息(很可能是BASe64)的文件?

After resolving inline images with help from SO, I need to sort out inline attachments. PDF can contain attachments and I found:fo:declarations - pdf:embedded-file but again it pointed to an external file. How can I attach a file that is part of a MIME message (most likely BASe64)?

推荐答案

在最新的FOP版本中,您可以对pdf:embedded-file使用与fo:external-graphic相同的语法,并直接附加base64数据:

In the latest FOP builds, you can use the same syntax for pdf:embedded-file as for fo:external-graphic and directly append the base64 data:

<fo:declarations> <pdf:embedded-file filename="myfile.pdf" src="data:application/pdf;base64,<DATA>"/> </fo:declarations> ... <fo:basic-link external-destination="url(embedded-file:myfile.pdf)">Embedded PDF</fo:basic-link>

更多推荐

使用XSL:FO将附件添加到PDF

本文发布于:2023-11-09 04:07:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571359.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:附件   XSL   FO   PDF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!