Package com.adobe.dp.epub.io

Examples of com.adobe.dp.epub.io.OCFContainerWriter


      epub.refactorStyles();
      long end = System.currentTimeMillis();
      System.out.println( "Refactored styles in " + (end - start) + "ms");
      //epub.addFonts();
      FileOutputStream out = new FileOutputStream(args[1]);
      epub.serialize(new OCFContainerWriter(out));
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here


            + " of the second chapter's second paragraph. ");
      paragraph3.add(sb3.toString());
      body2.add(paragraph3);

      // save EPUB to an OCF container
      OCFContainerWriter writer = new OCFContainerWriter(
          new FileOutputStream("hello.epub"));
      epub.serialize(writer);

    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

      Element paragraph = mainDoc.createElement("p");
      paragraph.add("Hello, world!");
      body.add(paragraph);

      // save EPUB to an OCF container
      OCFContainerWriter writer = new OCFContainerWriter(
          new FileOutputStream("hello.epub"));
      epub.serialize(writer);

    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

      // epub.useAdobeFontMangling();
      epub.cascadeStyles();
      epub.addFonts(style, fontLocator);

      // save EPUB to an OCF container
      OCFContainerWriter writer = new OCFContainerWriter(
          new FileOutputStream("n:\\tmp\\hello.epub"));
      epub.serialize(writer);

    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

        if (getFontsPath() != null && getFontsPath().trim().length() > 0) {
            FontLocator fontLocator = new SinglePathFontLocator(getFontsPath());
            getEpub().cascadeStyles();
            getEpub().addFonts(getStyleResource(), fontLocator);
        }
        OCFContainerWriter writer = new OCFContainerWriter(new FileOutputStream(getEpubFilename()));
        getEpub().serialize(writer);

       
        //TODO: uncomment  for testing stylesheet optimization
        //Utils.optimizeStylesheet(getStyleResource());
View Full Code Here

TOP

Related Classes of com.adobe.dp.epub.io.OCFContainerWriter

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.