File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes XML to PDF in command line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML to PDF in command line" Watch "XML to PDF in command line" New topic
Author

XML to PDF in command line

Robert Jaeger
Ranch Hand

Joined: Apr 29, 2002
Posts: 62
Hi!
I already used Cocoon to convert XML to PDF on the fly with XSL (FOP) on web pages.
Now I am searching for a way to do the same, but on a client in the command line.
It would be necessary to create PDF using ...
a) one XML-source to create one PDF-file
b) one XML-source and different XSL-files to create multiple output (PDF)
c) multiple XML-sources to create one or more PDF-files.
The technology should moreover be able to create PDF-files on a more sophisticated level, which means with table of contents, text-anchors, links, ...
Does anyone know a way how I can do that (maybe with the cocoon environment, XT by James Clark, ...)?
Of course I don�t expect vaste explanations, just one or two valuable links or tipps.
Hope someone can help me,
Robito.
P.S.: In the near future I will use XT to generate HTML from XML-sources.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Why not use the same FOP stylesheets and the FOP processor to generate the PDFs? I guess you'd only need to write a simple shell script and perhaps a simple "main" Java class to invoke the FOP processor.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Robert Jaeger
Ranch Hand

Joined: Apr 29, 2002
Posts: 62
Hi!
Thanks, a good advice. That�s the way it goes.
Robito.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: XML to PDF in command line
 
Similar Threads
xml mathml pdf FOP
pdf certificates-how to do?
Create many XML-Outputs with one XSL-file
Report printing in java
easy way to view transformations