Hi Changsha,
I would like to check with you regarding the formatting differences between Aspose.Word and Aspose.Pdf.
I use Aspose.Word for the report template and then use Aspose.Pdf to convert into pdf file.
However, I find that the formatting of the cells is different in Aspose.Word and Aspose.Pdf.
I centralized everything in the cells in Aspose.Word template; the .doc file also showed the correct formatting;
but the pdf file is not showing the correct formatting.
Can you help?
This one shown by .doc file; table header (Note that the table content also has this problem).
This one shown by .pdf file. The table content also showed the wrong formatting.
(Attached)
Code is straight-forward from aspose samples:-
Document doc = _Execute(mainKey);
if (ReportParams.WordDir != null && ReportParams.WordDir.ToString() != "")
doc.Save(ReportParams.WordDir + mainKey + ".doc", SaveFormat.Doc);
//convert doc to pdf
string xmlFile = ReportParams.XMLDir + mainKey + ".xml";
doc.Save(xmlFile, SaveFormat.AsposePdf);
Aspose.Pdf.Pdf rptPDF = new Aspose.Pdf.Pdf();
//can add xsl if needed for the report
rptPDF.BindXML(xmlFile, null);
rptPDF.Save(ReportParams.PdfDir + mainKey + ".pdf");
Please advise soon.
Thank you,
luke
This message was posted using Email2Forum by codewarior.