Aspose.PDF 23.9.0
We are trying to certify Aspose.PDF to replace our existing ibex/pdfsharp libraries, and we have noticed some very different formatting coming back from the pdfs we generate with Aspose. Attached is an xslt that has worked for us in the past that seems to be causing problems with Aspose. In the PDF that is generated (also attached), the title and bullet point items seem to be pushed far to the right. The only way we have been able to fix is to delete entire table cells.
Is there some configuration issue we need to set for our xslt file? Right now we are using the XSLCompileTransform api consistent with this code snipped below
Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense("Aspose.PDF.NET.lic");
XmlWriterSettings settings = new XmlWriterSettings
{
OmitXmlDeclaration = true,
Indent = false
};
XslCompiledTransform transform = new XslCompiledTransform(true);
using (XmlReader reader = XmlReader.Create(new StringReader(File.ReadAllText(xsltPath))))
{
transform.Load(reader);
}
string transformedFoXsl = string.Empty;
using (MemoryStream xml = new MemoryStream())
using (UTF8StringWriter xmlWriterResults = new UTF8StringWriter())
using (XmlWriter xmlWriter = XmlWriter.Create(xmlWriterResults, settings))
{
xmlDoc.Save(xml);
xml.Position = 0;
using (XmlReader reader = XmlReader.Create(xml))
{
transform.Transform(reader, xsltArgumentList, xmlWriter);
}
transformedFoXsl = xmlWriterResults.ToString();
}
File.WriteAllText(xsltFileName, transformedFoXsl);
using (var AsposePdfDocument = new Document(xsltFileName, new XslFoLoadOptions()))
{
string outputPdfFileName = Path.ChangeExtension(Path.GetTempFileName(), "PDF");
AsposePdfDocument.Save(outputPdfFileName, SaveFormat.Pdf);
}