jmggrf
22nd August 2013, 16:32
Hello BaanBoard,
I am trying to figure out a way to print a pdf file that is on a server to my default windows printer from a Baan session. Has anyone done this before?
Is there a predined function to print a file on a server?
Our Baan server is Win8.
regards

bhushanchanda
22nd August 2013, 18:43
Hi,

Use server.to.client() function to move the file on your machine and use app_start() function to open the pdf file. Then you can print it manually.

And be sure to add :- #include <bic_desktop>.

bdittmar
22nd August 2013, 20:09
Hello BaanBoard,
I am trying to figure out a way to print a pdf file that is on a server to my default windows printer from a Baan session. Has anyone done this before?
Is there a predined function to print a file on a server?
Our Baan server is Win8.
regards

Hello,
your profile says : BaaN IV

Use : ottdllbw

Regards

bhushanchanda
22nd August 2013, 21:09
Hi Bdittmar,


I thought it was for LN and bic_desktop for IV. I even edited my post ;)

Anyway, so jmggrf, as he said you should use

#pragma used dll ottdllbw instead of #include <bic_desktop>.

jmggrf
23rd August 2013, 15:55
Thanks very much for the responses.
Bhushan, will app.start() open the pdf up and then I can print using the -file-print command in adobe reader, i.e.'Then you can print it manually'. If this is so that would be nice but the users want it to print automatically so I was wondering is it possible to shell out (or?) and just print the pdf file without opening it and without manually.
Regards...

bhushanchanda
23rd August 2013, 17:51
Hi,

Well its app_start(). Yes, app_start() with proper parameters will launch the PDF file you require.

For the second question:-

If you are just creating report in PDF, you can set a device in PDF and print the report using the device.

If you want to print the files, which are already on server, you can use PRINT command of Windows. Check the following thread which will help you to do it.

Link 1 (http://en.wikipedia.org/wiki/PRINT_(command))

Link 2 (http://www.brooksnet.com/content/how-print-pdf-files-command-line-windows-printer)

Link 3 (http://www.robvanderwoude.com/printfiles.php)

I usually let my users view the file before printing them. But, if your requirement is to directly print them, I would say its possible. You will need to create bat file at run time using seq.* functions having PRINT command with required parameters and then move the bat file to your machine using server.to.client() function and run it using app_start() function.

Abigail111
22nd November 2013, 05:38
HI there
My setup is windows 8.And i usually print the pdf files using the following code:
using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.PDF;

RasterEdgeImaging PDF = new RasterEdgeImaging();

public void Pdf Print (http://www.rasteredge.com/how-to/csharp-imaging/pdf-print/)();
{
PDFInputFile = (@"C:/1.pdf");
PDFPageNumberStart = "0";
PDFPageNumberStop = "4";
Printer = (@"C:/ HP Color LaserJet 5550 PCL 6");
};
PDF. PdfProcessorPrint(@"C:/1.pdf", "0","4", @"C:/ HP Color LaserJet 5550 PCL 6");

juantxu
17th July 2014, 15:33
Is RasterEdge free ? Is needed any installation or only copy files? The code you have writed is in visual studio, isnt it?how you interface it with baan?

xnks