简体   繁体   English

是否可以在ReportLab生成的PDF中包含OpenOffice Writer或MS Word数据?

[英]Is it possible to include OpenOffice Writer or MS Word data in a ReportLab generated PDF?

The desire is to have the user provide information in an OpenOffice Writer or MS Word file that is inserted into part of a ReportLab generated PDF. 要求用户提供OpenOffice Writer或MS Word文件中的信息,该文件插入到ReportLab生成的PDF的一部分中。 I am comfortable with ReportLab; 我对ReportLab感到满意; but, I don't have any experience with using Writer or Word data in this way. 但是,我没有以这种方式使用Writer或Word数据的经验。 How would you automate the process of pulling in the Writer/Word data? 您将如何自动化提取Writer / Word数据的过程? Is it possible to retain tables and graphs? 是否可以保留表格和图形?

You can not embed such objects as is within a PDF, adobe specification does not support that. 您不能嵌入PDF内的对象,adobe规范不支持该对象。 However you could always parse the data from the Office document and reproduce it as a table/graph/etc using reportlab in the output PDF. 但是,您始终可以解析Office文档中的数据,并使用输出PDF中的reportlab将其复制为表格/图形/等。 If you don't care about the data being an actual text you could always save it in the PDF as an image. 如果您不关心数据是真实的文本,则可以始终将其另存为PDF。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM