]> _ Git - cubist_pdf.git/commitdiff
wip #5195 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 29 Mar 2022 18:44:09 +0000 (20:44 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 29 Mar 2022 18:44:09 +0000 (20:44 +0200)
.idea/misc.xml
resources/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar
resources/tools/fwstk/src/com/fluidbook/fwstk/Main.java

index b658e95a34610ea9e0f9538c2169bd1c5cf93c12..b44ac2428979038bdaa282ad55cfe3ff40612d3f 100644 (file)
@@ -3,7 +3,7 @@
   <component name="AhkProjectSettings">
     <option name="defaultAhkSdk" value="AutoHotkey" />
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" project-jdk-name="17" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/out" />
   </component>
 </project>
\ No newline at end of file
index 256d77f15e6e80dbe65d39bf23553cdc624a9cc4..4cf3dee31139fce4c4ee48220baeab1b71d9f9d9 100644 (file)
Binary files a/resources/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar and b/resources/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar differ
index 32ca9ceb527c539eb3b4ec46b1297aac52519f01..3909385fdd27098bd1380248017bd789475fed10 100644 (file)
@@ -403,12 +403,17 @@ public class Main {
                                     PDOutlineNode bookmark, int level) throws IOException {
         PDOutlineItem current = bookmark.getFirstChild();
         while (current != null) {
-            res.add("BookmarkTitle:\t\t" + StringEscapeUtils.escapeHtml4(current.getTitle()));
-            res.add("BookmarkLevel:\t\t" + level);
-            res.add("BookmarkPage:\t\t"
-                + getPageFromAction(doc, current.getAction()));
-            addBookmark(doc, res, current, level + 1);
+            try {
+                res.add("BookmarkTitle:\t\t" + StringEscapeUtils.escapeHtml4(current.getTitle()));
+                res.add("BookmarkLevel:\t\t" + level);
+                res.add("BookmarkPage:\t\t"
+                        + getPageFromAction(doc, current.getAction()));
+                addBookmark(doc, res, current, level + 1);
+            }catch (Exception e){
+
+            }
             current = current.getNextSibling();
+
         }
     }
 
@@ -688,6 +693,15 @@ public class Main {
         out.close();
     }
 
+    public static String getPageFromRemoteGoToAction(PDDocument doc, PDAction a) throws IOException{
+        PDActionGoTo aa = (PDActionGoTo) a;
+        if (null == a) {
+            return "-1";
+        }
+        PDDestination d = aa.getDestination();
+        return getPageFromDestination(doc, d);
+    }
+
     public static String getPageFromAction(PDDocument doc, PDAction a) throws IOException {
         PDActionGoTo aa = (PDActionGoTo) a;
         if (null == a) {