I am seriously considering to buy some products, but there are some issues i am having with the free trial version. I use version 4.4.
First of all my code:
- Code: Select all
Document document = new Document();
Section s = document.AddSection();
s.PageSetup.PageSize = PageSize.A3;
s.PageSetup.Orientation = PageOrientation.Landscape;
InsertHeaderAndFooter(s);
Paragraph paragraph = s.AddParagraph();
paragraph.Text = "Test1";
Table t = s.AddTable();
TableRow r = t.AddRow(2);
TextRange tr = r.Cells[0].AddParagraph().AppendText("test");
tr.CharacterFormat.FontName = "comic sans ms";
//add image to 2nd column
TableCell c = r.Cells[1];
c.Width = 400F;
Paragraph p = c.AddParagraph();
p.AppendPicture(new Bitmap(@"C:\temp\image1.jpg"));
document.SaveToFile(@"C:\temp\test.docx", FileFormat.Docx2010);
document.SaveToFile(@"c:\temp\sample1.pdf", FileFormat.PDF);
Issue 1)
This code first add's text to the document and after that, a table.
In the second cell of the first row, i have set width of the cell to 400F, and added a picture.
In the result (Capture0001) you can see that the image is added to the second cell, but the size of the cell is set to the first cell.
When i save this document as PDF, there are several problems:
Issue 2)
The layout of the PDF is different: The first text-paragraph is placed inside the header area. In the word-document it is placed beneath this area.
Issue3)
The 1 page word-document is saved as a 2 page PDF document, with an empty second page (only headers/footers are included)
Issue3)
The table included in the word-document is not converted to the pdf.
See Capture0002
Are these issues bugs, or am i doing something wrong?
Thanks in advance,
Johan