Re: pdf converter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adil Drissi wrote:
Hi,

Is there any tool to convert openoffice documents to pdf?


If you are asking 'Is there a way to convert office documents to pdf on the command line using open office', then yes, there is.

However it is not easy. It requires a macro for the user doing the conversion. It requires an X session, even in non display (invisible) mode, so you may need to run it against the fake X server on headless systems.
Finally, it requires a specially crafted command line.

Here is a sample script, in which we run the fake X server on a headless system, so it is display 0.

---

#!/bin/bash
# doc2pdf -- convert office type documents to PDF

if [ -z "$1" ]
   then
   echo "Usage: $0 <file.doc>"
   exit -1
fi

DISPLAY=:0
export DISPLAY

# macro is in: ~/.openoffice.org2.0/user/basic/Standard/Module1.xba

DOC=$1
/usr/bin/oowriter -invisible "macro:///Standard.Module1.ConvertWordToPDF($DOC)"

exit $?

---

Here is the sample macro file: Its kinda large, so I have it as a link if you are interested.

http://themeyerfarm.com/palm/Module1.xba


Good Luck!


--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux