Printing questions  
Author Message
Kurtz Weber





PostPosted: 2006-2-20 19:01:00 Top

java-programmer, Printing questions Hello!

I'm trying to develop an application to print PDF files, using JPedal.
Two questions:

1) I'd like users can specify printing properties, like size,
margins... following an example on JPedal site I tryed:

// new attribute set
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();

// dialog
printJob.printDialog(aset);

// read dialog properties
PageRanges r = (PageRanges)aset.get(PageRanges.class);
PageFormat pf = (PageFormat)aset.get(PageFormat.class);

but it doesn't work... :(
Is there a way to set those parameters via code? I need to set margins
to 0,0,0,0...

2) I'd like to improve the quality of printed docs... I think it uses
a very low quality to render my PDF (like 72dpi or so), is there a way
to increase dpi? In a PDFProducer for TFax I was able to do that
passing a bigger BufferedImage to Jpedal, is there a way to do the
same thing here (without redifining the print() method)?
Thanks!