|
|
View Full Version : Merge scribbles with PDF
Hi all,
After waiting a while in vain for iRex to provide a program to merge scribbles with the pdf, I decided to write my own. (I found a perl-script somewhere on this forum, but I didn't want to install perl just to run a little tool like that.)
The attached app is written in java, and uses the iText (http://www.lowagie.com/iText/) library for the merging process (just like some other apps on this forum). It can merge the file while keeping the manifest, create a pdf with only scribbled pages (useful when when proofreading a document), change the scribble colors, ... .
You need at lava 1.4 at least, just unzip the attached zip and run the jar. (java -jar ILiadPdfScribbleMerger.jar, or on windows, you can just double-click the jar)
Let me know if you find any problems!
Bert.
PS: This is my first post in this forum! I lurked around here for a few months, finally buying an iLiad myself in december ... I never posted because I never had anything useful to say, until now (I think :) ).
500
Updates:
(v1.1) Support cropped pdf's
(v1.2-1.3.1) Support Linux & Mac OSX
(v1.4) Command line merging
(v1.6) Preserve bookmarks etc, drag&drop files.
(v1.7) Save color mappings (only for GUI for now - I'll do the commandline part later)
(v1.7.5) Color mappings supported in command line + small bugfix (last used color map not always saved)
(v1.7.6) Fixed 2 bugs related with rotated pages and cropping.
(v1.8) Fixed a bug (corrupt pdf generated for 'scribbled pages only'), added 'open merged pdf' option.
Hi all,
After waiting a while in vain for iRex to provide a program to merge scribbles with the pdf, I decided to write my own. (I found a perl-script somewhere on this forum, but I didn't want to install perl just to run a little tool like that.)
The attached app is written in java, and uses the iText (http://www.lowagie.com/iText/) library for the merging process (just like some other apps on this forum). It can merge the file while keeping the manifest, create a pdf with only scribbled pages (useful when when proofreading a document), change the scribble colors, ... .
You need at lava 1.4 at least, just unzip the attached zip and run the jar. (java -jar ILiadPdfScribbleMerger.jar, or on windows, you can just double-click the jar)
Let me know if you find any problems!
Bert.
PS: This is my first post in this forum! I lurked around here for a few months, finally buying an iLiad myself in december ... I never posted because I never had anything useful to say, until now (I think :) ).
Cool... Irex are supposed to coming out with something... Have seen this (http://syngrithy.org.uk/index.php?pT=7)...? Its an implementation in php5 and does much the same thing... I would made a Java version, but I tend to find php is better for rapid development, and java is too much like work. (I'm a Java dev and don't like using Eclipse when I supposed to be relaxing... :D)
yokos 02-02-2007, 07:37 AM Let me know if you find any problems!
I have one. :( java file starts [see screenshot], but I can't open an irex-pdf-directory as source. There is nothing to select in opened window [2nd ss].
Maybe the java binary doesn't find the 2 libraries?
I have Windows XP, jdk1.5.0_09, jre1.5.0_09, no tested on suse yet.
Nice idea to offer the replacement of colours. :happy2:
That's a strange problem ... Are you sure that directory contains any directories?
The 'open file' dialog does absolutely no filtering (except that it only accepts directories), I was planning to filter on irex-pdf dirs directly with the file-chooser, but I couldn't find a way to do it. Eventually I just decided to accept all directories, and check if they are valid later on.
Let me show you the code which shows the dialog, so you can see why this is so strange:
...
//show the file chooser
JFileChooser fc = new JFileChooser();
fc.setAcceptAllFileFilterUsed(false);
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_O NLY);
fc.setSelectedFile(fileInput);
FileFilter ff = new FileFilter() {
public boolean accept(File f) {
return f.isDirectory();
}
public String getDescription() {
return "iRex pdf directories";
}
};
fc.setFileFilter(ff);
int nReturnValue = fc.showOpenDialog(this);
...
You can see the "iRex pdf directories" file filter is superfluous, it does the same as the JFileChooser.DIRECTORIES_ONLY selection mode.
BTW: I developed this app on Windows XP SP2, with jdk1.5.0_09, and using JRE 1.5.0_09-b03. So I see no problems there.
A temporary solution: If you can't get it to work, you could always just type the complete path in the 'source' box manually, that should work also.
Kirys 02-02-2007, 02:04 PM That's a strange problem ... Are you sure that directory contains any directories?
The 'open file' dialog does absolutely no filtering (except that it only accepts directories), I was planning to filter on irex-pdf dirs directly with the file-chooser, but I couldn't find a way to do it. Eventually I just decided to accept all directories, and check if they are valid later on.
You can do it extending the java.io.FileFilter class, in the accept method you can do all the tests you need to detect if that folder is a Irex folder :)
then assign that class as the filter class for the dialog.
You can do it extending the java.io.FileFilter class, in the accept method you can do all the tests you need to detect if that folder is a Irex folder :)
then assign that class as the filter class for the dialog.
I know you can filter everything there, but if you accept only irex folders, navigating becomes impossible (the non-irex-folders won't be visible).
I was hoping you could disable the 'open' button when you select a non-irex-folder, but I don't know any easy solution for that. You could always extend the JFileChooser itself, but that was just too much work for that tiny problem :) .
doctorwes 02-03-2007, 09:34 PM It works for me, and it's very useful - thank you!
yokos 02-06-2007, 07:30 AM Hallo, Bert, I found the error, why this wasn't working with my files:
your java program wants to have directory with ".pdf" in the end of it's name.
Most of my pdf folder don't have this, because I edit manifest.xml before opening it on iLiad [-> no .pdf in directory's name.]
Even if I type the correct path of directory in the source field, your program ignores non-.pdf-in-the-end-directories. :happy2:
There is one real problem: If a pdf file is cropped [for instance 20 mm on top of page] scribble notes move 20 mm above the position they were drawn, because output is a non-cropped page. With a larger visible page size the correct scribble positions get shifted with amount of cropped length.
However, a great tool. :happy2:
Sample file is attached.
templario 02-06-2007, 08:31 AM Just one question to yokos, why do you need to edit the manisfest.xml before opening it ont Iliad. Maybe i´m newby on this, but i don´t have the manifest.xml before opening it, it just appears after that, isn´t it?
Thanks
yokos 02-06-2007, 08:45 AM Just one question to yokos, why do you need to edit the manisfest.xml before opening it ont Iliad. Maybe i´m newby on this, but i don´t have the manifest.xml before opening it, it just appears after that, isn´t it?
It's just a visual gimmick, which helps a lot to navigate better through files. All important directories & pdf files should have a cover image [no way to do it on iLiad]. Editing Title & Description tag on iLiad is much to slow.
manifest templates (http://www.mobileread.com/forums/showthread.php?t=9287)
Hallo, Bert, I found the error, why this wasn't working with my files:
your java program wants to have directory with ".pdf" in the end of it's name.
Most of my pdf folder don't have this, because I edit manifest.xml before opening it on iLiad [-> no .pdf in directory's name.]
Even if I type the correct path of directory in the source field, your program ignores non-.pdf-in-the-end-directories. :happy2:
There is one real problem: If a pdf file is cropped [for instance 20 mm on top of page] scribble notes move 20 mm above the position they were drawn, because output is is a non-cropped page. With a larger visible page size the correct scribble positions get shifted with amount of cropped length.
I have fixed both problems (well ... almost :happy2: ).
- About the cropped PDF's: I didn't even know that was possible! However, some searching in the iText library delivered the desired results. The cropped pages from your samples are merged correctly now.
- The problem with the iRex-folders was laziness from my side: I only accepted folders ending with .pdf containing a .pdf file with an identical name. Now I accept all folders with a manifest.xml and scribble.irx in it, and search for the pdf-file in the manifest.xml file.
However, now I have another problem: some of your files contain special characters which are screwed up by windows ((like "Schöne Grüße von Vulcanus.pdf" becomes "Sch÷ne Gr³¯e von Vulcanus.pdf"). When I scan the manifest.xml file for the pdf-file I get a correct filename, but when I search for that file it isn't found (It only sees the screwed-up filename)... So these files still don't work. I'll look into that another time.
yokos 02-08-2007, 07:06 AM - About the cropped PDF's: I didn't even know that was possible! However, some searching in the iText library delivered the desired results. The cropped pages from your samples are merged correctly now.
Thanks, shift of scribble notes got away. I didn't thought this would be so easy to patch. :happy2:
- The problem with the iRex-folders was laziness from my side: I only accepted folders ending with .pdf containing a .pdf file with an identical name. Now I accept all folders with a manifest.xml and scribble.irx in it, and search for the pdf-file in the manifest.xml file.
Thx.
However, now I have another problem: some of your files contain special characters which are screwed up by windows ((like "Schöne Grüße von Vulcanus.pdf" becomes "Sch÷ne Gr³¯e von Vulcanus.pdf"). When I scan the manifest.xml file for the pdf-file I get a correct filename, but when I search for that file it isn't found (It only sees the screwed-up filename)... So these files still don't work. I'll look into that another time.
Special characters are the German "Umlaute". :happy2: On a German Win XP your java program has no problems with my sample.
mmh, some hotchpotch of encodings: in manifest.xml utf-8 it becomes "Schöne Grüße von Vulcanus"; memory card/HDD fat32/ntfs; windows itself;java vm.
The function "scribbled pages only" is quite handy to get an overview what was scribbed on iLiad. Well done. :cool:
> Let me know if you find any problems!
I tried to use your program on a Mac with OS 10.4.8 and got the following error.
java.io.FileNotFoundException: /Volumes/KINGSTON/learning-clausal-logic.pdf\manifest.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
.....
Maybe there is a problem with the slash direction? Thanks.
Indeed, I used hardcoded backslashes in the code. I'm only used to programming in Windows evironments, and tend to forget the differences in other OS'es.
I removed all hardcoded backslashes, so it should work now. Can you check if everything works as it should? I don't have a Mac at hand here, so I can' check.
Thanks for the quick response. The [Merge in existing file, keep manifest] option now works (and is very useful!). However, the [Create New] fails to do anything and the [Replace all] gives the following error:
java.io.FileNotFoundException: /Volumes/KINGSTON/learning-clausal-logic-copy.pdf (Directory not empty)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at iliadpdfscribblemerger.ScribbleMergeForm.copyFile( ScribbleMergeForm.java:701)
at iliadpdfscribblemerger.ScribbleMergeForm.btnMergeA ctionPerformed(ScribbleMergeForm.java:688)
......
Maybe you are not creating/deleting directories in a platform independent manner? I don't know much about how this works in Java...
didischuster 02-13-2007, 04:57 PM I use Linux. If I start the application and choose a directory or a diffrent merge type I get an error like the follow:
Exception during event dispatch:
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTextUI.getVisibleEdito rRect(libgcj.so.70)
at javax.swing.plaf.basic.BasicTextUI$DocumentHandler .removeUpdate(libgcj.so.70)
at javax.swing.text.AbstractDocument.fireRemoveUpdate (libgcj.so.70)
at javax.swing.text.AbstractDocument.removeImpl(libgc j.so.70)
at javax.swing.text.AbstractDocument.remove(libgcj.so .70)
at javax.swing.text.AbstractDocument.replace(libgcj.s o.70)
at javax.swing.text.JTextComponent.setText(libgcj.so. 70)
at iliadpdfscribblemerger.ScribbleMergeForm.FixDestin ation(ScribbleMergeForm.java:822)
at iliadpdfscribblemerger.ScribbleMergeForm.rbtMTExis tingActionPerformed(ScribbleMergeForm.java:792)
at iliadpdfscribblemerger.ScribbleMergeForm.access$50 0(ScribbleMergeForm.java:30)
at iliadpdfscribblemerger.ScribbleMergeForm$6.actionP erformed(ScribbleMergeForm.java:163)
at javax.swing.AbstractButton.fireActionPerformed(lib gcj.so.70)
at javax.swing.AbstractButton$1.actionPerformed(libgc j.so.70)
at javax.swing.DefaultButtonModel.fireActionPerformed (libgcj.so.70)
at javax.swing.JToggleButton$ToggleButtonModel.setPre ssed(libgcj.so.70)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(libgcj.so.70)
at java.awt.AWTEventMulticaster.mouseReleased(libgcj. so.70)
at java.awt.Component.processMouseEvent(libgcj.so.70)
at java.awt.Component.processEvent(libgcj.so.70)
at java.awt.Container.processEvent(libgcj.so.70)
at java.awt.Component.dispatchEventImpl(libgcj.so.70)
at java.awt.Container.dispatchEventImpl(libgcj.so.70)
at java.awt.Component.dispatchEvent(libgcj.so.70)
at java.awt.LightweightDispatcher.handleMouseEvent(li bgcj.so.70)
at java.awt.LightweightDispatcher.dispatchEvent(libgc j.so.70)
at java.awt.Container.dispatchEventImpl(libgcj.so.70)
at java.awt.Window.dispatchEventImpl(libgcj.so.70)
at java.awt.Component.dispatchEvent(libgcj.so.70)
at java.awt.EventQueue.dispatchEvent(libgcj.so.70)
at java.awt.EventDispatchThread.run(libgcj.so.70)
Thanks for the quick response. The [Merge in existing file, keep manifest] option now works (and is very useful!). However, the [Create New] fails to do anything and the [Replace all] gives the following error:
...
It seems I had to do more testing before releasing this! I have an old Linux box standing around here somewhere ... I'll check if I can use that one to test this app in Linux.
I have fixed the problem with the 'create new' option (I introduced a bug with the path-separators), and I am pretty sure I fixed your last problem also; I changed the way to delete the source directory (Until now I deleted the pdf, manifest, scribbles and directory manually, now I delete everything in the source directory - so no files could be left).
Can you report it if everything works OK now for you?
PS: Sorry for the late reply, I had a very pretty busy week and didn't have the time (nor the energy) to check things here.
Can you report it if everything works OK now for you?
Nice work. Everything works perfectly now (on Mac OS 10.4.8 with Java 1.5.0_06). Thanks!
didischuster 02-18-2007, 10:00 AM It still does not work, there is no diffrence for me to the last version.
BACbKA 02-24-2007, 01:02 PM Can you report it if everything works OK now for you?
Doesn't work here. Used the latest (1.3) version as per the instructions in this thread:
vassilii@ilmarinen:/tmp$ java -jar ILiadPdfScribbleMerger.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: iliadpdfscribblemerger/Main (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :539)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader .java:251)
at java.net.URLClassLoader.access$100(URLClassLoader. java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java: 194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 89)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 35)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:302)
vassilii@ilmarinen:/tmp$ java -version
java version "1.4.2-03"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-03)
Java HotSpot(TM) Client VM (build Blackdown-1.4.2-03, mixed mode)
I understand that I have an incompatible runtime version, but it definitely satisfies the "at least 1.4" requirement you gave.
I finally found the time to fiddle around with an old Linux box (with java 1.4.2 installed) to check if things where working like they should ... and they didn't.
Because I only used classes and libraries fit for 1.4, I expected everything to work in 1.4 even though I wrote the app in 1.5 (and didn't test it in 1.4 :uhoh2: ). Some of the methods methods didn't exist in 1.4 though (like string.format), and those where easy to fix.
So here's a version identical to the 1.3 from earlier, except from some internal changes to work in java 1.4.2. This version also definately works in Linux (well, it does on my old Mandriva 2005 pc).
BACbKA 02-25-2007, 01:09 PM thanks, Bert. Works like a charm, same PC. It's a Debian etch x86 box, btw.
Are you planning to release the sources?
kusmi 02-26-2007, 02:08 PM Very cool tool, works like a charm on my mac.
Just one question :-) Do you also have a command-line version of this one? E.g. instead of launching the Java-Swing app, it would be great to have some control for command-line operation, e.g. something like
java -jar "ILiadPdfScribbleMerger.jar" -i input-folder -o output.pdf
I'm building my own setup here so I could automate the whole conversion process
Anyway, many thanks for your tool, I like it very much!!!
On the request of kusmi: version 1.4 allows merging with the command line
(try -? for usage details, launching without arguments starts the GUI)
kusmi 02-27-2007, 02:40 AM Wow, you are a maniac - that was fast :-) Many many thanks!!!
Adam B. 02-27-2007, 06:16 AM thanks, Bert. Works like a charm, same PC. It's a Debian etch x86 box, btw.
Are you planning to release the sources?
It's java, so you can easily tear it apart and view the source if you like.
BACbKA 02-27-2007, 06:39 AM It's java, so you can easily tear it apart and view the source if you like.
If you mean that the jar can include the sources, then, currently, it doesn't.
I am aware of relatively easy reverse-engineering of Java class files, but my question was related to whether the sources are going to be released under some free software license (because I didn't want to bother Bert with small feature requests w/o patches).
It's java, so you can easily tear it apart and view the source if you like.
Yep, but its aways easier if the author decides to release a src tar ball... :D
Adam B. 02-27-2007, 08:50 AM Yep, but its aways easier if the author decides to release a src tar ball... :D
This is true, but I learned the magic of dissasembling JAR files in one of my college classes. I loved it when the professor provided us with an example file. ;)
Adam B. 02-27-2007, 08:55 AM I am aware of relatively easy reverse-engineering of Java class files, but my question was related to whether the sources are going to be released under some free software license (because I didn't want to bother Bert with small feature requests w/o patches).
Agreed. GPL'ing the code and hosting it on sourceforge or google projects would make things much easier.
Because several people would like them: here are the sources of the 1.4 version.
I just zipped my entire source directory (including build, dist, ...), so everything should be there. Also note I created the app with NetBeans 5.5, to edit the just open the source-dir and everything should work fine (you'll have to add the iText library to the NetBeans libraries though).
Note: these sources don't include the iText library I used. Visit http://www.lowagie.com/iText/ to get the sources or binaries.
A little disclaimer: It has almost 5 years since I last wrote something in Java (and the first time using an IDE, in college we had to use notepad/emacs so we wouldn't be 'spoiled' by the IDE's features). So if you see something strange/funny/stupid in these sources, please inform me ... I didn't take (yet) the time to 'clean up' these sources :D
kusmi 02-28-2007, 02:14 PM Cool stuff, many thanks - I take a look, as one thing I was missing is support for transparency (not sure, if iText supports it though) - currently all drawings are opaque, so if you (by mistake) draw a line over some text, this text is no longer readable, so perhaps some light transparency might help :-)
Another update (v1.6) - see front page for files & source:
- Scifier noticed (http://www.mobileread.com/forums/showthread.php?t=10257) that bookmarks are lost when merging pdf's with scribbles (Well, he noticed that with the iLiad companion software - but this was also the case with my tool). This is fixed now. Instead of recreating a new pdf from he old one by copying all pages, I now copy the original and modify that one. This also preserves comments (author, description, ...), forms, ...
- You can now drag & drop files & folders to the source & destination boxes.
- Shows some indication when merging (wait cursor).
Bert
BACbKA 04-05-2007, 04:29 AM Thanks!
Moderator: stick this thread, please.
yokos 04-05-2007, 04:52 AM Thanks Bert for your update. Your scribble merger has more features than iRex's one.
Scifier 04-06-2007, 07:12 AM Another update (v1.6) - see front page for files & source:
- Scifier noticed (http://www.mobileread.com/forums/showthread.php?t=10257) that bookmarks are lost when merging pdf's with scribbles (Well, he noticed that with the iLiad companion software - but this was also the case with my tool). This is fixed now. Instead of recreating a new pdf from Bert
Works very fast even on the huge PDF files. Excellent tool ! Thanks Bert.
Though one small enhancement could make it a bit more usable - could you add a ability to save color custom color mappings to a configuration file.
Since my LCD monitor has a little bit more colors than Iliad does I would rather prefer to have my scribbles to be of non-grayscale colors.
I would have changed the hardcoded values myself (ScribbleMergeForm.java file) if I knew how to compile java sources into jar file :(
I guess I need to install Ant, Java compiler and then execute Ant with the build.xml as a command line parameter - but this is there my Java knowledge ends.
If you don't have time for implementing color mapping persistence - may be you could provide us with steps on how to setup a java build environment to build your sources.
Thanks.
BACbKA 04-06-2007, 12:14 PM scifier: I'm satisfied w/ using the command-line options for mapping the colors, once and for all, and am generally using the tool from the command line.
@Scifier: I created the app using NetBeans 5.5 (netbeans.org (http://www.netbeans.org)). Just open the complete directory in NetBeans and you can easily build & run the project.
About the color maps: I myself always use the GUI, an it is a (little) hassle to always select the colors. So I decided to do just as scifier suggested, and implemented color map presets.
Check version 1.7 for details (see first post for binary & source)
New update (v1.7.5): Using saved color mappings supported in command line mode (see -? for details, check the -cm switch). You'll have to use the GUI to create the color mappings.
I also fixed a bug in the GUI version: the mapping selected at startup was the last saved mapping, not the last used.
A few notes about these color mappings (in command line mode):
The program searches for a file 'ColorMapPresets.xml' in the current directory and retrieves the mappings from there. I decided for now to use the current directory because I wasn't sure where to put the file otherwise ... I could put it together with the .jar, but I can't be sure if I have write rights in that folder (or do I ?).
If it can find the xml file, the program will use the default mapping found in that file (this is the last used mapping in the GUI). Extra color switches (-c1 to -c4) can override parts or all of this default mapping.
Scifier 04-08-2007, 10:36 PM @Scifier: I created the app using NetBeans 5.5 (netbeans.org (http://www.netbeans.org)). Just open the complete directory in NetBeans and you can easily build & run the project.
I've downloaded the latest NetBeans (the version that comes with Java SDK since I didn't have it on my machine) and the sources of your ScribbleMerger
had been compiled with no errors or warnings (this is rarely happens to me when I compile something open sourced) - so I guess I don't have to bother anyone in case if I want a quick fix or a custom tailored enhancement. Thanks for sharing sources, Bert.
About the color maps: I myself always use the GUI, an it is a (little) hassle to always select the colors. So I decided to do just as scifier suggested, and implemented color map presets.
Thanks to Bert, now everyone can enjoy scrible colors they like the most.
Scifier 04-09-2007, 12:02 AM New update (v1.7.5): Using saved color mappings supported in command line mode (see -? for details, check the -cm switch). You'll have to use the GUI to create the color mappings.
I also fixed a bug in the GUI version: the mapping selected at startup was the last saved mapping, not the last used.
(after some pondering over resulting documents produced by Scribble Merger): Is it possible to implement merging scribbles into PDF document so we could delete/update them later. Currently, after scribbles been merged with PDF document, they becomes irreversibly embedded into PDF document as the images(?).
What I would like to see - instead of converting Iliad scribbles into images, having them embedded as a "line objects/lines" (not sure if I'm using the right term here). Having scribbles as "lines" allow us to remove or update them on PC as well.
I believe the "line" (*1)(*2) is the 2nd most popular tool (the number one is the highlighting but highlights doesn't really work nice on the 16-grayscale Iliad's screen) to make notes "on" PDF documents.
Moreover, we would be able to convert these "line" objects back to Iliad's scribbles - so we could even delete/update them on Iliad! This would really make note taking a two-way process.
---
1. See "Comment and Markup" toolbar in Adobe Acrobat 8.0
2. See "Drawing Markup Tools" toolbar in Foxit Reader 2.0
narve 04-09-2007, 01:30 PM Just for fun, I tried to build and run this tool and it works well. Nice work! I will probably never use it because I don't use my scribbles that way (nobody but me can read my letters so I manually convert my notes to text), but still... just wanted to say it seems like a great product :)
Btw, I used itext 2.0.1 instead of 1.4.8, it compiled and ran perfectly (even a bit faster, perhaps? and the jar file is actually smaller). Perhaps the transparancy features somebody mentioned are in place now.
BACbKA 04-09-2007, 03:37 PM Just for fun, I tried to build and run this tool and it works well. Nice work! I will probably never use it because I don't use my scribbles that way (nobody but me can read my letters so I manually convert my notes to text)
my most freq. use of this tool is the "only scribbled page" mode, to dump the pages I have scribbled during proofreading an article (or an e-book I've been preparing during leisure time), for subsequent viewing of the PDF and changing the original TeX accordingly.
A real killer application for TeX-centered proofreading might be an addon to the whizzytex package -- to be used supposedly with the original DVI equivalent to the scribbled on PDF -- so, browsing on the PC through the scribbles in the merger application (maybe just an add-on to a sophisticated enough DVI viewer), one automatically jumps to different spots in the original TeX file through the same DVI specials as in whizzytex.
nekokami 04-09-2007, 04:30 PM That would be extremely cool.
I really want scribbles for some documents other than PDF, myself.
I just used your tool for the first time. I used the Iliad to correct a thesis draft a student gave me, and sent him his PDF back with bright red wonderful correction marks. I love it!
(Now if I could have calibration, I could even write annotations... Imagine "This ain't true! Try again!" using the Iliad... Mhhhhm)
nekokami 04-25-2007, 10:17 AM Hopefully calibration will come soon...
(May I suggest a color other than red for your comments? There's some research on how people react to different colors in comments that suggests that a more neutral color, e.g. blue, may help students accept and use your comments more readily.)
rrustema 05-02-2007, 01:06 PM Hi,
I have tried to run ILiadPdfScribbleMerger v1.4 - src on my MacBook Pro in order to merge my annotations on the PDFs with work from my students, but it is a bit complicated for someone like me.
Could someone write me step by step what I should do to get new PDFs based on the PDFs with my annotations? They are in folders ending with .pdf, like the iLiad makes them.
So far I found an application called Java Web start in the Utilities folder and I have downloaded the zip. What next? Where should I place the material I want to have converted? Should I try to executed the .jar or the .java files?
I apologise for being such a clueless newbie, but I would like to learn to run this.
Thanks in advance,
@rrustema:
For a non-developer, it might be best to just use the "ILiadPdfScribbleMerger v1.7.5.zip" file from the first post, that file doesn't contain the java sources which are useless for a non-developer. Note that you best use the latest version (1.7.5 instead of the 1.4 you mentioned), because it contains some bugfixes and improvements.
For starters, the Java JRE has to be installed (version 1.4.2 or higher), you can find it at java.com (http://java.com). To run the program, it should be possible to just doubleclick the .jar file (If it also works that way on a mac - I've never used a Mac so I don't know). If that's not possible you have to run the command "java -jar <path to jar>" somehow (I don't know how to do this on a Mac though).
If you can get the program to start the rest should be pretty straightforward: Just open the directory containing the pdf (the folder ending with .pdf in your case) by clicking the browse button and locating the file, or just drag-and-drop the directory to the textbox.
Next you choose a merge option (the default 'create new' might be best for you - that option creates a new pdf and keeps the sources intact). Finally you select a destination (the actual file-path, "c:\output.pdf" for example") and click on merge ... that should do the trick.
kusmi 05-03-2007, 10:14 AM @rrustema:
Your MacBook Pro has java already installed, so there is no need to download java. The rest is like Bert wrote :-)
Basically, you download the "ILiadPdfScribbleMerger v1.7.5.zip" file from the front-page of this thread. If you are using Safari as webbrowser, the file is downloaded to your download folder (usually your Desktop). Depending on your settings of Safari, the file will either be decompressed already, or you just have the "ILiadPdfScribbleMerger v1.7.5.zip" there. If it is still a zip file, you need to decompress it by just double-clicking on it (Macs ship with standard decompression tools) and the result is a folder called "ILiadPdfScribbleMerger v1.7.5".
Inside this folder you will find "ILiadPdfScribbleMerger.jar" - just double-click it, it will launch the application.
enjoy!
Firstly, just a quick note to thank Bert for providing the java merger - much better than the iRex one.
Secondly, I use the Iliad for editing technical reports - and I wanted to be able to highlight regions of text, i.e. be able to draw scribbles underneath the pdf. It turns out this is very easy to do - if anyone is interested, please let me know.
Equally I have a version of ipdf which will also merge scribbles with the text rather than overdrawing - again let me know if anyone is interested.
But mainly just wanted to say 'thanks'.
nekokami 09-05-2007, 08:25 AM Can you highlight and bookmark the PDF as part of the merge? I really need some kind of bookmarking feature on the iLiad, and while I'd rather not have to copy the file out to the Mac to do it, I could do it that way if I have to.
Sorry, just highlight. Yes, bookmarks would be helpful. I have added a forward and backward browsing history to ipdf, though, if that helps. It is only valid for the current session at the moment.
nekokami 09-05-2007, 10:41 AM Maybe some way to search for scribbles/highlights? Their locations are noted in the accompanying XML file, right? You wouldn't be able to search for content (more's the pity), but you could at least skip ahead to the next annotation.
Actually, maybe a highlight mechanism could allow you to search for markups, if the highlighting feature worked less like a scribble and more like text selection (on text-based PDFs). Sort of "bookmarks-lite", storing the marks in the associated XML document, to avoid having to rebuild the PDF every time. Could that be built into ipdf application?
A search tool for 'next page with scribbles on' sounds quite possible - I'll look into it and get back to you. Got other stuff to do today though ... much too distracting hacking software ...
gudbergur 01-10-2008, 10:17 AM I just had to register to show my appreciation, loving this program and loving the open source goodness!
Thank you so much!
I use 1.7.5 and I absolutely love this program! However, I have come across one annoying bug. I read a lot of scanned books (2 pages of book per one page of scan), and in order to read them on iLiad, I usually rotate pages before I upload them on iLiad so that I can read them in a continuous mode.
However, when I want to merge my scribbles, they are moved to the right, like in the first thumbnail.
I usually could make them merge correctly with iLiad companion, but as of this morning neither iLiad companion nor this program do the merger (the merged pdf has no scribbles - it is as if it hasn't been touched).
So, I tried creating pdf with scribbles only to see if there is something wrong with the scribbles, and what I get is in the second thumbnail.
Any advice? Or fixes?
Thanks!
@rai:
First: sorry for the late reply, I don't visit these forums as often as I used to do, so I didn't see your post before.
About your problem: I just spent quite some time trying to reproduce your problem, I'm unable to simulate it though. I tried with several dcument, rotated or not, continuous mode or not, zoomed or not ... all merged ok.
So, just to be clear:
- Your pdf contains double pages, on their side. So the pdf is like your first attachment (the attachment wasn't rotated), and you use iPdf in the landscape mode?
- You're reading your pdf in continous mode. How do you navigate? with the flipper bar? By 'dragging' the page? Both?
- Is the shift of the scribbles the same everywhere? Or does the shift increase/decrease further in the document?
- Do you read your document zoomed in or out on the iLiad?
If the documents aren't confidential, or you can create a dummy document, would it be possible to post an example of a problematic document with scribbles (pdf+scribble.irx)?
- Your pdf contains double pages, on their side. So the pdf is like your first attachment (the attachment wasn't rotated), and you use iPdf in the landscape mode?
Yes, in the landscape mode.
- You're reading your pdf in continous mode. How do you navigate? with the flipper bar? By 'dragging' the page? Both?
Sometimes the flipper bar, but mostly by dragging the page (as the page is zoomed in, it sometimes goes too far if I use the flipper bar)
- Is the shift of the scribbles the same everywhere? Or does the shift increase/decrease further in the document?
As far I can see, the shifts are identical.
- Do you read your document zoomed in or out on the iLiad?
Zoomed in (larger page).
If the documents aren't confidential, or you can create a dummy document, would it be possible to post an example of a problematic document with scribbles (pdf+scribble.irx)?
Ok, I have uploaded original pdf and the merged pdf and manifest, but I can't upload scribble (it says "invalid file").
daudi 02-10-2008, 08:48 AM [...]Ok, I have uploaded original pdf and the merged pdf and manifest, but I can't upload scribble (it says "invalid file").
rename scribble.irx to scribble.txt and you should be able to upload it.
rename scribble.irx to scribble.txt and you should be able to upload it.
Thanks :)
I found & fixed the problem discovered by rai (Thank you rai !).
It where actually two bugs:
It seems as if PDF pages are rotated somewhat special: the page is left untouched, while a 'rotated' tag contains the rotation ... I didn't know that, and messed up the calculation of the cropping because of that. I didn't notice this before because I use mostly non-rotated pdf's, created by a pdf printer.
I made a second mistake when calculating the crop box: Because iPdf and iText use different coördinate systems, the calculation is a bit complex. For the interested: there's a jpg image in the 1.7.6-src explaining the difference.
Anyway, you can find an updated iLiadScribbleMerger (v1.7.6) in the first post.
Thanks so much, I love this program!!!
Lazycat 02-24-2008, 12:48 AM It's strange. When I used version 1.7.6 (on Vista) and choose to create scribbled pages only, the final pdf file cannot be opened. But it works well if I use version. 1.7.5
It's strange. When I used version 1.7.6 (on Vista) and choose to create scribbled pages only, the final pdf file cannot be opened. But it works well if I use version. 1.7.5
Where can't the pdf be opened? The iLiad or a pdf reader on the PC?
Whatever it may be, it remains strange ... There didn't change anything in the pdf generation between 1.7.5 and 1.7.6. Only the calculation of the cropping rectangle was changed. And the behaviour should be the same on Linux, Mac, XP or Vista. I don't have a Vista machine however, so it's a little difficult to check.
I'll see what I can do ...
Lazycat 02-25-2008, 10:36 PM When I tried to open the final pdf file on the PC, the Acrobat indicated that the file is corrupted. I don't understand why, but the old version just works well...
I have just released version 1.8, which should fix this issue. It was a silly copy-past error in the fix for 1.7.6.
I also added an extra option which I needed myself: open the output pdf after merging. This option should work on Windows, Mac and Linux. I don't have a Mac or a Linux box at hand however, so I wasn't able to test this. Let me know if there are any problems with it.
Again, you can find the new version attached to the first post.
Lazycat 02-26-2008, 06:55 PM It works well now!! :2thumbsup
The only problem is that I can't use the Browse button to locate my folder, and I have to type the path manually.
It's a really nice program. Thanks so much for your efforts! :iloveyou:
ragdoll 04-07-2008, 03:42 AM I'm trying to run the last version of the program from the command line with the '-?' option but I get no output. What's the problem? I'm under Vista.
And I have another question: is there someone using this tool to merge multiple scribbles at a time?
daudi 04-07-2008, 06:12 AM I got bitten by -? on linux and found I needed to use -"?", i.e.
java -jar ILiadPdfScribbleMerger.jar -"?"
ragdoll 04-07-2008, 06:20 AM I got bitten by -? on linux and found I needed to use -"?", i.e.
java -jar ILiadPdfScribbleMerger.jar -"?"
Thank you, I just found out that in Windows you can't run ILiadPdfScribbleMerger.jar from the command line without using java -jar.
Once you use java -jar you don't have to use the ".
And I have another question: is there someone using this tool to merge multiple scribbles at a time?
I was thinking about that too. I was wondering if there is a possibility to add command (I don't know anything about programming) that allows you to merge scribbles for each document in a folder? Say, I have folder A. In it I have 5 pdfs with scribbles. Then, instead of merging scribbles for each separately, I select all these 5 pdfs and press command that says "Do this action (merge scribbles etc) for all selected"? If this is possible, I'd be in merge-scribbles heaven :D
I was thinking about that too. I was wondering if there is a possibility to add command (I don't know anything about programming) that allows you to merge scribbles for each document in a folder? Say, I have folder A. In it I have 5 pdfs with scribbles. Then, instead of merging scribbles for each separately, I select all these 5 pdfs and press command that says "Do this action (merge scribbles etc) for all selected"? If this is possible, I'd be in merge-scribbles heaven :D
Indeed, that would be useful ... I'll look into this, it shouldn't be too difficult.
|