Writing into pdf from xml

Hi,

I am trying to print one table containing all data into two separate tables on same page in pdf from xml file but I couldnt find any suitable methods in aspose.pdf for java to achieve the above requirement.

Can anybody help me out. Currently i have attached the pdf file where the table is being repeated in second page.So i want the table on next page to be on same page on the right hand side.


This message was posted using Page2Forum (attachment) from Aspose.Pdf for .NET and Java - Documentation

Hello Suchira,

Thanks for considering Aspose.

In order to accomplish your requirement, you can create a main table with one row and two columns and add the first table with data into First column of the main outer table and add the second table with data into second column of the main outer table.

I would suggest you to visit the following link for information on Working with Tables.

In order to display both the tables over the same page, you may also need to adjust the page size and margin settings. For related information, please visit Set Page Size and Margins.

In case you still face any problem, please share the resource XML file so that we can test the issue at our end.

Hi Please find attached the xml file which i am converting into pdf

Hi

Actually I am trying to set the page margin in my xml file because the two tables are getting overlapped on the same page but I am unable to do so.

Please help me out.

Plase find attached the latest xml file

Hello Suchira,

In order to display two tables side by side over the single page, you need to adjust the page width so that it must be greater than the combined width of two tables. Please try adding the following information PageWidth="800" in the Section tag of the XML file. (you can also set the page width according to your own requirements).

Beside this, you can also try setting the page orientation to Landscape as in this case the two tables are being displayed properly. Please try adding IsLandscape="True" to Section tag in XML file.

The resultant PDF files generated in both the cases is in attachment, please take a look.

Hi,

Thanks a lot for your help. It has solved my problem