tags:

views:

135

answers:

1

I am looking to convert a non-XFA PDF to PCL in a Workbench process and am not having any luck with geneartePrintedOutput service. I retrieve a flattened PDF from Contentspace (using retrieveContent) and need to convert the non-XFA PDF to PCL without sending it to a printer right away. Are we not able to achieve this with generatePrintedOutput? Are there any other options?

A: 

I don't know LiveCycle but what I do know is you could run the resulting PDF through Ghostscript, via the command line, with the -sDevice=ljet5 (for example), this file could then be sent to the printer by copying it to the UNC of a share.

I believe you could even just put the UNC to the printer share as the output for Ghostscript like this:

gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=ljet5 -sOutputFile=\\server\printershare\pdfdocument.pcl c:\pdfdocument.pdf

Otherwise, just put a filename in and then copy like this:

gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=ljet5 -sOutputFile=c:\pdfdocument.pcl c:\pdfdocument.pdf
copy c:\pdfdocument.pcl \\server\printershare

You may also be able to simply pass in the PDF stream in memory to Ghostscript as it supports STDIN.

If you'd rather not just copy the file to a UNC you can pass the resulting file/bytes directly into a printer installed locally using C# or VB etc. How to send raw data to a printer by using Visual C# .NET.

Douglas Anderson