With these two files, the Apache FOP command to create the PDF file would be: fop -xml persons.xml -xsl hello.xsl -pdf hello.pdf. This command is performing 2 steps in one call: Processing the XSLT to create the FO file; Creating the PDF from the FO file; As we have seen, if your data native format is XML, you can create user friendly PDF. PDF/A-1 is the first part of the standard and is documented in ISO 19005-1:2005(E). Work on PDF/A-2 is in progress at AIIM. Design documentation on PDF/A can be found on FOP's Wiki on the PDFA1ConformanceNotes page. I have tried to use Apache FOP to convert HTML to PDF. ( HTML -XHTML- XSL-FO - PDF). I used the xhtml2fo.xsl from Antenna House for the xhtml - XSL-FO conversion. It works for simple html files. It does not work for html files with styling ( via embedded css or by style attribute). A PDF is created but completely unformatted. Apr 11, 2019 Create PDF files from XML in Java using Apache FOP. To produce a PDF file from a XML file, first step is that we need an XSLT stylesheet that converts the XML to XSL-FO. The second step will be done by FOP when it reads the generated XSL-FO document and formats it to a PDF document.