Examples of cascadeStyles()


Examples of com.adobe.dp.epub.opf.Publication.cascadeStyles()

  public static void main(String[] args) {
    try {
      File file = new File(args[0]);
      Publication epub = new Publication(file);
      epub.parseAll();
      epub.cascadeStyles();
      System.out.println("Loaded \"" + epub.getDCMetadata("title") + "\"");
      long start = System.currentTimeMillis();
      epub.refactorStyles();
      long end = System.currentTimeMillis();
      System.out.println( "Refactored styles in " + (end - start) + "ms");
View Full Code Here

Examples of com.adobe.dp.epub.opf.Publication.cascadeStyles()

      // embed fonts
      // NB: on non-Windows platforms you need to supply your own
      // FontLocator implementation or place fonts in ~/.epubfonts
      FontLocator fontLocator = DefaultFontLocator.getInstance();
      // epub.useAdobeFontMangling();
      epub.cascadeStyles();
      epub.addFonts(style, fontLocator);

      // save EPUB to an OCF container
      OCFContainerWriter writer = new OCFContainerWriter(
          new FileOutputStream("n:\\tmp\\hello.epub"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.