openoffice.org

Issue with JODConverter and running LibreOffice in headless mode

我只是一个虾纸丫 提交于 2019-12-13 01:43:03
问题 I am using the following code to convert .doc to .pdf using JOD. File inputFile = new File("document.doc"); File outputFile = new File("document.pdf"); // connect to an OpenOffice.org instance running on port 8100 OpenOfficeConnection connection = new SocketOpenOfficeConnection(8100); connection.connect(); // convert DocumentConverter converter = new OpenOfficeDocumentConverter(connection); converter.convert(inputFile, outputFile); // close the connection connection.disconnect(); But I have

Exporting a list to OpenOffice Calc from Delphi

一个人想着一个人 提交于 2019-12-12 09:46:06
问题 I'm using Delphi 7 and I'd like to export the contents of a list from my program to OpenOffice Calc using automation, instead of using files. The task is simple: create new document, iterate through rows/columns and change cell data. I've found some code but it's not complete, and I was hoping someone has some example code ready to accomplish this very simple task. It could save me a few hours of trying. Thanks in advance! Edit: I'd like to automate OpenOffice Calc to achieve what I wrote

OpenOffice Error vnd.sun.star.GraphicObject

随声附和 提交于 2019-12-12 04:32:08
问题 I am trying to display an image from a SpreadSheet(OpenOffice) into my PictureBox control and here is my code. Dim objServiceManager As Object Dim objDesktop As Object Dim objDocument As Object Dim objText As Object Dim objCursor As Object Dim oDoc As Object Dim ARG() Dim oGraph As Object Dim oView As Object Dim oDrawPage As Object Dim oSheet As Object Dim oimage As Object Dim osize As Object Dim Cell As Object Dim GraphURL As String Set objServiceManager = CreateObject("com.sun.star

How to Programmatically add or remove items in ListBox FORM control

大城市里の小女人 提交于 2019-12-12 04:16:12
问题 I am having a problem with OpenOffice.org ListBox Form control. I have built a small form (not dialog) that contains a textbox and ListBox and 2 buttons. Sub AddToList_ButtonClicked() Dim oThisDoc As Object Dim oForms as Object Dim oForm as Object oThisDoc = thisComponent.getDrawPage() oForms = oThisDoc.getForms() oForm = oForms.getByName("SimpleForm") Dim oTextBox As Object Dim oListBox As Object oListBox = oForm.getByName("simpleListBox") oTextBox = oForm.getByName("simpleTextBox").Text

Output PCL from Word document using Python

对着背影说爱祢 提交于 2019-12-12 02:50:13
问题 I'm building a web application which will include functionality that takes MS Word (and possibly input from a web-based rich text editor) documents, substitutes values into the formfield placeholders in those documents, and generates a PCL document as output. I'm developing in python and django on windows, but this whole solution will need to be deployed to a web host (yet to be chosen), which in practice means that the solution will need to run on linux. I'm open to linux-only solutions if

Insert several images at once using macro scripting in LibreOffice

本小妞迷上赌 提交于 2019-12-12 02:13:58
问题 I am writing a macro for LibreOffice Writer in Python. I need to insert several images in one document, one after another with minimal space inbetween them. The folowing code inserts all the images in the same area and all of them are overlapped. I need to advance the cursor below the inserted image everytime a new image is inserted. I have tried the cursor.gotoEnd(), cursor.goDown() and other such methods but none seem to work. How do I make this work? def InsertAll(): desktop =

How do I return an array from an OpenOffice Basic function?

梦想与她 提交于 2019-12-11 23:58:40
问题 I'm reading through the documentation on OpenOffice regarding arrays and it seems like Calc is capable of array functions just like Excel . To test this I created a simple function that should return an array {1, 2, 3} : Function Test() Dim Test(3) As Variant Test(1) = 1 Test(2) = 2 Test(3) = 3 End Function When I populate a cell with =Test() and press Ctrl+Shift+Enter I just get a cell with 3 in it. Where are 1 and 2 ? What am I doing wrong? I'm running OpenOffice 4.1.1 . 回答1: The

How to determine whether Microsoft Excel or Open Office is installed on the system using jquery

南楼画角 提交于 2019-12-11 23:27:28
问题 I needed to export data of a table to Excel. I got a solution as below: http://jsfiddle.net/jquerybyexample/xhYcD/ In the above example, it allows you to generate xls file when Microsoft Excel is installed on the system but I have OpenOffice installed on my system, so when I add the line window.open('data:application/vnd.oasis.opendocument.spreadsheet,' + $('#dvData').html()); instead of window.open('data:application/vnd.ms-excel,' + $('#dvData').html()); then it generates the .ods file. I

connection failed while connecting to OpenOffice .org

独自空忆成欢 提交于 2019-12-11 21:45:29
问题 File file = new File((new StringBuilder()).append(s2).append(File.separator).append(s1).toString()); file.renameTo(new File((new StringBuilder()).append(s2).append(File.separator).append("$$tsjoof$$.xls").toString())); // SocketOpenOfficeConnection socketopenofficeconnection = new SocketOpenOfficeConnection(); OpenOfficeConnection socketopenofficeconnection = new SocketOpenOfficeConnection(8100); try { String s3 = (new StringBuilder()).append(s2).append(File.separator).append("$$tsjoof$$.xls"

OpenOffice HTML & CSS : JODConverter

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 16:26:16
问题 I'm using JODConverter in my application to convert a HTML file with basic CSS 2 to a PDF file. When I convert the file, the pdf is just a mess, And when I tried to view in openOffice directly it was a mess also. This is the file generated : and this is what I have in my chrome browser : As you see there's a big difference. This is my code : <div style="padding : 5% 25% 0% 10%; diplay : inline-block; "> <div> <span style="color : green; float : left; "><b>MyCompany - MyConsultant</b></span>