Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
다음 코드 스니펫은 Aspose.PDF.Drawing 라이브러리와 함께 작동합니다.
때때로 애플리케이션 데이터가 포함된 기존 XML 파일이 있을 수 있으며 이러한 파일을 사용하여 PDF 보고서를 생성하고 싶을 수 있습니다. XSLT를 사용하여 기존 XML 문서를 Aspose.Pdf의 호환 XML 문서로 변환한 다음 PDF 파일을 생성할 수 있습니다. XML과 XSLT를 사용하여 PDF를 생성하는 단계는 3가지입니다.
XSLT를 사용하여 XML 파일을 PDF 문서로 변환하려면 다음 단계를 따르십시오:
<?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.