jPDF Tweak Documentation

This documentation is still incomplete. But it should mention the strangest things in jPDF Tweak. If you want to help improving it, contact the author.

System Requirements

You will need Java 5 or higher to run jPDF tweak.

Starting

Start jPDF Tweak by running jpdftweak.bat, double-clicking jpdftweak.jar or running

java -jar jpdftweak.jar

at the command line.

The Main Window

The main window is divided into multiple tabs. You can select options from as many tabs as you need. Press Run when you are finished setting options.

The Input Tab

Input Options

Select an input file to manipulate. If you want to combine multiple files, check the checkbox and add more files. They will end up in the box below, where you can select pages and/or reorder them. Click Add in the lower left corner to add another entry for a file already used.

If the file is encrypted, you will need the owner password to decrypt it. Yes, I know, it is possible to decrypt by using the user password only, but it is not allowed to do so.

All page numbers start with 1 (like normal people count), not with 0 (like programmers count).

The Page Size Tab

Page Size Options

Rotate Pages: If you have a PDF that has both Portrait and Landscape pages, and your printer has problems in printing both, you can rotate the pages so that they are all Portrait or Landscape afterwards. Of course, you can use this option as well to rotate all pages.

Remove implicit page rotation: PDF knows two ways of rotating pages; rotating the content or rotating the media (implicitly) . Some tools have problems with rotated media, so you can change all Media rotations to content rotations with this option (The option above creates media rotation as well). jPDF Tweak should work with rotated media as well. If you have problem with rotated pages, try checking this option and, if it helps, report a bug.

Scale pages: Useful if your PDF contains pages of different size. Some tools (like the Shuffle tab of this tool) require pages of equal size. Use this option to scale all pages to the same size. Of course, you can use this option as well if all pages are of equal size. In that case, you might as well use the scale option of your PDF viewer program.

PostScript points: A PostScript point is the 72th of an inch.

Center instead of enlarging: Use this option if the new page size is larger than the old one and the pages should be centered instead of enlarged.

Do not preserve aspect ratio: Causes funnily stretched pages if the aspect ratio has changed.

The Watermark Tab

Watermark Options

Here you can add two kinds of watermarks and page numbers. The text watermark appears on top of the content, the PDF watermark on bottom. So if your PDF pages are completely filled (maybe even with white color), you won't see a PDF watermark.

Text watermark and page numbers use the built-in Helvetica font (similar to Arial on Windows systems).

The Shuffle/N-up Tab

Shuffle/N-up Options

This might be the most powerful, and the most complex tab. Choose a preset and stick with it :-)

If you want to build a config yourself: First specify how many pages each pass (each use of the template) covers. If you select 4 here, and your PDF has 21 pages, it will be run 6 times (5 times with 4 pages each, and once with the last page). If you give a negative number, you can take half of the pages from the end of the document instead of from the beginning. This is useful for booklet layouts.

Use positive page numbers like "+2" to refer to the second page of the template, and negative page numbers like "-3" to refer to the third page of the "opposite" template (i.e. the one if you process the file from end instead of from beginning). An absolute number without sign (like "2") refers to the same absolute page (i.e the second page of the file).

For the offsets and factors: Just tweak them until it looks correct in the preview. If you rotate a page and it is gone, this is most likely caused by the fact the the rotation used the lower left corner as center point and not the center of the page.

Uncheck the NewPageBefore to put more than one source page onto one destination page.

Yes, creating a config with both positive and negative numbers can be confusing. For a test, you might add huge page numbers to your document (see previous tab) so you can see quickly if your config is correct.

The Bookmarks Tab

Bookmark Options

Here you can tweak chapter bookmarks. If you selected more than one input file, chapter bookmarks will be combined automatically. But if you select individual pages or ranges instead of the full document, you will have to tweak the bookmarks manually.

The Attachments Tab

Attachment Options

Here you can add attachments and remove files you erroneously attached before. This view does not show which files have been attached to the original document. If you need them, use your PDF viewer to save them and reattach them if necessary.

The Interaction Tab

Interaction Options

This tab is interesting. When a PDF file is shown in full screen mode, pages can flip automatically and/or with a nice effect. Select effects and/or durations (durations are in seconds) on the left. You can set viewer preferences (how the document should be opened) on the right.

The Document Info Tab

Document Info Options

Here you can add information to the document info dictionary (shown when you open "Document summary"

The Encrypt/Sign Tab

Encrypt/Sign Options

Encrypting is quite standard nowadays, so I won't write much here. If you know the owner password, you may do everything with the document; if you know only the user password, you may only do things checked below. The user password may be empty, the owner password may not (but you can use the same password for both if desired).

Signing is a bit more tricky, since you need a key and a certificate for this to be useful. Import that key into a Java KeyStore (using Sun's keytool tool), and you can use it from here.

The Output Tab

Output Options

Don't forget this tab! Select an output filename here.

You may optionally burst the document into single page PDFs. Note that not all features (like bookmarks, transitions or viewer preferences) make sense when you burst a document.

When you save a document uncompressed, you can add page marks (compatible to pdftk's page marks) to find pages easier in the PDF source code. Search for "pdftk_PageNum" in the uncompressed PDF to find a page. When you compress a PDF again, you can remove these marks.


© 2007 Michael Schierl