You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by pedro <pe...@libero.it> on 2007/09/07 16:09:52 UTC

Silent printing

Hi all. 
I want to print my document without preview,i try autogenerated PCL (dont
works fine) 
and i use the native methods to call acrobat dll,it's works bu if i want to
use another viewer or i dont want to install Acrobat Reader i'm ...... 
I try postscript but i haven't a good result. 
Any idea?
-- 
View this message in context: http://www.nabble.com/Silent-printing-tf4401538.html#a12556029
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Silent printing

Posted by pedro <pe...@libero.it>.
Hi Steve 
yes i try to print the java print service but i have different results on
different printer.The problem is that the customers have different printer
(brand and model).....





Steve Quirk wrote:
> 
> 
> 
> On Fri, 7 Sep 2007, pedro wrote:
> 
>>
>> Hi all.
>> I want to print my document without preview,i try autogenerated PCL (dont
>> works fine)
>> and i use the native methods to call acrobat dll,it's works bu if i want
>> to
>> use another viewer or i dont want to install Acrobat Reader i'm ......
>> I try postscript but i haven't a good result.
>> Any idea?
> 
> Have you tried using the java print services?  It can be a pain and I've 
> found that it works on some systems but not on others depending on how the 
> printer is configured.
> 
> Use fop to generate the PDF, PCL or Postscript data, then pass it to 
> javax.print.  PCL printing works for me, on windows.  Postscript seems to 
> work on Unix.  THe code I use is something like:
> 
>      byte[] data = /* the fop output */;
>      DocFlavor aFlavor = DocFlavor.BYTE_ARRAY.PCL;
>      Doc  aDoc = new SimpleDoc(data, aFlavor, null);
>      PrintService aService = /* look up your printer using
> PrintServiceLookup */;
>      DocPrintJob aJob = aService.createPrintJob();
>      aJob.print(aDoc, null);
> 
> You'll have to experiment with your installation, but that should work 
> after you fill in the missing bits.
> 
> Steve
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Silent-printing-tf4401538.html#a12590169
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Silent printing

Posted by Steve Quirk <sq...@ieee.org>.

On Fri, 7 Sep 2007, pedro wrote:

>
> Hi all.
> I want to print my document without preview,i try autogenerated PCL (dont
> works fine)
> and i use the native methods to call acrobat dll,it's works bu if i want to
> use another viewer or i dont want to install Acrobat Reader i'm ......
> I try postscript but i haven't a good result.
> Any idea?

Have you tried using the java print services?  It can be a pain and I've 
found that it works on some systems but not on others depending on how the 
printer is configured.

Use fop to generate the PDF, PCL or Postscript data, then pass it to 
javax.print.  PCL printing works for me, on windows.  Postscript seems to 
work on Unix.  THe code I use is something like:

     byte[] data = /* the fop output */;
     DocFlavor aFlavor = DocFlavor.BYTE_ARRAY.PCL;
     Doc  aDoc = new SimpleDoc(data, aFlavor, null);
     PrintService aService = /* look up your printer using PrintServiceLookup */;
     DocPrintJob aJob = aService.createPrintJob();
     aJob.print(aDoc, null);

You'll have to experiment with your installation, but that should work 
after you fill in the missing bits.

Steve



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org