Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
El siguiente fragmento de código también funciona con la biblioteca Aspose.PDF.Drawing.
A veces puede tener archivos XML existentes que contienen datos de la aplicación y desea generar un informe PDF utilizando estos archivos. Puede usar XSLT para transformar su documento XML existente en un documento XML compatible con Aspose.Pdf y luego generar el archivo PDF. Hay 3 pasos para generar un PDF usando XML y XSLT.
Por favor, siga estos pasos para convertir un archivo XML en un documento PDF usando XSLT:
<?xml version="1.0" encoding="utf-8" ?>
<Contents>
<Content>Hello World!</Content>
</Contents>
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="text()"/>
<xsl:template match="/Contents">
<html>
<Document xmlns="Aspose.Pdf" IsAutoHyphenated="false">
<PageInfo>
<DefaultTextState
Font = "Helvetica" FontSize="8" LineSpacing="4"/>
<Margin Left="5cm" Right="5cm" Top="3cm" Bottom="15cm" />
</PageInfo>
<Page id="mainSection">
<TextFragment>
<TextSegment>
<xsl:value-of select="Content"/>
</TextSegment>
</TextFragment>
</Page>
</Document>
</html>
</xsl:template>
</xsl:stylesheet>
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.