Hi,
I've created my PDF document, now I want to sent it directly to the printer, preferablly without having to write the file to disk. Is this possible? If I do have to write the file to disk, can I print the document without having to display the PDF reader application?
TIA
Printing Dynamic PDF Programmatically
Re:Printing Dynamic PDF Programmatically
Support · Nov 7, 2005We do not have any built-in printing capabilities within our Generator products. We do however usually recommend using GhostScript, www.ghostscript.com
to accomplish all your printing needs.
GhostScript is a free product and has worked for many customer's printing needs in the past.
Thanks,
ceTe Software Support Team
Re: Printing Dynamic PDF Programmatically
Forum member · Nov 11, 2005Can You give the sample code for printing the PDF Directly..
-Sridhar
Re: Printing Dynamic PDF Programmatically
Support · Nov 11, 2005Hello Sridhar,
Currently we do not have any sample code for printing PDF dicrectly using Ghostscript in integration with our product.
But we will be posting some code shortly.
Thanks,
ceTe Software Support Team
Re: Printing Dynamic PDF Programmatically
Forum member · Nov 11, 2005Can you give some ideas how can we Print the PDF generated without opening it.
Re: Printing Dynamic PDF Programmatically
Support · Nov 11, 2005Hello,
The example that we are working on will provide this functioanlity where the PDF will be printed without opening it.
Thanks,
ceTe Software Support Team
Re: Printing Dynamic PDF Programmatically
Support · Nov 14, 2005Hello,
Following is the example which shows integration of Ghostscript with our product.
Note: In order to use the System.Diagnostics.Process class you will have to include "using System.ComponentModel" class library.
C# Code:
ceTe.DynamicPDF.Document document = new ceTe.DynamicPDF.Document();
ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page( PageSize.Letter, PageOrientation.Portrait );
Label label = new Label( "Hello World", 0, 0, 504, 100, ceTe.DynamicPDF.Font.Helvetica, 18, TextAlign.Center );
page.Elements.Add( label );
document.Pages.Add( page );
document.Draw( @"C:\Temp\HelloWorld.pdf" );
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "C:\\gs\\gs8.50\\bin\\gswin32c.exe";
process.StartInfo.Arguments = "-dNOPAUSE -dNoCancel -sDEVICE=mswinpr2 -sOutputFile=\"%printer%<Your Printer Name>\" \"C:\\Temp\\HelloWorld.pdf\" -c quit";
process.Start();
The above code is written using Ghostscript v8.50.
Thanks,
ceTe Software Support Team.
Re: Printing Dynamic PDF Programmatically
Forum member · Dec 1, 2005Hi
this should work well, if you are handling the PDF at the client with your application. Unluckily we are "drawing the PDF to the web".
There is a software competing with ours (output of a AVIS rental agreement as a PDF over an internet browser) which is able to send the PDF directly to the printer. With our solution the user (rental sales agent) has to explicitly print the document via 2 additional mouseclicks.
I suspect that the "other" solution is using JavaScript to redirect the output directly to a standard printer. Since the generator is not able to handle document level JavaScript we are looking for an alternative solution.
Best regards,
Ulf
Re: Printing Dynamic PDF Programmatically
Forum member · Jun 6, 2006Is is possible to print to a post script driver. I am trying to
print multiple PDF documents to one print job (visible in the print queue).
Re: Printing Dynamic PDF Programmatically
Support · Jun 6, 2006Hello,
Yes, we have not had any problems printing the PDF generated using our product to a post script print driver.
Thanks,
ceTe Software Support Team
Re: Printing Dynamic PDF Programmatically
Forum member · Jun 20, 2006Do you have any examples showing how to do this?
Re: Printing Dynamic PDF Programmatically
Support · Jun 20, 2006Hello,
We do not have any other code examplees specific to the post script printers. Please refer to the code posted above which is for general printers.
You may want to consult the GhostScript web site for more details on printing using the post script printer driver.
Thanks,
ceTe Software Support Team