Ejemplo n.º 1
0
  public OpcPackage getPackageFromLocalFile(LocalFile fo) throws Docx4JException {
    OpcPackage thePackage = null;

    String localPath = VFSUtils.getLocalFilePath(fo);
    if (localPath == null) {
      throw new Docx4JException("Couldn't get local path");
    }

    thePackage = _loadFromZipFile.get(new File(localPath));
    return thePackage;
  }
Ejemplo n.º 2
0
 // Testing
 public static void main(String[] args) throws Exception {
   String filepath = System.getProperty("user.dir") + "/sample-docs/FontEmbedded.docx";
   log.info("Path: " + filepath);
   LoadFromZipFile loader = new LoadFromZipFile();
   loader.get(filepath);
 }