Skip to content

Commit

Permalink
Merge branch 'release/alpha/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
coderarjob committed Apr 1, 2022
2 parents 4b87b86 + af8547f commit 38d47ac
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 12 deletions.
42 changes: 39 additions & 3 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,10 @@ java.io.EOFException
at coderarjob.kpdfsync.poc.MainFrame$2.run(MainFrame.java:202)
at java.base/java.lang.Thread.run(Thread.java:833)

[ ] Index Out Of Bounds in PdfAnnotatorV1
PDF souce :/home/coder/kpdfsync/test-files/Books/Classic Operating Systems_ From Batch Processing To Distributed Systems_cropped.pdf

[ ] (GitHub Issue #5)
Book :/home/coder/kpdfsync/test-files/Books/Classic Operating Systems_ From Batch Processing To Distributed Systems_cropped.pdf

Index Out Of Bounds in PdfAnnotatorV1
Exception :index -1, length 0
java.lang.StringIndexOutOfBoundsException: index -1, length 0
at java.base/java.lang.String.checkIndex(String.java:4560)
Expand All @@ -238,3 +239,38 @@ java.io.EOFException
at coderarjob.kpdfsync.lib.annotator.PdfAnnotatorV1.highlight(PdfAnnotatorV1.java:65)
at coderarjob.kpdfsync.poc.MainFrame$2.run(MainFrame.java:201)
at java.base/java.lang.Thread.run(Thread.java:833)

[ ] (GitHub Issue #6)
Book :resulting pdf after fixing original progit.pdf

Exception :'name' table does NOT exist.
org.pdfclown.util.parsers.ParseException: 'name' table does NOT exist.
at org.pdfclown.documents.contents.fonts.OpenFontParser.getName(OpenFontParser.java:570)
at org.pdfclown.documents.contents.fonts.OpenFontParser.load(OpenFontParser.java:221)
at org.pdfclown.documents.contents.fonts.OpenFontParser.<init>(OpenFontParser.java:205)
at org.pdfclown.documents.contents.fonts.TrueTypeFont.loadEncoding(TrueTypeFont.java:91)
at org.pdfclown.documents.contents.fonts.SimpleFont.onLoad(SimpleFont.java:118)
at org.pdfclown.documents.contents.fonts.Font.load(Font.java:738)
at org.pdfclown.documents.contents.fonts.Font.<init>(Font.java:351)
at org.pdfclown.documents.contents.fonts.SimpleFont.<init>(SimpleFont.java:62)
at org.pdfclown.documents.contents.fonts.TrueTypeFont.<init>(TrueTypeFont.java:68)
at org.pdfclown.documents.contents.fonts.Font.wrap(Font.java:253)
at org.pdfclown.documents.contents.FontResources.wrap(FontResources.java:72)
at org.pdfclown.documents.contents.FontResources.wrap(FontResources.java:1)
at org.pdfclown.documents.contents.ResourceItems.get(ResourceItems.java:119)
at org.pdfclown.documents.contents.objects.SetFont.getResource(SetFont.java:119)
at org.pdfclown.documents.contents.objects.SetFont.getFont(SetFont.java:83)
at org.pdfclown.documents.contents.objects.SetFont.scan(SetFont.java:97)
at org.pdfclown.documents.contents.ContentScanner.moveNext(ContentScanner.java:1330)
at org.pdfclown.documents.contents.ContentScanner$TextWrapper.extract(ContentScanner.java:811)
at org.pdfclown.documents.contents.ContentScanner$TextWrapper.<init>(ContentScanner.java:777)
at org.pdfclown.documents.contents.ContentScanner$TextWrapper.<init>(ContentScanner.java:770)
at org.pdfclown.documents.contents.ContentScanner$GraphicsObjectWrapper.get(ContentScanner.java:690)
at org.pdfclown.documents.contents.ContentScanner$GraphicsObjectWrapper.access$0(ContentScanner.java:682)
at org.pdfclown.documents.contents.ContentScanner.getCurrentWrapper(ContentScanner.java:1154)
at org.pdfclown.tools.TextExtractor.extract(TextExtractor.java:633)
at org.pdfclown.tools.TextExtractor.extract(TextExtractor.java:647)
at org.pdfclown.tools.TextExtractor.extract(TextExtractor.java:296)
at coderarjob.kpdfsync.lib.annotator.PdfAnnotatorV1.highlight(PdfAnnotatorV1.java:62)
at coderarjob.kpdfsync.poc.MainFrame$2.run(MainFrame.java:201)
at java.lang.Thread.run(Thread.java:748)
15 changes: 10 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,30 @@ cp -r src/coderarjob/kpdfsync/poc/res $BIN_DIR/coderarjob/kpdfsync/poc || exit
# -----------------------------------------------------------------------------
# Replace placeholder information in resource files.
# -----------------------------------------------------------------------------
VER=0.8.1
TAG=alpha
buildid=$(date +%y%m%d)
find $BIN_DIR -type f -name app.settings \
-exec sed -i "s/<build>/$buildid/g" {} \;

find $BIN_DIR -type f -name app.settings \
-exec sed -i "s/<build>/$buildid/g" {} \; \
-exec sed -i "s/<kpdfsync-ver>/$VER/g" {} \; \
-exec sed -i "s/<tag>/$TAG/g" {} \; || exit

command -v git > /dev/null && (
path=coderarjob/ajl
commitid=$(git log --format="%h" -n 1 src/$path)
find $BIN_DIR/$path -type f -name app.settings \
-exec sed -i "s/<commitid>/$commitid/g" {} \;
-exec sed -i "s/<commitid>/$commitid/g" {} \; || exit

path=coderarjob/kpdfsync/lib
commitid=$(git log --format="%h" -n 1 src/$path)
find $BIN_DIR/$path -type f -name app.settings \
-exec sed -i "s/<commitid>/$commitid/g" {} \;
-exec sed -i "s/<commitid>/$commitid/g" {} \; || exit

path=coderarjob/kpdfsync/poc
commitid=$(git log --format="%h" -n 1 src/$path)
find $BIN_DIR/$path -type f -name app.settings \
-exec sed -i "s/<commitid>/$commitid/g" {} \;
-exec sed -i "s/<commitid>/$commitid/g" {} \; || exit
) || exit

# -----------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion build/kpdfsync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# -----------------------------------------------------------------------------
# Changes directory to the application path and runs kpdfsync
# -----------------------------------------------------------------------------
BASEDIR=$(dirname $0)
SELF=$0
LINK=$(readlink $0) && SELF=$LINK
BASEDIR=$(dirname "$SELF")
cd "$BASEDIR/bin"
java -jar kpdfsync.jar&
Binary file modified docs/images/screenshot_alpha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/coderarjob/ajl/res/app.settings
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This is the settings file for coderarjob.ajl package.
app.version = 0.8.0-<build>-<commitid>-alpha
app.version = <kpdfsync-ver>-<build>-<commitid>-<tag>
2 changes: 1 addition & 1 deletion src/coderarjob/kpdfsync/lib/res/app.settings
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This is the settings file for coderarjob.kpdfsync.lib package.
app.version = 0.8.0-<build>-<commitid>-alpha
app.version = <kpdfsync-ver>-<build>-<commitid>-<tag>
2 changes: 1 addition & 1 deletion src/coderarjob/kpdfsync/poc/res/app.settings
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This is the settings file for kpdfsync.
app.version = 0.8.0-<build>-<commitid>-alpha
app.version = <kpdfsync-ver>-<build>-<commitid>-<tag>

0 comments on commit 38d47ac

Please sign in to comment.