I cant tell you how to solve your pagesize problem because my experience
is that the pagesize can not in a portable way adjusted. While
postscript files do not neccessarily contain page size information pdf
files always contain page size information and because of that most
printers I know prefer to decide which inputray to use because of the
internal configured mediumtable.
A copy count information via lpr is very portable by using such a sequence:
for (int i = 0; i < copies; i++) {
cfA += ("ldfA" + jobid + user + "\n");
}
while building the control file. It works on every lpd I know.
If you feel adventurous you can try to use embedded postscript to switch
the input trays or medium size information. However you need to find out
how this has to be done in postscript on your printer before. And even
then it might be impossible if the printer pdf rip does not support
embedded postscript or his embedded postscript semantics do not allow to
override the automatic pdf based decision.
Best regards,
Carsten
yuanjk wrote:
Thanks for your reply.
The LPR seems a great tools to print on a LPD Server by java.
The printer which I used to print pdf is that Fujixerox DocuPrint C3530.
It support print pdf directly.
And I had wrote a programe by using javax.print.* directly to print pdf file.
and can print A4 size file correctly, but can not print the B4 size file
correctly, Alawys output A4 size page enen though I set the parameter B4.
------- the code begin ------
DocFlavor myFormat = DocFlavor.INPUT_STREAM.AUTOSENSE;
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(javax.print.attribute.standard.MediaSize.JIS.B4);
...
Doc myDoc = new SimpleDoc(new FileInputStream(FilePath), myFormat, null);
DocPrintJob job = service.createPrintJob();
job.print(myDoc, aset);
------- the code end ------
My problem is that
1 I can not set page size correctly
2 I do not know how to print pdf to then printer which do not support pdf
3 use AcrobatRead command can print pdf correctly, but not so fast and sometime
not stability
4 how to print pdf on different printer by only using java (seems difficult)
5 when I use LPR to print how can I modify the parameter (such as page size,
copies)
Thanks.
yuanjk
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions