The positioning in pdf is from the bottom left. By the way, the code you
presented has nothing to do with this pdf.



> -----Original Message-----
> From: Firouz Bharthania [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 12, 2006 4:41 PM
> To: Paulo Soares
> Subject: RE: [iText-questions] positioning image in a page
> 
> Paulo,
> 
> Thank you for your attention.
> Here I have attached the original tif image and the pdf I 
> created from it.
> You can see that the image is shifted down about 2mm.
> 
> Regards
> Firouz
> 
> -----Original Message-----
> From: Paulo Soares [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 12, 2006 2:20 AM
> To: fpcs; [email protected]
> Subject: RE: [iText-questions] positioning image in a page
> 
> It would be helpful to see the pdf. 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On 
> Behalf Of fpcs
> > Sent: Thursday, January 12, 2006 12:57 AM
> > To: [email protected]
> > Subject: [iText-questions] positioning image in a page
> > 
> > Hi,
> > 
> > I'm trying to position a tiff image in the page but although 
> > I set the absolut
> > position to be at (0,0) still it gets shift down abot 2mm.
> > 
> > I appriciate if any body helps me with it. Let me know if you 
> > need the PDF file.
> > 
> > Here is my peice of code:
> > 
> >    BufferedImage img = sourceImage;
> >    Document document =
> >    new Document(PageSize.LETTER, 0, 0 , 0, 0);
> >    PdfWriter writer = PdfWriter.getInstance(document, os);
> >    document.open();
> >    com.lowagie.text.Image image = 
> > com.lowagie.text.Image.getInstance(img, null);
> >    image.scaleToFit(document.getPageSize().width(),
> >                         document.getPageSize().height());
> >    image.setAlignment(com.lowagie.text.Image.MIDDLE);
> >    image.setAbsolutePosition(0, 0);
> >    writer.getDirectContent().addImage(image);
> > 
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep 
> > through log files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  
> > DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> > _______________________________________________
> > iText-questions mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > 
> 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to