gswin32c.exe -dNOSAFER -dNOPAUSE -dBATCH -sDEVICE=mswinpr2
-sOutputFile="\\spool" "c:\myfile.pdf"
You can also do that with the Ghostscript-API (gsdll32.dll, you should
find C++ examples on the Ghostscript website).
As alternative, you can print PDFs with the Adobe Reader in two ways:
1.) Via Command Line
start acrord32.exe /p /h c:\test.pdf
Unfortunately the Adobe Reader doesn't close itself after printing.
2.) Via DDE
I attached a VB6-Module which does exactly that. Porting that to C++
shuoldn't be a problem.
Regards
Marcus
Audison...@gmail.com schrieb:
On Thu, 27 Jul 2006 17:00:26 +0200 QuoVadis <nbs...@directbox.com>
wrote:
> You can use Ghostscript to print PDF files from the command line.
Would have been my suggestion (or xpdf) if the OP has not said he was
searching for a free _and_ in the same moment commercially usable
software. Ghostscript is GPL/AFPL. Xpdf is GPL. So both require to
publish the source of a deriving application or to contact the devs for
an idividual licence, but that would probably not come for free.
Well, you could ignore Ghostscript's licence, like those cheap
Distiller substitutes. But that's not fair and one would deserve to get
sued for that.
OTOH, ghostscript could be included as-is, if that's possible. That
does not apply to embedding Ghostscript.
-hwh
Then If I only use the GhostScript-API, not the Product GhostScript,
does it also has any commercial usage restriction?
>Then If I only use the GhostScript-API, not the Product GhostScript,
>does it also has any commercial usage restriction?
An API to a product is a way of talking to the product.
For example, to use the Windows API, you must have Windows installed,
with whatever licensing issues it comes with.
Similarly, to use the GhostScript API, you must have GhostScript
installed, and its licensing terms apply.
The GhostScript API is not a separate thing in itself.
It may be worth noting that printing a PDF is a vastly complex task,
representing perhaps 2-10 years of full time programming. Someone who
has gone to that trouble is likely to put at least some conditions on
reuse of their code.
----------------------------------------
Aandi Inston qu...@dial.pipex.com http://www.quite.com
Please support usenet! Post replies and follow-ups, don't e-mail them.
Calling GS from the command line rather than using the API is IMHO no violation of the GPL nor the AFPL, as you do do not alter the code of GS at all
or do a static linking of the dll (but corrct me if I'm wrong).
> OTOH, ghostscript could be included as-is, if that's possible. That
> does not apply to embedding Ghostscript.
Making the user d/l and install GS shouldn't be a problem either.
Another option for your product could be a user-defined shell call using a placeholder like %1 for the PDF, so your end users can use any printing
system that suites their needs (GS, Adobe Reader by cmdline or DDE).
Regards
Marcus
> Hi,
>
> On Thu, 27 Jul 2006 17:00:26 +0200 QuoVadis <nbs...@directbox.com>
> wrote:
>
>> You can use Ghostscript to print PDF files from the command line.
>
> ... Adobe Reader by cmdline or DDE
Such as pdfp here: http://www.esnips.com/web/PDFTools
Automating Reader is a very good way to print PDF with high quality, so
long as you realize the limitations. Reader can't be fully automated,
since it displays error messages which must be responded to manually by
an operator. Therefore it can't be automated as a Windows Service or
on a headless server.