fix: PDF servlet

Since the update of `bastik` the PDF servlet didn't work anymore.

Problems:
- No PDF UnitTest existed
- Pom dependency `org.apache.xmlgraphics.batik-all` change nearly every dependency to `optional` starting with version `1.15`, hence some important dependencies like the SVG converter were missing
- `DiagramResponse.CONTENT_TYPE` had no mime type value for PDF

Changes:
- add PDF UnitTest
- remove `batik-all` dependency and only include the dependencies PlantUML requires for the PDF generation:
  * batik-dom
  * batik-svgrasterizer (includes batik-dom)
  * batik-svggen
  * fop
- remove own `DiagramResponse.CONTENT_TYPE` mapping and use `FileFormat.getMimeType()`
This commit is contained in:
Florian
2023-05-07 20:45:29 +02:00
committed by PlantUML
parent a6e69b33eb
commit 6538be2047
5 changed files with 85 additions and 44 deletions

View File

@@ -91,7 +91,6 @@ public class ProxyServlet extends HttpServlet {
try {
srcUrl = new URL(source);
} catch (MalformedURLException mue) {
mue.printStackTrace();
response.sendError(HttpServletResponse.SC_BAD_REQUEST, "URL malformed.");
return;
}