docx

Generate PDF from .docx generated by PHPWord

南楼画角 提交于 2020-01-12 14:08:22
问题 I am creating .docx files from a template using PHPWord . It works fine but now I want to convert the generated file to PDF . First I tried using tcpdf in combination with PHPWord $wordPdf = \PhpOffice\PhpWord\IOFactory::load($filename.".docx"); \PhpOffice\PhpWord\Settings::setPdfRendererPath(dirname(__FILE__)."/../../Office/tcpdf"); \PhpOffice\PhpWord\Settings::setPdfRendererName('TCPDF'); $pdfWriter = \PhpOffice\PhpWord\IOFactory::createWriter($wordPdf , 'PDF'); if (file_exists($filename."

Generate PDF from .docx generated by PHPWord

佐手、 提交于 2020-01-12 14:07:46
问题 I am creating .docx files from a template using PHPWord . It works fine but now I want to convert the generated file to PDF . First I tried using tcpdf in combination with PHPWord $wordPdf = \PhpOffice\PhpWord\IOFactory::load($filename.".docx"); \PhpOffice\PhpWord\Settings::setPdfRendererPath(dirname(__FILE__)."/../../Office/tcpdf"); \PhpOffice\PhpWord\Settings::setPdfRendererName('TCPDF'); $pdfWriter = \PhpOffice\PhpWord\IOFactory::createWriter($wordPdf , 'PDF'); if (file_exists($filename."

Generate PDF from .docx generated by PHPWord

元气小坏坏 提交于 2020-01-12 14:07:39
问题 I am creating .docx files from a template using PHPWord . It works fine but now I want to convert the generated file to PDF . First I tried using tcpdf in combination with PHPWord $wordPdf = \PhpOffice\PhpWord\IOFactory::load($filename.".docx"); \PhpOffice\PhpWord\Settings::setPdfRendererPath(dirname(__FILE__)."/../../Office/tcpdf"); \PhpOffice\PhpWord\Settings::setPdfRendererName('TCPDF'); $pdfWriter = \PhpOffice\PhpWord\IOFactory::createWriter($wordPdf , 'PDF'); if (file_exists($filename."

Python PyInstaller安装与使用

白昼怎懂夜的黑 提交于 2020-01-12 09:12:23
【安装PyInstaller】 1.pip在线安装 Python 默认并不包含 PyInstaller 模块,因此需要自行安装 PyInstaller 模块。 安装 PyInstaller 模块与安装其他 Python 模块一样,使用 pip 命令安装即可。在命令行输入如下命令: pip install pyinstaller 运行上面命令,应该看到如下输出结果: Successfully installed pyinstaller-x.x.x 其中的 x.x.x 代表 PyInstaller 的版本。 在 PyInstaller 模块安装成功之后,在 Python 的安装目录下的 Scripts(D:\Python\Python36\Scripts) 目录下会增加一个 pyinstaller.exe 程序,接下来就可以使用该工具将 Python 程序生成 EXE 程序了。 2.安装包离线安装 https://pypi.org/project/PyInstaller/2.0/#files 从上面这个网站下载安装包,下载以后解压,用cmd, 【PyInstaller生成可执行程序】 PyInstaller工具的命令语法如下: pyinstaller 选项 Python 源文件 不管这个 Python 应用是单文件的应用,还是多文件的应用,只要在使用 pyinstaller

Python win32com.client.Dispatch looping through Word documents and export to PDF; fails when next loop occurs

不想你离开。 提交于 2020-01-12 05:51:31
问题 Based on the script here: .doc to pdf using python I've got a semi-working script to export .docx files to pdf from C:\Export_to_pdf into a new folder. The problem is that it gets through the first couple of documents and then fails with: (-2147352567, 'Exception occurred.', (0, u'Microsoft Word', u'Command failed', u'wdmain11.chm', 36966, -2146824090), None) This, apparently is an unhelpful general error message. If I debug slowly it using pdb, I can loop through all files and export

利用poi操作word文档

夙愿已清 提交于 2020-01-09 18:33:33
关键字:POI JAVA 批注 总页数 总字符数 一:认识POI Apache POI是一个开源的利用Java读写Excel、WORD等微软OLE2组件文档的项目。最新的3.5版本有很多改进,加入了对采用OOXML格式的Office 2007支持,如xlsx、docx、pptx文档。 POI主页:poi.apache.org/ 二:POI3.5相关下载 3.5Jar包下载地址 3.5源码下载地址 三:POI组成部分概览 以下是POI的几个重要组成部分,以及各组件的功能概述。 POIFS POIFS是该项目的最古老,最稳定的一部分。.这是格式化OLE 2复合文档为纯Java的接口。 它同时支持读写功能。所有的组件,最终都依赖于它的定义 HSSF 和 XSSF HSSF: MS-Excel 97-2003(.xls),基于BIFF8格式的JAVA接口。 XSSF:MS-Excel 2007+(.xlsx),基于OOXML格式的JAVA接口。 HWPF 和XWPF HWPF: MS-Word 97-2003(.doc),基于BIFF8格式的JAVA接口。只支持.doc文件简单的操作,读写能力有限。本API为POI项目早期开发,很不幸的 是主要负责HWPF模块开发的工程师-“Ryan Ackley”已经离开Apache组织,现在该模块没有人维护、更新、完善。 XWPF:MS-Word

How to create and save a .rtf, .doc, .docx in Objective-C for iOS

强颜欢笑 提交于 2020-01-09 10:32:27
问题 I am looking to create and save either a rtf, doc or docx file on an iPad (iOS). The scenario is that we'd like to assist a user in creating content on their iPad and then let them email this as an editable document cross-platform (OS X, WIN). I am open to other solutions besides the rtf, doc or docx file format. Thanks, James 回答1: RTF is going to be the easiest, because it's a plain text format. It's kind of like HTML, but without closing tags. Here is a class for writing an RTF, but it

如何在计算机上查找文件?

狂风中的少年 提交于 2020-01-07 01:13:07
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 计算机上运行的所有主要操作系统都可以在硬盘驱动器或连接到计算机的其他驱动器上找到文件。单击下面的链接之一,以获取有关在计算机或移动设备上查找文件和应用程序的帮助。 Windows 10 Microsoft Windows提供了易于使用的搜索功能,即使您不知道其全名,它也可以帮助您在计算机上查找任何文件。无论您需要查找文档,电子表格,图片还是视频,Windows搜索功能都可以帮助您找到它。在下面的列表中选择计算机上Windows的版本,然后按照步骤搜索文件。单击下面的搜索提示链接,也可以找到搜索示例和提示。 按Windows键,然后输入要查找的部分或全部文件名。有关搜索文件的提示,请参见搜索提示部分。 在搜索结果中,单击“ 文档”,“ 音乐”,“ 照片 ”或“ 视频”部分标题,以查看符合搜索条件的文件列表。 单击您要打开的文件名 Windows 8 按Windows键访问Windows“开始”屏幕。 开始输入要查找的文件名的一部分。当您输入搜索结果时,将显示搜索结果。有关搜索文件的提示,请参见搜索提示部分。 单击“搜索”文本字段上方的下拉列表,然后选择“ 文件”选项。 搜索结果显示在“ 搜索”文本字段下方。向下滚动搜索结果列表以查找所需的文件,然后单击文件名将其打开。 Windows Vista和Windows

OpenTBS - How to use a double loop

爷,独闯天下 提交于 2020-01-06 23:50:32
问题 I am trying to create a block inside a sub block in a .docx using openTBS , with no success so far. Here is my PHP array : $myBlock = array( 0 => array( 'description' => 'description1', 'name' => 'name1', 'photos' => array ( 0 => array( 'path' => 'C:\path_to\pic_0000y.png', 'name' => 'photo0000'), 1 => array( 'path' => 'C:\path_to\pic_1111y.png', 'name' => 'photo111'), ), // end of photo array ), // end of first element 1 => array( 'description' => 'description2', 'name' => 'name2', 'photos'

figure and figcaption not converting correctly to Word images with captions

为君一笑 提交于 2020-01-06 08:42:20
问题 I have HTML5 source code (with full doctype/head/body) that needs to be converted to a Word DOCX file. The HTML file is generated page with minimal formatting ( H1/H2/P ) and images ( img ). There is a FIGURE that contains the image source ( SRC ) parameter, and then there is a FIGCAPTION tag that contains the caption for the image, similar to this (from https://www.w3schools.com/tags/tag_figcaption.asp ): <figure> <img src="img_pulpit.jpg" alt="The Pulpit Rock" width="304" height="228">