Package org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.driver

Examples of org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.driver.TextFilePrinterDriver


    final LogicalPageBox pageBox = DebugReportRunner.layoutSingleBand(report, report.getPageHeader(),
        new DefaultFontStorage(new MonospaceFontRegistry(lpi, cpi)), false);


    final ByteArrayOutputStream out = new ByteArrayOutputStream();
    final TextFilePrinterDriver pc = new TextFilePrinterDriver(out, cpi, lpi);
    final PageableTextOutputProcessor outputProcessor = new PageableTextOutputProcessor(pc, report.getConfiguration());
    OutputProcessorMetaData metaData = outputProcessor.getMetaData();
    metaData.initialize(report.getConfiguration());
    final TextDocumentWriter writer = new TextDocumentWriter(metaData, pc, "ISO-8859-1");
    writer.open();
View Full Code Here


    assertEquals(6000, charWidth);
  }

  public void testPageSize () throws IOException
  {
    final TextFilePrinterDriver pc = new TextFilePrinterDriver(new NullOutputStream(), 12, 12);
    final Paper paper = PageFormatFactory.getInstance().createPaper(PageSize.A4);
    pc.startPage(paper, "ASCII");

    final PlainTextPage page = new PlainTextPage(paper, pc, "ASCII");
    final int width = page.getWidth();
    final int height = page.getHeight();
    assertEquals(99, width);
View Full Code Here

        final String cpiText = configuration.getConfigProperty
            ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.CharsPerInch");
        final String lpiText = configuration.getConfigProperty
            ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.LinesPerInch");

        final TextFilePrinterDriver driver = new TextFilePrinterDriver
            (outputStream, ParserUtil.parseInt(cpiText, 10), ParserUtil.parseInt(lpiText, 6));

        final PageableTextOutputProcessor outputProcessor =
            new PageableTextOutputProcessor(driver, configuration);
        final PageableReportProcessor streamReportProcessor =
View Full Code Here

    OutputStream fout = null;
    try
    {
      fout = new BufferedOutputStream(new FileOutputStream(filename));

      final TextFilePrinterDriver pc = new TextFilePrinterDriver(fout, charsPerInch, linesPerInch);
      final String lineSeparator = report.getReportConfiguration().getConfigProperty("line.separator", "\n");
      pc.setEndOfLine(lineSeparator.toCharArray());
      pc.setEndOfPage(lineSeparator.toCharArray());

      final PageableTextOutputProcessor outputProcessor = new PageableTextOutputProcessor(pc,
          report.getConfiguration());
      final PageableReportProcessor proc = new PageableReportProcessor(report, outputProcessor);
      proc.processReport();
View Full Code Here

    if (outputStream == null)
    {
      throw new NullPointerException();
    }

    final TextFilePrinterDriver pc = new TextFilePrinterDriver(outputStream, charsPerInch, linesPerInch);
    final PageableTextOutputProcessor outputProcessor = new PageableTextOutputProcessor(pc, report.getConfiguration());
    outputProcessor.setEncoding(encoding);

    final PageableReportProcessor proc = new PageableReportProcessor(report, outputProcessor);
    proc.processReport();
View Full Code Here

  {
    switch (exportType)
    {
      case PlainTextExportDialog.TYPE_PLAIN_OUTPUT:
      {
        return new TextFilePrinterDriver(out, charPerInch, linesPerInch);
      }
      case PlainTextExportDialog.TYPE_IBM_OUTPUT:
      {
        return new IBMCompatiblePrinterDriver(out, charPerInch, linesPerInch);
      }
View Full Code Here

              (PlainTextPageableModule.CHARS_PER_INCH), 10.0f);
          final float linesPerInch = StringUtil.parseFloat(report.getReportConfiguration().getConfigProperty
              (PlainTextPageableModule.LINES_PER_INCH), 6.0f);

          final PageableTextOutputProcessor outputProcessor = new PageableTextOutputProcessor
              (new TextFilePrinterDriver(bout, charPerInch, linesPerInch), report.getConfiguration());
          final PageableReportProcessor reportProcessor = new PageableReportProcessor(report, outputProcessor);

          reportProcessor.addReportProgressListener(progressDialog);
          progressDialog.setVisibleInEDT(true);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.driver.TextFilePrinterDriver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.