OpenOffice 2.0 UNO update Links; need help

S

Sells, Fred

I've got a ~100 page document I assemble from ~30 OOo .odt files with some
search and replace functions. I then produce a PDF. So far so good.

Now I need to get a barcode from our internal website and insert that. The
barcode will vary based on some parameters. Our internal site provides a
..jpg image (or .gif) based on those parameters.

Can anyone provide a snippet or some pointers on how to do this. I've
googled it to death and checked the OOo DevGuide to no avail.

Either python or java solution is acceptable.


---------------------------------------------------------------------------
The information contained in this message may be privileged and / or
confidential and protected from disclosure. If the reader of this message is
not the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the sender
immediately by replying to this message and deleting the material from any
computer.
---------------------------------------------------------------------------
 
M

m.banaouas

Sells, Fred a écrit :
I've got a ~100 page document I assemble from ~30 OOo .odt files with some
search and replace functions. I then produce a PDF. So far so good.

Now I need to get a barcode from our internal website and insert that. The
barcode will vary based on some parameters. Our internal site provides a
.jpg image (or .gif) based on those parameters.

Can anyone provide a snippet or some pointers on how to do this. I've
googled it to death and checked the OOo DevGuide to no avail.

Either python or java solution is acceptable.
you can use urllib2 python module:

# TestGoogle.py
#
import urllib2
#
f = urllib2.urlopen('http://www.google.fr/images/nav_logo.png')
data = f.read()
f = file('nav_logo.png', 'w')
f.write(data)
f.close()

in your case, may be parameters are passed thru url to get a particular
barcode image (http://myserver/myapplication/barcode?format=xxx&id=yyy
etc. ...).
for authentication, if any, it needs a little more sophisticated coding.
 
T

Thomas Guettler

I've got a ~100 page document I assemble from ~30 OOo .odt files with some
search and replace functions. I then produce a PDF. So far so good.

Now I need to get a barcode from our internal website and insert that. The
barcode will vary based on some parameters. Our internal site provides a
.jpg image (or .gif) based on those parameters.

You can use pdftk to insert the barcode into the pdf.
(No python and OOo involved)

I think it is a very bad idea to use a jpg for the barcode. There
are many libaries which provide EPS. If you need an image format,
please use PNG. Jpeg is for images from a digital camera.

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top