|
|||||||
|
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community today, you will have fewer ads, access to post topics, communicate privately with other members, respond to polls, upload content and access many other special features. If you have any problems with the registration process or your account login, please contact us. Hint: Don't have time to visit us daily? Subscribe to our main RSS feed to receive our frontpage posts at your convenience. |
| iLiad Software Releases For iLiad application releases and installers |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Enthusiast
![]() ![]() ![]() ![]()
Posts: 42
Karma: 394
Join Date: Jan 2007
Location: Belgium
Device: iRex iLiad, PRS-600
|
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 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 ).Updates:
Last edited by Bert; 02-26-2008 at 07:24 PM. Reason: Released v1.8 |
|
|
|
|
|
#2 | |
|
Evangelist
![]() ![]() ![]()
Posts: 458
Karma: 293
Join Date: May 2006
|
Quote:
)
|
|
|
|
|
|
|
#3 | |
|
Pac-Man catched my iLiad.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
Posts: 701
Karma: 2483
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: 1st gen iRex iLiad with 2nd ed. battery/case
|
Quote:
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.
Last edited by yokos; 02-02-2007 at 09:47 AM. |
|
|
|
|
|
|
#4 |
|
Enthusiast
![]() ![]() ![]() ![]()
Posts: 42
Karma: 394
Join Date: Jan 2007
Location: Belgium
Device: iRex iLiad, PRS-600
|
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: Code:
...
//show the file chooser
JFileChooser fc = new JFileChooser();
fc.setAcceptAllFileFilterUsed(false);
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
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);
...
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. |
|
|
|
|
|
#5 | |
|
Zealot
![]()
Posts: 108
Karma: 68
Join Date: Dec 2006
Location: Italy
Device: none (yet)
|
Quote:
![]() then assign that class as the filter class for the dialog. |
|
|
|
|
|
|
#6 | |
|
Enthusiast
![]() ![]() ![]() ![]()
Posts: 42
Karma: 394
Join Date: Jan 2007
Location: Belgium
Device: iRex iLiad, PRS-600
|
Quote:
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 .
|
|
|
|
|
|
|
#7 |
|
Junior Member
![]()
Posts: 6
Karma: 10
Join Date: Nov 2006
Device: iRex iLiad
|
It works for me, and it's very useful - thank you!
|
|
|
|
|
|
#8 |
|
Pac-Man catched my iLiad.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
Posts: 701
Karma: 2483
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: 1st gen iRex iLiad with 2nd ed. battery/case
|
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. 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. ![]() Sample file is attached. Last edited by yokos; 02-08-2007 at 09:15 AM. Reason: non-native English speaker. ;-) |
|
|
|
|
|
#9 |
|
Connoisseur
![]()
Posts: 79
Karma: 10
Join Date: Dec 2006
Device: Iliad
|
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 |
|
|
|
|
|
#10 | |
|
Pac-Man catched my iLiad.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
Posts: 701
Karma: 2483
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: 1st gen iRex iLiad with 2nd ed. battery/case
|
Quote:
manifest templates |
|
|
|
|
|
|
#11 | |
|
Enthusiast
![]() ![]() ![]() ![]()
Posts: 42
Karma: 394
Join Date: Jan 2007
Location: Belgium
Device: iRex iLiad, PRS-600
|
Quote:
).- 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. |
|
|
|
|
|
|
#12 | |||
|
Pac-Man catched my iLiad.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
Posts: 701
Karma: 2483
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: 1st gen iRex iLiad with 2nd ed. battery/case
|
Quote:
Quote:
Quote:
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.
Last edited by yokos; 02-09-2007 at 07:11 AM. Reason: utf-8 |
|||
|
|
|
|
|
#13 |
|
Junior Member
![]()
Posts: 3
Karma: 10
Join Date: Feb 2007
|
Mac bug?
> 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.jav a:106) ..... Maybe there is a problem with the slash direction? Thanks. |
|
|
|
|
|
#14 |
|
Enthusiast
![]() ![]() ![]() ![]()
Posts: 42
Karma: 394
Join Date: Jan 2007
Location: Belgium
Device: iRex iLiad, PRS-600
|
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. |
|
|
|
|
|
#15 |
|
Junior Member
![]()
Posts: 3
Karma: 10
Join Date: Feb 2007
|
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.j ava:179) at java.io.FileOutputStream.<init>(FileOutputStream.j ava: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... |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PDF Generated with LaTeX for the iLiad | Hadrien | iLiad Content | 17 | 07-25-2008 10:59 AM |
| Extracting text with formatting from PDF | nekokami | 22 | 03-05-2007 10:18 AM | |
| iliad and pdf versions | joblack | iRex iLiad | 1 | 01-24-2007 10:25 AM |
| Very Short pdf file test. | harpum | iRex iLiad | 0 | 01-21-2007 12:44 AM |
| What is wrong with pdf? | ghostwheel | Sony Portable Reader PRS-500/505 | 1 | 01-03-2007 11:40 AM |