Package com.google.api.ads.adwords.awreporting.exporter.reportwriter

Examples of com.google.api.ads.adwords.awreporting.exporter.reportwriter.FileSystemReportWriter


        new File("src/main/resources/templates/PLACEHOLDER_FEED_ITEM_REPORT.tmpl");
   
    Map<String, Object> reportMap = Maps.newHashMap();
    reportMap.put(ReportDefinitionReportType.PLACEHOLDER_FEED_ITEM_REPORT.name(), list);
   
    FileSystemReportWriter htmlReportWriter = FileSystemReportWriter.newFileSystemReportWriter(
        templateFile.getName(), "20140101", "20140131", 123L, outputDirectory,  ReportFileType.HTML);

    HTMLExporter.exportHtml(reportMap, templateFile, htmlReportWriter);
   
    FileSystemReportWriter pdfReportWriter = FileSystemReportWriter.newFileSystemReportWriter(
        templateFile.getName(), "20140101", "20140131", 123L, outputDirectory,  ReportFileType.PDF);

    HTMLExporter.exportHtmlToPdf(htmlFile, pdfReportWriter, null);
  }
View Full Code Here


        new File("src/main/resources/templates/ACCOUNT_PERFORMANCE_REPORT.tmpl");

    Map<String, Object> reportMap = Maps.newHashMap();
    reportMap.put(ReportDefinitionReportType.ACCOUNT_PERFORMANCE_REPORT.name(), list);
   
    FileSystemReportWriter htmlReportWriter = FileSystemReportWriter.newFileSystemReportWriter(
        templateFile.getName(), "20140101", "20140131", 123L, outputDirectory,  ReportFileType.HTML);
   
    HTMLExporter.exportHtml(reportMap, templateFile, htmlReportWriter);
   
    FileSystemReportWriter pdfReportWriter = FileSystemReportWriter.newFileSystemReportWriter(
        templateFile.getName(), "20140101", "20140131", 123L, outputDirectory,  ReportFileType.PDF);

    HTMLExporter.exportHtmlToPdf(htmlFile, pdfReportWriter, null);
  }
View Full Code Here

      } else {

        // Writing HTML to Disk
        if (writeHtml) {
          LOGGER.debug("Writing (to FileSystem) HTML for account: " + accountId);
          FileSystemReportWriter fsrwHtml = FileSystemReportWriter.newFileSystemReportWriter(
              templateName, dateStart, dateEnd, accountId, outputDirectory, ReportFileType.HTML);
          fsrwHtml.write(mrwHtml.getAsSource());
        }

        // Writing PDF to Disk
        if (writePdf) {
          LOGGER.debug("Writing (to FileSystem) PDF for account: " + accountId);
          FileSystemReportWriter fsrwPdf = FileSystemReportWriter.newFileSystemReportWriter(
              templateName, dateStart, dateEnd, accountId, outputDirectory, ReportFileType.PDF);
          HTMLExporter.exportHtmlToPdf(mrwHtml.getAsSource(), fsrwPdf, fontPaths);
        }
      }
    } else {
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.awreporting.exporter.reportwriter.FileSystemReportWriter

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.