Zitat von [email protected]:
Hi,
Hi,
I have a quick question about the Y-axis of the PDPage object, and why
it starts at the bottom of the page, rather than the top? We have an
application coded using AquaPDF that plots the Y-axis coordinates from
top to bottom - however I've noticed PDFBox plots the Y-axis from bottom
to top. Is there any way to reverse this? Or somehow flip the page?
I've tried the "setRotation" method on the page object, but this had no
effect.
Any help is much appreciated,
The pdf specification is based on postscript which use this unusual
coordinate system. You can use the mediabox of the page to calculate
your y coordinate. Try pdPage.findMediaBox().getUpperRightY() - y to
get the right position. If it isn't the getUpperRightY() you can try
it with getLowerLeftY() didn't know exactly which one it is.
Thanks in advance,
David
Best regards
Thomas
David Petrie
Registration Systems Project Team | National Records of Scotland |
South Search Room, New Register House, West Register Street, Edinburgh,
EH1 3YT |
Telephone: (0131 3144) 587
**********************************************************************
This e-mail (and any files or other attachments transmitted with it)
is intended solely for the attention of the addressee(s).
Unauthorised use, disclosure, storage, copying or distribution of
any part of this e-mail is not permitted. If you are not the
intended recipient please destroy the email, remove any copies from
your system and inform the sender immediately by return.
Communications with the Scottish Government may be monitored or
recorded in order to secure the effective operation of the system
and for other lawful purposes. The views or opinions contained
within this e-mail may not necessarily reflect those of the Scottish
Government.
Tha am post-d seo (agus faidhle neo ceanglan còmhla ris) dhan neach
neo luchd-ainmichte a-mhàin. Chan eil e ceadaichte a chleachdadh ann
an dòigh sam bith, a’ toirt a-steach còraichean, foillseachadh neo
sgaoileadh, gun chead. Ma ’s e is gun d’fhuair sibh seo le gun
fhiosd’, bu choir cur às dhan phost-d agus lethbhreac sam bith air
an t-siostam agaibh, leig fios chun neach a sgaoil am post-d gun
dàil.
Dh’fhaodadh gum bi teachdaireachd sam bith bho Riaghaltas na h-Alba
air a chlàradh neo air a sgrùdadh airson dearbhadh gu bheil an
siostam ag obair gu h-èifeachdach neo airson adhbhar laghail eile.
Dh’fhaodadh nach eil beachdan anns a’ phost-d seo co-ionann ri
beachdan Riaghaltas na h-Alba.
**********************************************************************