Trying to produce PDF output crashes plantUML

0 votes
asked Mar 22, 2016 in Bug by anonymous

Hi!

When trying to produce PDF output plantuml crashes:

java.lang.ClassNotFoundException: org.apache.batik.apps.rasterizer.SVGConverter
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at net.sourceforge.plantuml.pdf.PdfConverter.convert(PdfConverter.java:51)
        at net.sourceforge.plantuml.UmlDiagram.exportDiagramInternalPdf(UmlDiagram.java:357)
        at net.sourceforge.plantuml.UmlDiagram.exportDiagram(UmlDiagram.java:225)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagramsActivityDiagram3(PSystemUtils.java:151)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:72)
        at net.sourceforge.plantuml.SourceFileReader.getGeneratedImages(SourceFileReader.java:210)
        at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:394)
        at net.sourceforge.plantuml.Run.processArgs(Run.java:316)
        at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:291)
        at net.sourceforge.plantuml.Run.main(Run.java:135)
Exception in thread "main" java.lang.UnsupportedOperationException
        at net.sourceforge.plantuml.pdf.PdfConverter.convert(PdfConverter.java:70)
        at net.sourceforge.plantuml.UmlDiagram.exportDiagramInternalPdf(UmlDiagram.java:357)
        at net.sourceforge.plantuml.UmlDiagram.exportDiagram(UmlDiagram.java:225)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagramsActivityDiagram3(PSystemUtils.java:151)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:72)
        at net.sourceforge.plantuml.SourceFileReader.getGeneratedImages(SourceFileReader.java:210)
        at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:394)
        at net.sourceforge.plantuml.Run.processArgs(Run.java:316)
        at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:291)
        at net.sourceforge.plantuml.Run.main(Run.java:135)

I'm using plantuml version 8036

I run it from Windows 7 (64 bit) command line as: java -jar %PLANTUML% -tpdf test.txt

The input file is simple:

@startuml
start
stop
@enduml

 

Regards, Ville

 

1 Answer

0 votes
answered Mar 22, 2016 by plantuml (294,960 points)
There are some additionnal jars needed for PDF

See http://plantuml.com/pdf.html
commented Jun 22, 2017 by anonymous
I have installed imagemagik and use the convert utility to create pdf. so far so good
commented Feb 3, 2019 by Fuhrmanator (1,700 points)
Hi - I'm having this UnsupportedOperationException problem with PlantUML and the link to the PDF jars is 404. Is there an updated link?

I'm trying to use PlantUML images in a LaTeX document without too much conversion. If I could export .puml to .pdf it would make my workflow simpler. How to get PDF export working?
commented Feb 3, 2019 by plantuml (294,960 points)
Thanks. The link is just fixed
commented Feb 3, 2019 by Fuhrmanator (1,700 points)
Thanks, got it working. I'm using visual studio code with latex and plantuml and it's very cool with PDF rather than png.
...