The page dimensions are usually integers and that limits the precision
to 0.35 mm. Without being able to reproduce the problem that's all I can
guess.
Paulo
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Andrew Bligh
> Sent: Wednesday, April 16, 2008 4:48 PM
> To: [email protected]
> Subject: [iText-questions] Image extracted from PDF file and
> scaled is slightly bigger than expected.
>
> Hi,
>
> I am drawing a 'container' as a rectangle with line thickness
> 0.1f wthin a pdf and then scaling an image to fit the
> container exactly (origian bottom left corner). If the image
> source is a jpeg or gif the fit is exact i.e. you can
> slightly see the contianer lines all the way around the
> image. If the image source is a PDf file and I extract the
> image from the first page like so:
>
> PdfReader reader = new PdfReader(
> location ) ;
> PdfImportedPage page =
> writer.getImportedPage( reader, 1 ) ;
> image = Image.getInstance( page ) ;
>
> then the image slightly overlaps the container to the right
> and top. The bottom and left sides of the container are ok
> but the image seems to be slightly taller and wider than
> expected. We are only talking about 0.2 of a mm here but this
> accuracy is vital to my application.
>
> Is this a known issue or am I doing something wrong?
>
> Thanks in advance,
>
> Andrew
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar