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);
 }
Ejemplo n.º 3
0
 public LoadFromVFSZipFile(boolean loadExternalTargets) {
   _loadFromZipFile = new LoadFromZipFile();
   _loadFromZipFile.loadExternalTargets(loadExternalTargets);
 }