odt

Number of pages of a word document with Python

自作多情 提交于 2019-11-29 12:08:22
Is there a way to get efficiently the number of pages of a word document (.doc, .docx) with Python ? And for an .odt file ? I want to use this for a web application based on Web2py on Linux. Thank you ! You can read the value <Properties> <Pages>CountValue</Pages> from docProps/app.xml in the docx package or <office:document-meta> <office:meta> <meta:document-statistic meta:page-count="CountValue"> form meta.xml in odt package. If these values ​​do not exist (they are optional), you have to make a calculation of the entire document, in fact perform rendering, that much more difficult Only for

How to Search and Replace in odt Open Office document?

人走茶凉 提交于 2019-11-29 07:33:11
In my Delphi application I am currently do Search&Replace programmatically for doc and docx word documents using office ole automation. Does anyone has the code to do the same (for doc, docs, odt) in OpenOffice? I also asked a related question on saving to pdf . You should take a focus on XReplaceable interface. Here is the example. Please note, that there's no error handling. I've tested it with LibreOffice writer and it works fine for me. uses ComObj; procedure OpenOfficeReplace(const AFileURL: string; ASearch: string; const AReplace: string); var StarOffice: Variant; StarDesktop: Variant;

Number of pages of a word document with Python

冷暖自知 提交于 2019-11-28 06:03:05
问题 Is there a way to get efficiently the number of pages of a word document (.doc, .docx) with Python ? And for an .odt file ? I want to use this for a web application based on Web2py on Linux. Thank you ! 回答1: You can read the value <Properties> <Pages>CountValue</Pages> from docProps/app.xml in the docx package or <office:document-meta> <office:meta> <meta:document-statistic meta:page-count="CountValue"> form meta.xml in odt package. If these values ​​do not exist (they are optional), you have

how to create an odt file programmatically with java?

丶灬走出姿态 提交于 2019-11-28 05:00:26
How can I create an odt (LibreOffice/OpenOffice Writer) file with Java programmatically? A "hello world" example will be sufficient. I looked at the OpenOffice website but the documentation wasn't clear. Adnan Take a look at ODFDOM - the OpenDocument API ODFDOM is a free OpenDocument Format (ODF) library. Its purpose is to provide an easy common way to create, access and manipulate ODF files, without requiring detailed knowledge of the ODF specification. It is designed to provide the ODF developer community with an easy lightwork programming API portable to any object-oriented language. The

How to Search and Replace in odt Open Office document?

◇◆丶佛笑我妖孽 提交于 2019-11-28 01:13:20
问题 In my Delphi application I am currently do Search&Replace programmatically for doc and docx word documents using office ole automation. Does anyone has the code to do the same (for doc, docs, odt) in OpenOffice? I also asked a related question on saving to pdf. 回答1: You should take a focus on XReplaceable interface. Here is the example. Please note, that there's no error handling. I've tested it with LibreOffice writer and it works fine for me. uses ComObj; procedure OpenOfficeReplace(const

PHP PDF template library with PDF output?

◇◆丶佛笑我妖孽 提交于 2019-11-27 11:00:55
Is there any PHP PDF library that can replace placeholder variables in an existing PDF, ODT or DOCX document, and generate a PDF file as the end result, without screwing up the layout? Requirements: Needs no 3rd party web service Ability to run on shared web hosting would be ideal (no binary installations / packages required) Mind you, a library that is able to load an existing PDF file and insert text programmatically at a specific position is not enough for my use case. As far as my research shows, there is no library that can do this: TCPDF can only generate documents from scratch FPDI can

how to create an odt file programmatically with java?

拈花ヽ惹草 提交于 2019-11-27 00:45:17
问题 How can I create an odt (LibreOffice/OpenOffice Writer) file with Java programmatically? A "hello world" example will be sufficient. I looked at the OpenOffice website but the documentation wasn't clear. 回答1: Take a look at ODFDOM - the OpenDocument API ODFDOM is a free OpenDocument Format (ODF) library. Its purpose is to provide an easy common way to create, access and manipulate ODF files, without requiring detailed knowledge of the ODF specification. It is designed to provide the ODF

PHP PDF template library with PDF output? [closed]

廉价感情. 提交于 2019-11-26 15:23:28
问题 Is there any PHP PDF library that can replace placeholder variables in an existing PDF, ODT or DOCX document, and generate a PDF file as the end result, without screwing up the layout? Requirements: Needs no 3rd party web service Ability to run on shared web hosting would be ideal (no binary installations / packages required) Mind you, a library that is able to load an existing PDF file and insert text programmatically at a specific position is not enough for my use case. As far as my