docx

How to change font encoding when converting docx -> pdf with docx4j?

情到浓时终转凉″ 提交于 2019-12-06 13:39:13
When I'm a converting docx document to pdf my national characters transform into "#" marks. Is there any way to set a font encoding for pdf documents? I used xdocreport in the past and it can handle that, but I had problems with images, headers and footers. Docx4j manages to do this, but not fonts. After conversion, fonts have ANSI encoding while I'd like to have windows-1250. Is there an option to set this? My problem was - missing proper True Type Fonts on linux server. The default fonts where inserted instead (without my code pages). I solved the problem installing the default Ms Windows

programaticaly embedding Font Family in .docx file

核能气质少年 提交于 2019-12-06 13:36:25
I am trying to insert the font family (not system fonts) in the docx file. I am using openxml-sdk to achieve this functionality. Somehow I am able to get the font information from a particular docx file. But not able to embed the font family in the document Is it possible to embed the font in a docx file using code? Yes, it trivial for docx. MS Word have check-box for that [ http://www.howtogeek.com/howto/microsoft-office/embed-true-type-fonts-in-word-and-powerpoint-2007-documents/] . To do this programmatically, investigate first simple DOCX with and without font, and compare the differences.

How to convert xsl-fo to docx (Office Open XML) in Java?

大城市里の小女人 提交于 2019-12-06 12:29:48
问题 I'm looking for an open-source or commercial friendly library in Java to convert xsl-fo to docx (Office Open XML) format. I'm planing to use xsl-fo to produce pdf documents (with Apache FOP), so I thought generating Word documents ( docx ) out of the same source XML could be a good idea. UPDATE : I forgot to mention that I'm using Java. 回答1: Alternatively, you could do: your source xml -> docx -> xsl-fo -> pdf. or easier perhaps: source xml -> Flat OPC XML -> xsl-fo -> pdf. Once you have a

Converting HTML to doc(x) and / or PDF [closed]

只谈情不闲聊 提交于 2019-12-06 11:31:54
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I have to convert html to the doc(x) and pdf format. I found aspose, but this tool can do a lot of more work than i need, and thats why it isn't really cheap. Are there similar tools, which can just do this conversion ? I need this on a Desktopapplication where no word / office is installed * Just for Info

How to compress a folder to make docx file in android?

微笑、不失礼 提交于 2019-12-06 09:41:17
I'm trying to make an Android application that can open a docx file to read, edit and save it. My idea is to extract all the xml file within the archive to a temp folder. In this folder we can edit the content of the docx in /word/document.xml . The problem is when I compress this temp folder to make a new docx file and replace the old file, inside the new docx archive the path is like /mnt/sdcard/temp/"all files xml go here" while the xml files should be in the first level. Can anybody help me to go through this? here is the method to compress the temp directory Note: dir2zip argument's value

Convert PDF to .docx with Python

吃可爱长大的小学妹 提交于 2019-12-06 09:39:36
I'm trying very hard to find the way to c onvert a PDF file to a .docx file with Python . I have seen other posts related with this, but none of them seem to work correctly in my case. I'm using specifically import os import subprocess for top, dirs, files in os.walk('/my/pdf/folder'): for filename in files: if filename.endswith('.pdf'): abspath = os.path.join(top, filename) subprocess.call('lowriter --invisible --convert-to doc "{}"' .format(abspath), shell=True) This gives me Output[1], but then, I can't find any .docx document in my folder. I have LibreOffice 5.3 installed. Any clues about

How to grab text from word (docx) document in C#?

家住魔仙堡 提交于 2019-12-06 08:51:22
问题 I'm trying to get the plain text from a word document. Specifically, the xpath is giving me trouble. How do you select the tags? Here's the code I have. public static string TextDump(Package package) { StringBuilder builder = new StringBuilder(); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(package.GetPart(new Uri("/word/document.xml", UriKind.Relative)).GetStream()); foreach (XmlNode node in xmlDoc.SelectNodes("/descendant::w:t")) { builder.AppendLine(node.InnerText); } return builder

html5+ & mui框架 微信授权登录无响应,不回跳APP

跟風遠走 提交于 2019-12-06 07:57:02
微信授权登录可以调起微信,但是在微信上点击确认登陆后无响应,不跳回到APP。 问题解决方法: 1. 参考文章做排除: http://ask.dcloud.net.cn/article/309 2. 我遇到的问题是因为下图第3部的item没有修改为自己的appid。并且这个在IOS平台5+SDK技术白皮书.docx并没有提及。 3. 修改了以上item的值之后,微信授权回掉成功。 来源: oschina 链接: https://my.oschina.net/u/214583/blog/2231136

Apache POI - Split Word document (docx) to pages

痴心易碎 提交于 2019-12-06 07:34:20
I have been trying to segment a docx document to multiple documents based on a predefined criteria. following is my approach to cut it to paragraphs try { FileInputStream in = new FileInputStream(file); XWPFDocument doc = new XWPFDocument(in); List<XWPFParagraph> paragraphs = doc.getParagraphs(); for (int idx = 0; idx < paragraphs.size(); idx++) { XWPFDocument outputDocument = new XWPFDocument(); createParagraphInAnotherDocument(outputDocument, paragraphs.get(idx).getText()); String fullPath = String.format("./content/output/%1$s_%2$s_%3$04d.docx", FileUtils.getFileName(file), getName(), idx);

how to read docx file math equations using php code-igniter

拟墨画扇 提交于 2019-12-06 07:20:14
问题 I am trying to read a docx file from php, as i read successfully but i didnt get some equation in the word document, as i am newbie in php i didnt know how to read that please suggest some ideas, the function i have tried to read the document is function index() { $document = 'file_path'; $text_output = $this->read_docx($document); echo nl2br($text_output); } private function read_docx($filename) { var_dump($filename); $striped_content = ''; $content = ''; $zip = zip_open($filename); if (!