File | Line |
---|
org\apache\maven\doxia\docrenderer\pdf\fo\FoPdfRenderer.java | 176 |
org\apache\maven\doxia\docrenderer\pdf\itext\ITextPdfRenderer.java | 193 |
generatePdf( iTextFile, iTextOutput );
}
/** {@inheritDoc} */
public void renderIndividual( Map<String, SiteModule> filesToProcess, File outputDirectory )
throws DocumentRendererException, IOException
{
renderIndividual( filesToProcess, outputDirectory, null );
}
/** {@inheritDoc} */
public void renderIndividual( Map<String, SiteModule> filesToProcess, File outputDirectory,
DocumentRendererContext context )
throws DocumentRendererException, IOException
{
for ( Map.Entry<String, SiteModule> entry : filesToProcess.entrySet() )
{
String key = entry.getKey();
SiteModule module = entry.getValue();
File fullDoc = new File( getBaseDir(), module.getSourceDirectory() + File.separator + key );
String output = key;
String lowerCaseExtension = module.getExtension().toLowerCase( Locale.ENGLISH );
if ( output.toLowerCase( Locale.ENGLISH ).indexOf( "." + lowerCaseExtension ) != -1 )
{
output =
output.substring( 0, output.toLowerCase( Locale.ENGLISH ).indexOf( "." + lowerCaseExtension ) );
}
File outputITextFile = new File( outputDirectory, output + ".xml" ); |
File | Line |
---|
org\apache\maven\doxia\docrenderer\pdf\fo\FoPdfRenderer.java | 283 |
org\apache\maven\doxia\docrenderer\pdf\itext\ITextPdfRenderer.java | 594 |
Collection<SiteModule> modules = siteModuleManager.getSiteModules();
for ( SiteModule module : modules )
{
File moduleBasedir = new File( getBaseDir(), module.getSourceDirectory() );
if ( moduleBasedir.exists() )
{
String doc = href + "." + module.getExtension();
File source = new File( moduleBasedir, doc );
// Velocity file?
if ( !source.exists() )
{
if ( href.indexOf( "." + module.getExtension() ) != -1 )
{
doc = href + ".vm";
}
else
{
doc = href + "." + module.getExtension() + ".vm";
}
source = new File( moduleBasedir, doc );
}
if ( source.exists() )
{ |
File | Line |
---|
org\apache\maven\doxia\docrenderer\itext\AbstractITextRender.java | 413 |
org\apache\maven\doxia\docrenderer\pdf\itext\ITextPdfRenderer.java | 343 |
.getResourceAsStream( XSLT_RESOURCE ) ) );
transformer.setErrorListener( TRANSFORMER_FACTORY.getErrorListener() );
transformer.setOutputProperty( OutputKeys.OMIT_XML_DECLARATION, "false" );
transformer.setOutputProperty( OutputKeys.INDENT, "yes" );
transformer.setOutputProperty( OutputKeys.METHOD, "xml" );
transformer.setOutputProperty( OutputKeys.ENCODING, "UTF-8" );
// No doctype since itext doctype is not up to date!
return transformer;
}
catch ( TransformerConfigurationException e )
{
throw new DocumentRendererException( "Error configuring Transformer for " + XSLT_RESOURCE + ": "
+ e.getMessage() );
}
catch ( IllegalArgumentException e )
{
throw new DocumentRendererException( "Error configuring Transformer for " + XSLT_RESOURCE + ": "
+ e.getMessage() );
}
}
/**
* Add transformer parameters from a DocumentModel.
*
* @param transformer the Transformer to set the parameters.
* @param documentModel the DocumentModel to take the parameters from, could be null.
* @param iTextFile the iTextFile not null for the relative paths.
* @param generateTOC not null, possible values are: 'none', 'start' and 'end'.
*/
private void addTransformerParameters( Transformer transformer, DocumentModel documentModel, File iTextFile, |