BigJohn
19th February 2004, 20:45
Hi,
I am on Baan IV c3/UNIX.
I have some PDF files which are stored on the UNIX box.
I need to print them thru my Baan session/script.

I tried shell("lp -d devicenname filename.pdf").
I prints junk.

How do I make it print properly?
Thanks.

lbencic
19th February 2004, 21:21
You can check this post (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=590&highlight=PDF) about PDF's

~Vamsi
19th February 2004, 22:48
Lisa,

Thanks for the plug :). Alas, in this case those solutions will not work. The file to be printed is already PDF.

BigJohn,

Here is a simple work around.

Copy the file to the client computer (use server2client) and follow up with launching the PDF document. This should bring up the file in Acrobat Reader. User can then print to any windows printer installed on his machine.

If the above is not an acceptable solution, and you need to print only from Unix unattended, here is how the problem could be approached.

Install acroread for your flavor of Unix.
In your script, then convert the PDF file to Postscript
$ acroread -toPostScript [pdf_file]
print the resulting file to a Postscript capable printer
shell("lp -d devicenname filename.ps")

I quoted the function shell from your posting. run.prog or run.baan.prog is preferred.

AndreasSchmitt
3rd March 2004, 16:33
with cups as printing system, printing of pdf files
is very simple. With this technique you can also
direct the output to a special mailbox of your printer
and get the paper from a special papaer bin.

I'm still experimenting with CUPS but it seems to be
really stable.

BigJohn
19th March 2004, 20:15
How do I print to a printer which does not support PostScript?
Thanks,
BigJohn

AndreasSchmitt
22nd March 2004, 09:41
CUPS renders ps files for non ps printers !