openoffice headless commands documentation/references - php

anyone can point me to documentation/tutorials of how to use the openoffice headless version for document conversions? (from ppt to pdf, from doc to pdf etc..)
and if is there any hint of how to use it with php, even better :)
Regards,
Shadow.

There's a PHP module written to interface with the Open Office programming API called PUNO that would be a useful first step. Instructions for configuring OO and building PUNO can be found here

Related

Template Designer and Generation Engine for data-driven PDF documents

I have used crystal reports and adobe livecycle for designing PDF templates and generating PDF documents from dynamic data, mainly using microsoft technologies.
I am now looking for the same type of features for linux and php, preferably with open source technologies. The designer can be either an application for linux or windows, a desktop application or a web based app, but the engine should be called from php (ideally from the same server) for generating documents and populating data, all in a linux environment.
Does anyone use anything like this and can suggest alternatives?
Thank you.
I have found a solution for this, so I will leave it here in case someone else is looking for anything similar.
I am using Apache FOP as the PDF generator. I have Apache Tomcat with FOP as a webapp installed on a server, I call it locally through PHP and am able to retrieve the PDF for the templates I need.
The designer I used for testing this was Altova StyleVision, but will take a look at Nimbus, as I usually prefer cloud solutions as they do not rely on the device I am using.
Thank you kevin for the suggestion.

Exporting SVG to PDF in a offline TideSDK webapp

I have an offline HTML5/CSS/JS app built with TideSDK in which a bar chart is drawn with Highcharts as an SVG "tag" using data entered by the user. I need to export this chart in a PDF document, which will also contain text and tables.
As it is an offline app I can't use the export module included in Highcharts (except the getSVG() method) or other solutions like DocRaptor.
I'm open to use another JS plugin for drawing the chart, but I really love the "look and feel" and the features of Highcharts graphs.
As you may know, with TideSDK I can embed Python, PHP or Perl scripts/modules in my app (I prefer avoid Perl as I've never used it).
The other limitation is that I cannot ask to the final users to install another software than mine, so I can't use wkhtmltopdf with PHP. Except if I manage to install it through my app in a transparent process (not sure it is particularly easy to do).
After having search for several days, my final idea is to use the CairoSVG Python module to export the graph in a first PDF. Then I will find a JS (jsPDF) or Python tool to include this PDF in the final PDF containing text and tables.
I will start to test this solution soon and let you know if I managed it. Nevertheless, if some of you already have to manage a similar problem, I will be very happy to hear your solutions.
The app will run, in a first time, on Windows platform and should be adapted to MacOS, Linux, Android and iOS in later phases.
There is simple command line tool (wkhtml to pdf), that lets you convert html pages to pdf files. Its not strictly python/js solution, but you can call os.system() or something similar from python to use it. It helped me with my python program and it is very simple to use. Command is "wkhtmltopdf.exe inputname outputname" and you get what you want. And its free software. Site: https://code.google.com/p/wkhtmltopdf/

Open Office for doc, docx and rtf to html conversion

How can i read formatted text as HTML from doc, docs and rtf files?
My script is on LAMP, can access openoffice installed on server for this type of conversion?
EDIT
Its not necessary that i want to access openoffice through a php extension or Apache module, if it is possible to use it using cli trhoug php, it would be fine too.
You can try Puno: http://www.wstech2.net/index.php?do=0a,01,05
This project is a PHP5 module written in C++ that brings the OpenOffice.org UNO Programming API to the PHP userspace.
It uses UNO Reflection API by OpenOffice for it. It's easy to start with. Check out sample example given there.

PDF generation in PHP 4.3.2 :(

I'm faced with having to generate some fairly basic PDFs on a server which is running php 4.3.2 unfortunately.
So that pretty much renders most things impossible such as google's domPDF etc.. PDFlib is not compiled in so I can't use any of that either.
Does anyone have any suggestions?
Thanks!
use this R&OS PDF Class to achieve this task.. This is fairly simple and light weight class and requires no module etc to be installed on the server.
You could try out DocRaptor.com, which is a webservice that will let you convert html to pdf.
I ended up using an older version of fpdf and HTML2PDF (from the link below.) It's certainly not ideal, but then neither is a 7 year old version of php.
http://www.macronimous.com/resources/Converting_HTML2PDF_using_PHP.asp
You didn't mention if you were generating these from scratch or from existing PDF data. pdftk is a handy PDF manipulation library. You can shell out to it from PHP.

Creating text effects like curved, arched, wedged in ruby on rails or php

i know there is a convert -swirl effect in imagemagick but can i create other effects for text like curved, arched, wedged, pinched etc.. just like wordart in word.
i am open to other packages that might help me get this thing done.. php or ruby..
Here are some examples: http://www.fmwconcepts.com/imagemagick/texteffect/index.php
If you are interested, you can run this shell script through php exec() function or any other language which provide you with such an ability.
Check out RMagick, which is a Ruby interface to the ImageMagick library.
There are interfaces for many other languages as well, including PHP.
Look here for an overview.
As Lars suggested, RMagick is a good choice for doing it in RoR. If you're looking in PHP, I'm not sure that it can do some of the things you're wanting to, but GD2 (which is usually natively included with PHP if you installed PHP with a package manager) is a good tool. There is also a PHP extension for ImageMagick.

Categories