[iText-questions] Two small issues in iTextSharp only

2011-06-21 Thread David Thielen
Version 4.1.6.0

Item 1:
The code below creates a bad PDF unless the add paragraph is uncommented.
  static void Main(string[] args)
  {
 Document document = new Document(new Rectangle(0, 0, 8.5f 
* 72.0f, 11 * 72));
 PdfWriter writer = PdfWriter.GetInstance(document, new 
FileStream(test_dotnet.pdf, FileMode.OpenOrCreate, FileAccess.ReadWrite));
 document.Open();

 document.Add(new Paragraph(JPG test));

 Image img = 
Image.GetInstance(c:\\test\\AmPro_logo_bw_HR.jpg);
 img.SetAbsolutePosition(72, 72 * 5);
 writer.DirectContent.AddImage(img);

 document.Close();

 Console.Out.WriteLine(all done);
  }

Item 2:
Image.GetInstance(AmPro_logo_bw_HR.jpg) looks in c:\ instead of the default 
directory.

Java version is fine on both issues.

- dave



David Thielen - CTO/founder
303-499-2544 x1185
720-352-0676 (cell)
www.windwardreports.comhttp://www.windwardreports.com/
World's coolest blog - Windward 
Wrocks!http://blogs.windwardreports.com/davidt/
Follow me on Twitter - David At Windwardhttp://twitter.com/DavidAtWindward

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Two small issues in iTextSharp only

2011-06-21 Thread Paulo Soares
Item 1: Works correctly in version 5.1.6.
Item 2: There's a fix for this and for default credentials not yet commited.

Paulo
  - Original Message - 
  From: David Thielen 
  To: itext-questions@lists.sourceforge.net 
  Sent: Tuesday, June 21, 2011 8:39 PM
  Subject: [iText-questions] Two small issues in iTextSharp only


  Version 4.1.6.0

   

  Item 1:

  The code below creates a bad PDF unless the add paragraph is uncommented.

static void Main(string[] args)

{

   Document document = new Document(new Rectangle(0, 0, 
8.5f * 72.0f, 11 * 72));

   PdfWriter writer = PdfWriter.GetInstance(document, new 
FileStream(test_dotnet.pdf, FileMode.OpenOrCreate, FileAccess.ReadWrite));

   document.Open();

   

   document.Add(new Paragraph(JPG test));

   

   Image img = 
Image.GetInstance(c:\\test\\AmPro_logo_bw_HR.jpg);

   img.SetAbsolutePosition(72, 72 * 5);

   writer.DirectContent.AddImage(img);

   

   document.Close();

   

   Console.Out.WriteLine(all done);

}

   

  Item 2:

  Image.GetInstance(AmPro_logo_bw_HR.jpg) looks in c:\ instead of the default 
directory.

   

  Java version is fine on both issues.

   

  - dave

   

   

   

  David Thielen - CTO/founder
  303-499-2544 x1185
  720-352-0676 (cell)

  www.windwardreports.com

  World's coolest blog - Windward Wrocks!

  Follow me on Twitter – David At Windward

   
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php