Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #38790
| X-Received | by 2002:a0c:881d:: with SMTP id 29mr1282587qvl.13.1551785992739; Tue, 05 Mar 2019 03:39:52 -0800 (PST) |
|---|---|
| X-Received | by 2002:a81:d55:: with SMTP id 82mr502364ywn.278.1551785992475; Tue, 05 Mar 2019 03:39:52 -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!m21no8987783qta.0!news-out.google.com!y15ni4865qta.0!nntp.google.com!m21no8987782qta.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.java.programmer |
| Date | Tue, 5 Mar 2019 03:39:52 -0800 (PST) |
| 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 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <cc5addd3-217e-43e7-843e-114ef28f4993@googlegroups.com> (permalink) |
| Subject | Javax Print : truncated document |
| From | antonior0409@gmail.com |
| Injection-Date | Tue, 05 Mar 2019 11:39:52 +0000 |
| Content-Type | text/plain; charset="UTF-8" |
| Lines | 30 |
| Xref | csiph.com comp.lang.java.programmer:38790 |
Show key headers only | View raw
Hi,
I'm printing some NA LEGAl document using javax print but (only with java) I get truncated documents due to margin not properly aligned
So I'm trying to modify it but every attempt is ignored
below the used code:
private DocAttributeSet getDocAttributeSet(...) {
OrientationRequested orientationRequested = PageOrientationEnum.LANDSCAPE.name().equals(request.getPageOrientation()) ? OrientationRequested.LANDSCAPE : OrientationRequested.PORTRAIT;
DocAttributeSet docAttributeSet = new HashDocAttributeSet();
docAttributeSet.add(orientationRequested);
int width = Math.round(MediaSize.ISO.A4.getX(MediaSize.MM));
int height = Math.round(MediaSize.ISO.A4.getY(MediaSize.MM));
docAttributeSet.add(new MediaPrintableArea(0, 0, width/72f, height/72f, MediaPrintableArea.MM));
return docAttributeSet;
}
Whats I'm wrong?
Thanks in advance
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
Javax Print : truncated document antonior0409@gmail.com - 2019-03-05 03:39 -0800
Re: Javax Print : truncated document Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2019-03-06 17:22 -0600
Re: Javax Print : truncated document antonior0409@gmail.com - 2019-03-07 03:19 -0800
Re: Javax Print : truncated document Eric Douglas <e.d.programmer@gmail.com> - 2019-03-07 05:14 -0800
Re: Javax Print : truncated document antonior0409@gmail.com - 2019-03-07 05:41 -0800
Re: Javax Print : truncated document Eric Douglas <e.d.programmer@gmail.com> - 2019-03-07 07:16 -0800
Re: Javax Print : truncated document antonior0409@gmail.com - 2019-03-07 09:44 -0800
Re: Javax Print : truncated document Eric Douglas <e.d.programmer@gmail.com> - 2019-03-07 10:06 -0800
Re: Javax Print : truncated document antonior0409@gmail.com - 2019-03-08 10:33 -0800
Re: Javax Print : truncated document Eric Douglas <e.d.programmer@gmail.com> - 2019-03-08 11:34 -0800
Re: Javax Print : truncated document antonior0409@gmail.com - 2019-03-08 12:42 -0800
Re: Javax Print : truncated document Eric Sosman <esosman@comcast-dot-net.invalid> - 2019-03-08 16:13 -0500
Re: Javax Print : truncated document Eric Douglas <e.d.programmer@gmail.com> - 2019-03-08 14:04 -0800
csiph-web