We are evaluating the Aspose PDF and so far we are VERY happy with the results. We are using the XML with an XSLT stylesheet.
Please can you help:
Our test invoice needs a header that has a logo on left 50% of the page, with Company details and address on right 50% of the page.
We have setup a table as: < Section PageHeight="1684" > < Table ColumnWidths="60 140 100 180" > ...etc...
Our question is how to get the logo to appear on the right 50% of the page? And what is the best practice way to do this?
We have tried a background image but this does not work properly. In a std. html table we would merge the 2 columns on the left and place the logo in that.
Problem is that the table has multiple rows with Company address details.
We need a way to add image to one column with all cells in that colums to be merged. So that the image does not expand in just one top row and push all the other rows below.
Is it possible to put sub-table in column where the company details go?
How will I add image in table cell using VB code? Also In table cell I want to added first part of text in bold and second part of text in normal format. can you some sample code for this?
Dim pdf1 As Pdf = New Pdf Dim sec1 As Section = pdf1.Sections.Add
Dim tab1 As Table = New Table sec1.Paragraphs.Add(tab1) tab1.ColumnWidths = "100 200" tab1.DefaultCellBorder = New BorderInfo(BorderSide.All) Dim row1 As Row = tab1.Rows.Add
Dim cell1 As Cell = row1.Cells.Add Dim img1 As Image = New Image img1.ImageInfo.File = "c:/images/apple.jpg" img1.ImageInfo.ImageFileType = ImageFileType.Jpeg cell1.Paragraphs.Add(img1)
Dim cell2 As Cell = row1.Cells.Add Dim text1 As Text = New Text("This is text para 1") text1.Segments(0).TextInfo.FontName = "Times-Bold" cell2.Paragraphs.Add(text1)
Dim text2 As Text = New Text("This is text para 2") cell2.Paragraphs.Add(text2)