简体   繁体   中英

XSL Transformation to create PDF

I have an application in which I get data in XML and need to create PDFs on the basis of that data. The design of PDFs isn't static and will be defined by users. I want to do it using XSLT.

Please have a look at the attached PDF and suggest whether creating this type of PDF through XSLT is feasible and advisable. If yes, then some possible way to start and if no, then some alternatives would be really helpful.

Sample PDF - https://sabercathost.com/23Ye/ac.pdf

Thanks

Nitin

You are not able to render a PDF via XSLT. XSL transformations convert XML data into other formats (eg XML to XHTML).

There are several ways to render either formatting object language (FO) or HTML (+ paged media CSS) valid data with a PDF render tool such as the AntennaHouse Formatter (FO, HTML + CSS, XML + CSS), Prince or the open source software Apache FOP.

So your PDF rendering process should look like this:

  1. Data Transformation via XSL into either XHTML or FO
  2. PDF rendering with a PDF rendering Tool

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM