| | |
| | | File pdffile = new File(adocfile.getParentFile(), fname + DOT + PDF); |
| | | outfile = pdffile; // PDF soll zurueckgegeben werden |
| | | if(!pdffile.exists() || adocfile.lastModified() > pdffile.lastModified()) { |
| | | response.setContentType("application/pdf"); |
| | | transform(absname, PDF); |
| | | } |
| | | } |
| | |
| | | private void transform(String fileName, String backend) { |
| | | Map<String, Object> attributes; |
| | | File outFile = new File(fileName); |
| | | String thisDirName = outFile.getParent(); |
| | | File pdfStyles = new File(outFile.getParentFile(), "custom-theme.yml"); |
| | | if(pdfStyles.exists()) { |
| | | attributes = attributes() |
| | | .attribute("pdf-themesdir", outFile.getParent()) |
| | | .attribute("pdf-themesdir", thisDirName) |
| | | .attribute("pdf-theme","custom") |
| | | .attribute("pdf-fontsdir", thisDirName + "/fonts") |
| | | .attribute("allow-uri-read") |
| | | .sourceHighlighter("highlightjs") |
| | | .asMap(); |
| | | } else { |