Saturday, October 2, 2010


With this version I have added the possibility to select multiple bookmarks and drag them around using the mouse. It was more difficult than I thought to implement this feature and a lot of code has been modified and added, but I think the result is acceptable. 

I was tempted to increase the version number to 2.5.0 because I find this new capability very important, but dragging bookmarks one at a time was already present so I have considered this as an extension to that feature.

If the bookmarks you are dragging are not contiguous and siblings, when you will drop them they will become such. The bookmarks remain sorted from top to bottom independently from which of the bookmarks  you press on to start the dragging gesture. This is what I think is the most reasonable way to manage multiple dragging but any hint is appreciated as usual.

I have also changed the appearance of the last bookmark followed in the viewer to appear as grayed, I think it can be useful.

Let me know your opinion and report bugs, thank you.

Saturday, September 18, 2010


This version adds the possibility to apply most actions to multiple selected bookmarks. For example you can cut copy and paste several bookmarks together, this is useful also to overcame limits of the "drag-with-mouse" functionality that currently works only for a single bookmark. 

The commands to change (or append) destination of a bookmark are now also available for a multiple bookmarks selection, the action to set the bookmarks to the current view now asks if you want to keep the page number of the selected bookmarks, this can be useful to apply a zoom factor or a top offset to multiple bookmarks without changing the target page.

All this actions are undoable.

A license box has been added when you first start the program asking you to agree with the GPL license, I am sorry for this nuisance but it is important that you know what you get with this software, and what you can or cannot do with it.

Some bugs have been fixed:  
  • "Collapse All" action now correctly collapses inner nodes;
  • some custom indentation strings caused a wrong parsing of bookmarks from text files;
  • mouse cursor appearance when text selection is active not changing. 
Please continue to send me bugs reports and features requests, it is really appreciated thank you.

Sunday, September 5, 2010

JPdfBookmarks 2.4.1

Hello, this is an important update to jpdfbookmarks, it adds many important features, I recommend to try it.

Version 2.4.1 now supports password encrypted PDF files, both user password and owner password, it means you can edit  bookmarks of PDF files protected by passwords (if you know them of course), and the password protection will be kept when you save the modified file maintaining the original passwords. It is not possible to add password encryption to files that don't have it already, or to remove it from files that have it with this version, probably this will be added in a future release. Be aware that during the execution a temporary unencrypted copy of the file is created  for the internal use of jpdfbookmarks during the program execution, it is deleted when you exit the applicaiton or close the file. Also the passwords are stored in memory unencrypted for the duration of the execution, so you are not prompted for the passwords each time you want to save the file.

Each bookmark can have now multiple actions associated with it, for example it can point to a page in the current PDF and open the browser to a certain address. This is supported also when parsing bookmarks text files, to add more than one action to a single bookmark you just add a new line without a title for example:

The blank space before the second action is only to align the two actions but is ignored by jpdfbookmarks.
In the graphic user interface if you try to set a new action on a bookmark you are now asked if you want to add the action to the bookmark or if you want to substitute it.

To see all the actions associated to a bookmark use the Actions button on the toolbar or the context menu.

It is also possible now to add bookmarks that open an arbitrary file on the system using the default associated application, for example you can open a text file that on Windows will be probably opened with Notepad and on Ubuntu with gedit.

Now a simple selection with mouse or keyboard will not activate the bookmarks anymore in jpdfbookmarks, you need a double click or to press ENTER or SPACE keys to activate them. I think this is better to work on bookmarks but if you prefer the old behavior you can modify it in the options dialog.

You can set bookmarks pointing to another PDF very easily using the "Open Linked PDF" action, this will create a clipboard shared by the two instances of jpdfbookmarks so that you can cut, copy and paste bookmarks between the two PDF files, the program automatically tries to create a relative path from the file where the bookmark is to the target file, so you should be able to pass the files to another system and the bookmarks should work fine assumed that the relative paths are maintained. 

To create a bookmark from a view in another PDF use the "Copy Linked" button, then go to the other file and paste on the bookmarks tree. 

I'm thinking to create some video tutorials for this features because they are definitely easier to show then to explain for me.

As usual I look forward to reading your feedback and bugs report, thank you.

Saturday, September 4, 2010

JPdfBookmarks 2.4.0 WITHDRAWN

For a few days a 2.4.0 version of jpdfbookmarks has been available, due to severe bugs in it I have withdrawn that version, I apologize with those who have downloaded it. I recommend not to use it, continue to use 2.3.0 and wait for the version 2.4.1.  Thank you.  

Monday, July 12, 2010

Translate JPdfBookmarks

If you want you can translate jpdfbookmarks to your language, it is very easy and no programming skills are required. Here follows a short tutorial on how to add a new language.

Download Netbeans 6.9.1, should work also with other versions but 6.9.1 is the one I use for jpdfbookmarks development,  install and start it then select the menu item  Team->Subversion->Checkout, you will have the following dialog:

in the Repository URL text input insert leave the user and password blank for anonymous access for the time, or contact me if you want to share your translation with the community and I will give you member access to the repository, then click next:


on this other dialog I usually check "Skip and checkout only its content" and select an empty folder in "Local Folder" but here you can choose what you prefer, check also "Scan for Netbeans Projects after checkout" then click Finish button, after the download is finished click on the "Open Project" button:

In the Open Projects dialog choose jpdfbookmarks_core and check the "Open Required" check box in the lower left corner, then click Open. 

In the "Projects Window" navigate to element of the jpdfbookmarks_languages project and right click with your mouse on it, from the context menu select Add->Locale and choose your language identifier:

A new element will be added named (change de_DE with whatever locale you have chosen),  right click on this new element and choose Open from the context menu:

You can see there are different columns, to each Key on the first column there is a related text in each language, when you create a new Locale like we have just done, the text in the default language (English) is copied to the new one also, all you have to do is translate that text in the chosen language. I suggest to click on the Key column header to sort in alphabetical order the keys, this will be helpful when you stop and restart your work to find quickly where you left.

A note for the menu items, each menu item have a mnemonic which is just a stressed letter in the item text when you press the ALT key (I know in some systems can be another modifier) to quickly access it, so for example the key MENU_EDIT in English is "Edit" and its mnemonic MENU_EDIT_MNEMONIC in English is "E", in Italian the same key has a text "Modifica" and its mnemonic is "M", so you should choose the mnemonic also considering the other items in the same menu to avoid collisions. For the rest you should just translate the text to your language but don't hesitate to ask me for any doubt.

When you have finished just right click on jpdfbookmarks_languages project item and choose "Clean and Build".

To launch the program with the new translation we need some more steps, right click on jpdfbookmarks_core project and select "Set As Main Project", then from the same menu choose Properties:

Here from the Categories on the left choose Run, on the dialog on the right create a new configuration with the New... button, name it something like gui_german to debug the graphical user interface or apply_german or what else is meaningful to you. Main Class should not be changed from  it.flavianopetrocchi.jpdfbookamrks.JPdfBookmarks, in Arguments you can put the command line arguments you want to pass to the program, for example if you want to check the help translation put here --help, changing Working Directory  can be used to start the program where most of your pdf files are to debug command line messages. In VM Options you can pass arguments directly to the java virtual machine and this is crucial to debug languages different from the default one of your desktop, for example if your operating system default language is Italian, when you start jpdfbookmarks it will be always in Italian so to translate and debug the program in German use the options -Duser.language=de You can create as many configurations as you like and when you have finished click OK.

Now you can select the configuration created from the main toolbar and run the program with F6 or the toolbar button.

Once you have started the translation if you wish to share your work with others, send me a message and I will add you to the project as a translator member, once you have a user name and a password to commit your changes to the repository just right click on jpdfbookmarks_languages project and choose Subversion->Commit.

If you have any question just ask, thank you best regards.

Saturday, July 10, 2010

Debian packages

There is now a debian package available to install jpdfbookmarks. It has been created by Slavko and it is surely the best way to install the program on linux debian. 
The repositories to add are:
deb testing main non-free
deb-src testing main non-free 
the signature file is at
Thank you very much Slavko and I hope others will follow your example and create packages for other distributions.

Friday, July 9, 2010

JPdfBookmars 2.3.0

Version 2.3.0 is out. The reason for the switch  from version  2.2.X to  2.3.X numbering is the presence of new features regarding  the bookmarks text  files management.
A lot of users had problems with bookmarks text files  using a different encoding from what jpdfbookmarks expected on a particular system, now you can select the character encoding to use, both in the graphical user interface and on the command line.

In GUI mode to change the character encoding select the menu Tools->Options, at the bottom of the General tab there is a field to select the encoding you wish to use for the Dump and Load actions available in the Tools menu.  This setting is preserved between different executions of the program, anyway in the list the system default encoding is indicated by the text (System Default) so that you can revert easily to the original setting when needed.

In command line mode to change the character encoding use the option --encoding (or the -e short form) followed by the encoding name, for example:

jpdfbookmarks_cli.exe --encoding UTF-8 --apply bookmarks.txt --out output.pdf input.pdf   

this will apply the bookmarks contained in the file bookmarks.txt to the input.pdf file and save the result to output.pdf and will instruct jpdfbookmarks to read the file with a UTF-8 encoding. The setting in the command line is not preserved between different executions so if you don't specify an encoding the program  always uses the system default one.

The program doesn't make any check to see if the encoding you use for reading a file is correct, it is your responsibility to match the correct encoding between a dump and an apply. If you use often a different encoding or you want to transfer bookmarks text files to different systems I suggest you to insert the encoding used in the file name to help your memory and the one of any other user of the file, for example I name bookmarks text files like bookmarks_utf8.txt or bookmarks_iso8859-1.txt.

The --out option can now be used also with the --dump option, in this case it is interpreted as the text file where to dump the bookmarks of the pdf file, while I remind you that using it with the --apply option indicates the output pdf file. If you don't specify an --out file.txt, --dump will print bookmarks to standard output so redirection is still an option to save dumps, but the --out option gives you the possibility to change the encoding when used with an --encoding option, for example:

jpdfbookmarks_cli.exe --dump --encoding UTF-32 --out bookmarks.txt input.pdf

will dump bookmarks of input.pdf to a UTF-32 encoded file named bookmarks.txt.

Another feature added is the --force option (-f short form), with this option set no warning is issued or confirmation is asked before overwriting an existing file, while without it any overwriting should require your confirmation. This is useful for batch executions of the program in a non-interactive environment, but use it with caution and backup your files because it can lead to data loss.

Some bugs also have been corrected, to name a few:
  • memory needed for reading large files have been reduced a lot using temporary files that the program writes during execution (this is totally transparent to you as a user of course, but I like that you know what happens on your computer);
  • trailing spaces could lead to a wrong interpretation of lines in previous versions, now they are removed at runtime;
  • saving large files in gui mode now runs in its own thread and there is an animated bar at the bottom indicating that the save action is taking place;
  • the bookmarks toolbar is not scrolled with bookmarks anymore.
I would like to thank all the users and programmers who have reported bugs and  have indicated a viable solution, thanks a lot.

Saturday, April 24, 2010


This release is in response to some complaints about how the user interface of previous versions behaved, especially under Linux or with low screen resolutions, thank you for reporting this problem.

The bookmarks panel on the left was not shrinkable more than the width of the associated toolbar, and the main toolbars took too much space on some platforms.

In this version  the bookmarks toolbar is positioned vertically next to the bookmarks container that is now free to shrink  without problems.

There is also a "Toolbars Manager" accessible from the Options panel in the Tool menu, or right clicking on a free spot of one of the toolbars, from there you can choose which toolbars you want to visualize in the user interface (default setting is to show all toolbars).

Best regards.

Saturday, March 20, 2010


JPdfBookmarks version 2.2.0 is out, download it from source-forge. This release resolves the HeadlessException bug affecting servers without a graphic environment and adds some new experimental features requested by users.
Now browsing through the pages is easier, if you continue to scroll a page up or down  past its scrolling limits, using the mouse or the keyboard, you are taken to the previous or next page, this increases usability a lot in my opinion.

On some platforms (on Windows for sure) it is now possible to drag and drop a PDF file over the JPdfBookmarks main panel to open it.
From the command line is now possible to add a bookmark pointing to another PDF file using the form:

Chapter 1/9,Black,notBold,notItalic,open,FitWidth,206,GoToFile,file.pdf

I tried to implement the same possibility in the GUI but is still very experimental, anyway if you want to try it you have to open another instance of jpdfbookmarks to open the target PDF and create there the bookmark you want, copy it with CTRL+C or with the context menu, then go back to the other instance and paste with CTRL+V or context menu.

Another feature requested by you, and now available, is the possibility to use the command line to modify a PDF to show bookmarks as soon as it is opened in a viewer, it is done with the --show-on-open (-w is the short form) argument which takes CHECK, YES or NO as parameters (not case sensitive and c, y or n are the short forms). For example:

jpdfbookmarks --show-on-open check file.pdf

will print YES or NO to tell you what is the current setting;

jpdfbookmarks -w y file.pdf -o output.pdf

will create a copy of file.pdf named output.pdf that will show bookmarks as soon as opened in a viewer.

I hope you will find useful these new features as I do, there are probably many bugs but I hope you will help me to find them with comments and reports.

Thank you, best regards.

Tuesday, February 9, 2010

JPdfBookmarks 2.1.0

JPdfBookmarks 2.1.0 is now ready for download. This release fixes some bugs and adds the features of text extraction from a rectangle in the PDF page and the possibility to use the system clipboard in a convenient way. 
The text extraction tool can be activated from the "Tools" menu, from the toolbar  button or with the shortcut "CTRL + ALT + T", when the tool  is active you can drag the mouse on the page to draw a rectangle over the text to extract. On the status bar (lower left) you can read a preview of the extracted text, at least a portion of it, if there is no text in the status bar than the extraction has failed. After you have extracted the text it will be used automatically has the title of the next bookmarks you will create until you deactivate the tool or extract a new portion of text. Sometimes the program will fail to extract the text (always check the status bar to diagnose this), try to redraw the rectangle larger or smaller and if it continues to fail I suggest to give up, this is where the tool "Use System Clipboard" can help. When that tool is active you can copy text from any other program to the system clipboard and it will be used automatically as the title of the next bookmarks created, the connection also works in the opposite sense so when you extract text using JPdfBookmarks it will be also automatically copied to the system clipboard, but remember  that this is only if the tool is active. 
I hope you will find new features useful and the software a bit more stable than the preceding versions, please remember to give some feedback thank you. 

Sunday, January 24, 2010

JPdfBookmarks 2.0.1

Binaries and source code of JPdfBookmarks 2.0.1 are now available on source-forge. This is not much different from version 2.0.0, just a few bugs corrected (but many more are surely still there), the important thing of this release is that now JPdfBookmarks si "Free Software" with source code available under the GPL version 3.
I don't provide any installer for this version just archives with binaries, read the README file in the distributed folder for instructions on how to launch the program, the reason for this choice is that the program is still in a early stage of development and I prefer to spend all of my time resolving the bugs that I hope you will report. Remember that feedback from users is very important for me so don't  hesitate to  contact me here on the Blog or on the source-forge forum.

Monday, January 11, 2010

JPdfBookmarks Has Gone Open Source

I'm proud to announce that JPdfBookmarks is now open source, released subject to the GNU GENERAL PUBLIC LICENSE Version 3 (GPLv3 for short) and hosted on SourceForge. The reasons for making this choice are numerous, to name only a few:
  • receiving help from the community to fix bugs and implement new features;
  • having more flexibility in the choice of the libraries the program uses;
  • using code released by other open source projects using a compatible license;
  • facilitating the distribution of the software;
  • improving programming skills receiving (constructive) criticism by other developers;
  • I make use of a lot of open source software and libraries, it's time to contribute somehow.
For the time being there is no binary package that can be downloaded by normal users, but an advanced user or a java developer can already access the sourceforge subversion repository and build the project, a small guide follows.

My development environment is the JDK 6, I use the Netbeans IDE version 6.7.1 but you can build jpdfbookmarks on the command line using ant if you prefer. Netbeans have very good subversion integration if you use this IDE I recommend it, otherwise download an appropriate subversion client for your system, I will first guide you to build the program in Netbeans and then on the command line.

From the Netbeans menu choose "Team->Subversion->Checkout" and you will get the following dialog:

 the repository url to enter is then click next and you will get to the following panel:

 choose trunk as the repository folder and check "Skip "trunk" and checkout only its content", choose the local folder, for example C:\Users\username\Documents\NetbeansProjects\jpdfbookmarks, and check "Scan for Netbeans Projects after Checkout", then click Finish. Wait for the download to finish and then you get:

click on "Open Project ..." and you have:

select the project jpdfbookmarks_core, check "Open Required" and click Open.
 Run the project in Netbeans with F6 key or with the appropriate Run menu item.

If you prefer using the command line download the current source with the command:

 $> svn co jpdfbookmarks 

enter the directory containing the main project with:

$> cd jpdfbookmarks/jpdfbookmarks_core

build the project with:

$> ant jar

execute the program with:

$> java -jar dist/jpdfbookmarks.jar

Any feedback of any kind is really appreciated, post comments here or at sourceforge or send me an e-mail,
thank you.

Sunday, January 3, 2010

JPdfBookmarks Stopped

I am sorry to report that I have to stop the distribution  of JPdfBookmarks, I probably will migrate the project to open source as soon as I have enough time to spend on it, for the time I cannot comply with some licenses compatibility so I cannot ditribute the program anymore. 
Thanks to all for your support and beg your pardon.