Added imgSrcPath parameter for use in docbookFopPdf task.
This commit is contained in:
parent
51a53ddbaa
commit
49242729e4
|
@ -72,6 +72,8 @@ public class Docbook extends DefaultTask {
|
||||||
|
|
||||||
String admonGraphicsPath;
|
String admonGraphicsPath;
|
||||||
|
|
||||||
|
String imgSrcPath;
|
||||||
|
|
||||||
@InputDirectory
|
@InputDirectory
|
||||||
File sourceDirectory = new File(project.getProjectDir(), "src/docbook");
|
File sourceDirectory = new File(project.getProjectDir(), "src/docbook");
|
||||||
|
|
||||||
|
@ -115,11 +117,15 @@ public class Docbook extends DefaultTask {
|
||||||
}
|
}
|
||||||
|
|
||||||
transformer.setParameter("highlight.xslthl.config", new File(highlightingDir, "xslthl-config.xml").toURI().toURL());
|
transformer.setParameter("highlight.xslthl.config", new File(highlightingDir, "xslthl-config.xml").toURI().toURL());
|
||||||
|
}
|
||||||
|
|
||||||
if (admonGraphicsPath != null) {
|
if (admonGraphicsPath != null) {
|
||||||
transformer.setParameter("admon.graphics", "1");
|
transformer.setParameter("admon.graphics", "1");
|
||||||
transformer.setParameter("admon.graphics.path", admonGraphicsPath);
|
transformer.setParameter("admon.graphics.path", admonGraphicsPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (imgSrcPath != null) {
|
||||||
|
transformer.setParameter("img.src.path", imgSrcPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
preTransform(transformer, srcFile, outputFile);
|
preTransform(transformer, srcFile, outputFile);
|
||||||
|
@ -257,9 +263,9 @@ class DocbookFoPdf extends Docbook {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!foFile.delete()) {
|
/* if (!foFile.delete()) {
|
||||||
logger.warn("Failed to delete 'fo' file " + foFile);
|
logger.warn("Failed to delete 'fo' file " + foFile);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private File getPdfOutputFile(File foFile) {
|
private File getPdfOutputFile(File foFile) {
|
||||||
|
|
|
@ -33,7 +33,8 @@ project('manual') {
|
||||||
docbookHtmlSingle.stylesheet = new File(projectDir, 'src/xsl/html-single-custom.xsl')
|
docbookHtmlSingle.stylesheet = new File(projectDir, 'src/xsl/html-single-custom.xsl')
|
||||||
docbookFoPdf.stylesheet = new File(projectDir, 'src/xsl/pdf-custom.xsl')
|
docbookFoPdf.stylesheet = new File(projectDir, 'src/xsl/pdf-custom.xsl')
|
||||||
def imagesDir = new File(projectDir, 'src/docbook/images');
|
def imagesDir = new File(projectDir, 'src/docbook/images');
|
||||||
docbookFoPdf.admonGraphicsPath = "${imagesDir}/"
|
// docbookFoPdf.admonGraphicsPath = "${imagesDir}/"
|
||||||
|
docbookFoPdf.imgSrcPath = "${projectDir}/src/docbook/"
|
||||||
|
|
||||||
spec = copySpec {
|
spec = copySpec {
|
||||||
into ('reference') {
|
into ('reference') {
|
||||||
|
|
Loading…
Reference in New Issue