X-Received: by 2002:a0c:d486:: with SMTP id u6mr7815973qvh.56.1551966114904; Thu, 07 Mar 2019 05:41:54 -0800 (PST) X-Received: by 2002:a25:b448:: with SMTP id c8mr5714590ybg.269.1551966114407; Thu, 07 Mar 2019 05:41:54 -0800 (PST) Path: csiph.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!m21no3868507qta.0!news-out.google.com!o7ni1912qta.1!nntp.google.com!m21no3868506qta.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Thu, 7 Mar 2019 05:41:54 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=93.43.94.186; posting-account=sKzxtgoAAACwIiuwvlJrQFj1rLdBzQgc NNTP-Posting-Host: 93.43.94.186 References: <33a86a7a-f9d6-43ed-ba29-57c049239b25@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Javax Print : truncated document From: antonior0409@gmail.com Injection-Date: Thu, 07 Mar 2019 13:41:54 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Lines: 22 Xref: csiph.com comp.lang.java.programmer:38805 Il giorno gioved=C3=AC 7 marzo 2019 14:14:16 UTC+1, Eric Douglas ha scritto= : > On Thursday, March 7, 2019 at 6:19:36 AM UTC-5, antoni...@gmail.com wrote= : > > How can I do this? > > I'm looking for some solution but are still ignored > >=20 > > Is there an example? >=20 > Your sample code is not complete enough to see your problem. You need to= set the printable area to tell it where to print on the page. You can for= ce the margins to anything you want. > If you print a custom object, you can implement Printable and/or Pageable= and override the print method where you get an instance of the printer's g= raphics which should have an imageable value set to it's default margins. > I'm not clear what you're trying to print, what exactly is cut off, or ho= w you're printing it. Your sample here doesn't print anything. I'm printing a PDF as byte array, probably my code is wrong, have you sampl= e code?