protected ReportProcessor createReportProcessor( OutputStream fout ) throws Exception { PdfOutputProcessor outputProcessor = new PdfOutputProcessor( report.getConfiguration(), fout, report.getResourceManager() ); return new PageableReportProcessor( report, outputProcessor ); } };
/** * Removes a repagination listener. * * @param l * the listener. */ public synchronized void removeReportProgressListener( final ReportProgressListener l ) { super.removeReportProgressListener( l ); }
/** * Sends a repagination update to all registered listeners. * * @param state * the state. */ protected synchronized void fireProcessingStarted( final ReportProgressEvent state ) { super.fireProcessingStarted( state ); }
public static LogicalPageBox layoutPage( final MasterReport report, final int page ) throws Exception { final LocalFontRegistry localFontRegistry = new LocalFontRegistry(); localFontRegistry.initialize(); final InterceptingXmlPageOutputProcessor outputProcessor = new InterceptingXmlPageOutputProcessor( new NullOutputStream(), new XmlPageOutputProcessorMetaData( localFontRegistry ) ); outputProcessor.setFlowSelector( new SinglePageFlowSelector( page, false ) ); final PageableReportProcessor proc = new PageableReportProcessor( report, outputProcessor ); proc.processReport(); if ( outputProcessor.getLogicalPageBox() == null ) { Assert.fail( "Did not find the requested page" ); } return outputProcessor.getLogicalPageBox(); }
protected void processPageContent( final LogicalPageKey logicalPageKey, final LogicalPageBox logicalPage ) throws ContentProcessingException { final PageGrid pageGrid = logicalPage.getPageGrid(); final int rowCount = pageGrid.getRowCount(); final int colCount = pageGrid.getColumnCount(); final PageFlowSelector selector = getFlowSelector(); if ( selector != null ) { if ( selector.isLogicalPageAccepted( logicalPageKey ) ) { processLogicalPage( logicalPageKey, logicalPage ); } for ( int row = 0; row < rowCount; row++ ) { for ( int col = 0; col < colCount; col++ ) { final PhysicalPageKey pageKey = logicalPageKey.getPage( col, row ); if ( selector.isPhysicalPageAccepted( pageKey ) ) { processPhysicalPage( pageGrid, logicalPage, row, col, pageKey ); } } } } }
public XmlPageOutputProcessor( final OutputStream outputStream, final OutputProcessorMetaData metaData ) { if ( metaData == null ) { throw new NullPointerException( "MetaData must not be null" ); } if ( outputStream == null ) { throw new NullPointerException( "OutputStream must not be null" ); } this.outputStream = outputStream; this.flowSelector = new AllPageFlowSelector(); // for the sake of simplicity, we use the AWT font registry for now. // This is less accurate than using the iText fonts, but completing // the TrueType registry or implementing an iText registry is too expensive // for now. this.metaData = metaData; }
public LogicalPageBox getPageBox() { return super.getPageBox(); }
/** * Returns the layout manager. If the key is <code>null</code>, an instance of the <code>SimplePageLayouter</code> * class is returned. * * @return the page layouter. */ protected OutputFunction createLayoutManager() { final DefaultOutputFunction pageableOutputFunction = new DefaultOutputFunction(); pageableOutputFunction.setRenderer( new PageableRenderer( getOutputProcessor() ) ); return pageableOutputFunction; }
/** * Sends a repagination update to all registered listeners. * * @param state * the state. */ protected synchronized void fireStateUpdate( final ReportProgressEvent state ) { super.fireStateUpdate( state ); }
/** * Adds a repagination listener. This listener will be informed of pagination events. * * @param l * the listener. */ public synchronized void addReportProgressListener( final ReportProgressListener l ) { super.addReportProgressListener( l ); }
/** * DefaultConstructor. Loads the module specification. * * @throws ModuleInitializeException * if an error occured. */ public PageableBaseModule() throws ModuleInitializeException { loadModuleInfo(); }
/** * Sends a repagination update to all registered listeners. * * @param state * the state. */ protected synchronized void fireProcessingFinished( final ReportProgressEvent state ) { super.fireProcessingFinished( state ); }
public PhysicalPageKey getPhysicalPage( final int page ) { if ( isPaginationFinished() == false ) { throw new IllegalStateException(); } return (PhysicalPageKey) physicalPages.get( page ); }
public void markDirty() { super.markDirty(); } }
protected void initializeRendererOnStartReport( final ProcessingContext processingContext ) { super.initializeRendererOnStartReport( processingContext ); paginationStep.initializePerformanceMonitoring( getPerformanceMonitorContext() ); fillPhysicalPagesStep.initializePerformanceMonitoring( getPerformanceMonitorContext() ); }
protected ReportProcessor createReportProcessor( OutputStream fout ) throws Exception { PdfOutputProcessor outputProcessor = new PdfOutputProcessor( masterReport.getConfiguration(), fout, masterReport.getResourceManager() ); return new PageableReportProcessor( masterReport, outputProcessor ); } };
public TableDebugOutputProcessor( final OutputProcessorMetaData metaData ) { this.metaData = metaData; this.flowSelector = new AllPageFlowSelector( true ); }
public boolean isCurrentPageEmpty() { // todo: Invent a test that checks whether the page is currently empty. final LogicalPageBox logicalPageBox = getPageBox(); if ( logicalPageBox == null ) { throw new IllegalStateException( "LogicalPageBox being null? You messed it up again!" ); } final PageBreakPositionList breakPositionList = logicalPageBox.getAllVerticalBreaks(); final long masterBreak = breakPositionList.getLastMasterBreak(); final boolean nextPageContainsContent = ( logicalPageBox.getHeight() > masterBreak ); return nextPageContainsContent == false; }
protected ReportProcessor createReportProcessor( OutputStream fout ) throws Exception { PdfOutputProcessor outputProcessor = new PdfOutputProcessor( masterReport.getConfiguration(), fout, masterReport.getResourceManager() ); return new PageableReportProcessor( masterReport, outputProcessor ); } };
public PageableTextOutputProcessor( final PrinterDriver driver, final Configuration configuration ) { if ( driver == null ) { throw new NullPointerException(); } if ( configuration == null ) { throw new NullPointerException(); } this.driver = driver; this.metaData = new TextOutputProcessorMetaData( driver.getLinesPerInch(), driver.getCharactersPerInch() ); this.flowSelector = new AllPageFlowSelector(); }