PDF export won't work with v1.2023.0

0 votes
asked Jan 13, 2023 in Bug by Dominik

Hi,

I tried to get the PDF export working with the current version of PlantUML (v1.2023.0)

Version Log:

PlantUML version 1.2023.0 (Mon Jan 09 19:31:34 CET 2023)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: UTF-8
Language: en
Country: US

PLANTUML_LIMIT_SIZE: 4096

Dot version: dot - graphviz version 2.43.0 (0)
Installation seems OK. File generation OK

I put the jars stated in the PDF documentation in the same folder. I got them from the fop-1.0 binaries.

But I get following error when trying to get a PDF output:

Exception in thread "main" java.lang.UnsupportedOperationException: PDF
        at net.sourceforge.plantuml.ugraphic.ImageBuilder.createUGraphic(ImageBuilder.java:432)
        at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageInternal(ImageBuilder.java:273)
        at net.sourceforge.plantuml.ugraphic.ImageBuilder.write(ImageBuilder.java:245)
        at net.sourceforge.plantuml.project.GanttDiagram.exportDiagramNow(GanttDiagram.java:177)
        at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:179)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagramsDefault(PSystemUtils.java:197)
        at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:88)
        at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:187)
        at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:519)
        at net.sourceforge.plantuml.Run.processArgs(Run.java:402)
        at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:369)
        at net.sourceforge.plantuml.Run.main(Run.java:204)

Is PDF support with the current version not supported anymore, or did I do something wrong?

Thanks in advance!

1 Answer

0 votes
answered Jan 13, 2023 by Todd Musheno (2,680 points)
Could you post the command you are executing (specifically the arguments)?
commented Jan 14, 2023 by Dominik

So I found the problem:
I tried to gather the jar files myself directly from apache.org. But the documentation is not really clear about which exact versions to use (especially fop). Also, ant (and its version) seems to be missing in the documentation.

After downloading the prepacked zip with all the necessary jars, it was working flawlessly.

Maybe the documentation should be more straightforward which exact binaries are needed. I would be improving it myself, but based on my question here, I still don't know which are the right ones.

...