> On 28 Jun 2015, at 09:05, Alex Sviridov <[email protected]> wrote:
> 
> Thank you for your help. I wrote new message to mailing list. I think that my 
> mailing service is also a little buggy :)
> 
> I can't understand why it became so complicated? Maybe there are simpler ways?

It certainly doesn't need to be so complicated, something like this should work:

HashPrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet();
attributes.add(new PageRanges(1));
printJob.print(new PDFPrinter(), attributes);
-- John

> 
> 
> 
> Воскресенье, 28 июня 2015, 17:43 +02:00 от Tilman Hausherr 
> <[email protected]>:
>>> Am 28.06.2015 um 16:02 schrieb Александр Свиридов:
>>> How can I print certain page using pdfbox 2.0?
>> 
>> 
>> 
>> I don't do printing... I googled a bit and found this solution
>> http://www.java2s.com/Code/Java/2D-Graphics-GUI/Printingofamultipagebook.htm
>> 
>> that extends Printable, and limits the page in the print() method.
>> 
>> See also
>> http://www.javaworld.com/article/2076250/core-java/printing-in-java--part-2.html
>> 
>> 
>> Tilman
>> 
>> 
>> 
>> (Sorry, now I accidentally sent this to you instead of to the mailing 
>> list...aaargh!)
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:  [email protected]
>> For additional commands, e-mail:  [email protected]
> 
> 
> -- 
> Alex Sviridov

Reply via email to