Free Support Forum -

PDF creation with XML and XLS with parameters

I’m trying to convert XML to PDF with a XLS-stylesheet. That goes well using XslFoLoadOptions
But what I cannot find in de documentation is how to add parameters defined in the XLS-document like this: <xsl:param name=“afbeelding”/>
By this way it is possible to add some variables that are not contained in the XML.
Can someone tell how to add these parameters when loading the XSL?


Can you please share the sample XML and XSL file with us along with the code snippet that you are using to generate PDF with these files? We will further test the scenario in our environment and address it accordingly.


The code we use is this:
public static void Example_XSLFO_to_PDF()
var _dataDir = @“C:\tmp”;
// Instantiate XslFoLoadOption object
var options = new Pdf.XslFoLoadOptions(“employees.xslt”);
// Create Document object
var pdfDocument = new Aspose.Pdf.Document(“employees.xml”, options);
pdfDocument.Save(_dataDir + “data_xml.pdf”);

That works fine with any xsl and xml file we have. My question is that in some cases there are variables defined in the xsl file like this <xsl:param name=“picture”/>, and I wonder if it is possible to include the values for these variables in Aspose. In the Apache Fop solutions there is a command like ‘-param [name] [value]’ that has to be sent along with the xsl and xml file.
What can be used in Aspose? I could not find it in the documentation.
Thanks! (i will attach a xsl file example where you can see the code for these variables at the beginning of the file) (4.2 KB)


We need to further investigate the feasibility of your requirements. For the purpose, an investigation ticket has been logged in our issue tracking system under the ID PDFNET-50068. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.