Package er.pdf.builder

Examples of er.pdf.builder.PDFBuilder


   *          engine's documentation for available config options.
   * @return an NSData object containing raw PDF data.
   */
  public static NSData htmlAsPdf(String html, String encoding, String urlPrefix, NSDictionary<String, Object> config) {
    NSMutableDictionary<String, Object> _config = config == null ? new NSMutableDictionary<String, Object>() : config.mutableClone();
    PDFBuilder builder = PDFBuilderFactory.newBuilder((String) _config.removeObjectForKey("engine"));
    ByteArrayOutputStream os = new ByteArrayOutputStream();
    try {
      builder.setSource(html, encoding, urlPrefix, _config);
      builder.createDocument(os);
      os.close();
      return new NSData(os.toByteArray());
    } catch (Exception e) {
      throw com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(e);
    }
View Full Code Here

TOP

Related Classes of er.pdf.builder.PDFBuilder

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.