index.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html><head>
  3. <style type="text/css">
  4. body {font-family: verdana,arial,sans-serif;}
  5. </style>
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  7. <title>jPDF Tweak Documentation</title>
  8. </head><body>
  9. <h1>jPDF Tweak Documentation</h1>
  10. <p>This documentation is still incomplete. But it should mention the
  11. strangest things in jPDF Tweak. If you want to help improving it,
  12. <a href="mailto:schierlm@users.sourceforge.net">contact the author</a>.</p>
  13. <h2>System Requirements</h2>
  14. <p>You will need Java 5 or higher to run jPDF tweak.</p>
  15. <h2>Starting</h2>
  16. <p>Start jPDF Tweak by running jpdftweak.bat, double-clicking jpdftweak.jar
  17. or running</p>
  18. <p><tt>java -jar jpdftweak.jar</tt></p>
  19. <p>at the command line.</p>
  20. <h2>The Main Window</h2>
  21. <p>The main window is divided into multiple tabs. You can select
  22. options from as many tabs as you need. Press <b>Run</b> when you are
  23. finished setting options.</p>
  24. <h3>The Input Tab</h3>
  25. <p><img src="shot01.png" width="763" height="544" alt="Input Options"></p>
  26. <p>Select an input file to manipulate. If you want to combine multiple
  27. files, check the checkbox and add more files. They will end up in
  28. the box below, where you can select pages and/or reorder them. Click
  29. Add in the lower left corner to add another entry for a file already
  30. used. If you want to process multiple files the same way, select
  31. batch processing and add multiple files. In that case, you should use
  32. variables in the output filename or each file will overwrite the
  33. previous one.</p>
  34. <p>If the file is encrypted, you will need the owner password to
  35. decrypt it. Yes, I know, it is <i>possible</i> to decrypt by using
  36. the user password only, but it is not <i>allowed</i> to do so.</p>
  37. <p>All page numbers start with 1 (like normal people count), not with 0
  38. (like programmers count). To reverse the page order, use a From Page
  39. that is larger than the To Page.</p>
  40. <p>In case you have odd and even pages in separate documents (or even
  41. more parts), you can use the Interleave feature to merge them again.</p>
  42. <p>When combining multiple files, you might want to start each file on
  43. an odd (or even) page; you can use the "Empty before" option for this.
  44. In case you do not want to care if the document begins on an odd or even
  45. page, you can give two numbers separated by comma, for odd and even page.
  46. Therefore, <tt>0,1</tt> will make the document start on an odd page,
  47. <tt>1,0</tt> on an even page, <tt>1,2</tt> will make it start on an
  48. even page with the odd page before blank, etc.</p>
  49. <p>Note that if you use the "combine multiple files" option, some options
  50. that are usually kept in the document are dropped, even if you only
  51. selected one file! This also applies to the command line mode - if you
  52. use the <tt>-i</tt> option, it will use multiple file mode and drop
  53. page numbers, document info, forms, etc.</p>
  54. <h3>The Page Size Tab</h3>
  55. <p><img src="shot02.png" width="763" height="544" alt="Page Size Options"></p>
  56. <p><b>Crop to</b>: This will crop the visible part of the PDF to one
  57. of the embedded page boxes (if present); Useful if you got a PDF intended
  58. for pre-press with visible crop marks and want to distribute it without
  59. showing the crop marks.</p>
  60. <p><b>Rotate Pages</b>: If you have a PDF that has both Portrait and Landscape pages, and
  61. your printer has problems in printing both, you can rotate the pages
  62. so that they are all Portrait or Landscape afterwards. Of course,
  63. you can use this option as well to rotate all pages.</p>
  64. <p><b>Remove implicit page rotation</b>: PDF knows two ways of
  65. rotating pages; rotating the content or rotating the media
  66. (implicitly) . Some tools have problems with rotated media, so you
  67. can change all Media rotations to content rotations with this
  68. option (The option above creates media rotation as well). jPDF Tweak
  69. should work with rotated media as well. If you have problem with
  70. rotated pages, try checking this option and, if it helps, report a
  71. bug.</p>
  72. <p><b>Scale pages</b>: Useful if your PDF contains pages of different
  73. size. Some tools (like the <i>Shuffle</i> tab of this tool) require
  74. pages of equal size. Use this option to scale all pages to the same
  75. size. Of course, you can use this option as well if all pages are of
  76. equal size. In that case, you might as well use the scale option of
  77. your PDF viewer program.</p>
  78. <p><b>PostScript points</b>: A
  79. <a href="http://en.wikipedia.org/wiki/Point_(typography)">PostScript
  80. point</a> is the 72th of an inch.</p>
  81. <p><b>Center instead of enlarging</b>: Use this option if the new page
  82. size is larger than the old one and the pages should be centered
  83. instead of enlarged.</p>
  84. <p><b>Do not preserve aspect ratio</b>: Causes funnily stretched pages
  85. if the aspect ratio has changed.</p>
  86. <h3>The Watermark Tab</h3>
  87. <p><img src="shot03.png" width="763" height="544" alt="Watermark Options"></p>
  88. <p>Here you can add two kinds of watermarks and page numbers. The text
  89. watermark appears on top of the content, the PDF watermark on
  90. bottom. So if your PDF pages are completely filled (maybe even with
  91. white color), you won't see a
  92. PDF watermark.</p>
  93. <p>Text watermark and page numbers use the built-in Helvetica font
  94. (similar to Arial on Windows systems).</p>
  95. <p>Page numbers can be printed on any corner or edge of the page,
  96. or in the middle (mostly useful for testing purposes). The position
  97. can be mirrored on even pages, to get the page number on the outer
  98. or inner edge for duplex documents.</p>
  99. <p>If plain numbers are not enough for you, you can use a mask to
  100. format your numbers. This mask uses the same syntax as the standard
  101. Java <a href="http://java.sun.com/j2se/1.5/docs/api/java/util/Formatter.html#syntax">formatting
  102. function</a>, and supports the current page number and the total
  103. number of pages as parameters. The current page number is available
  104. in a plain way (1-n) that you can format yourself, and additionally
  105. in a shifted way (if your document's page numbers are shifted), and
  106. in a pre-formatted way (which is interesting for letters or roman
  107. numbers).</p>
  108. <p>In case you want to change the page numbers for the printed values,
  109. you can do this on this tab as well, in the same format as on the
  110. Page Numbers Tab. Note that if you do not select different page numbers
  111. on the Page Numbers Tab, and no other transformation invalidates your
  112. page numbers, these page numbers will also be present in the output
  113. document as if they were configured on the Page Numbers Tab as well.
  114. So, for this common case, it is enough to configure the page numbers once.</p>
  115. <h3>The Shuffle/N-up Tab</h3>
  116. <p><img src="shot04.png" width="763" height="544" alt="Shuffle/N-up Options"></p>
  117. <p>This might be the most powerful, and the most complex tab. Choose
  118. a preset and stick with it <tt>:-)</tt></p>
  119. <p>If you want to print "booklets" that are thicker, you might prefer
  120. to shuffle blocks of 20 pages or so, then fold each of them
  121. individually and stitch them together to a "book".</p>
  122. <p>If you want to build a config yourself: First specify how many
  123. pages each pass (each use of the template) covers. If you select 4
  124. here, and your PDF has 21 pages, it will be run 6 times (5 times
  125. with 4 pages each, and once with the last page). If you give a
  126. negative number, you can take half of the pages from the end of the
  127. document instead of from the beginning. This is useful for booklet
  128. layouts.</p>
  129. <p> Use positive page numbers like "+2" to refer to the second page of the
  130. template, and negative page numbers like "-3" to refer to the third
  131. page of the "opposite" template (i.e. the one if you process the
  132. file from end instead of from beginning). An absolute number without
  133. sign (like "2") refers to the same absolute page (i.e the second
  134. page of the file).</p>
  135. <p>For the offsets and factors: Just tweak them until it looks correct
  136. in the preview. If you rotate a page and it is gone, this is most
  137. likely caused by the fact the the rotation used the lower left
  138. corner as center point and not the center of the page.</p>
  139. <p>Uncheck the <b>NewPageBefore</b> to put more than one source page
  140. onto one destination page.</p>
  141. <p>Yes, creating a config with both positive and negative numbers can
  142. be confusing. For a test, you might add huge page numbers to your
  143. document (see previous tab) so you can see quickly if your config is
  144. correct.</p>
  145. <h3>The Page Numbers Tab</h3>
  146. <p><img src="shot04a.png" width="763" height="544" alt="Shuffle/N-up Options"></p>
  147. <p>Here you can tweak the page numbers that appear in your PDF
  148. reader. Depending on your PDF reader, they can be used for displaying
  149. the current page in the toolbar and status bar, jumping to a page by
  150. its number and/or printing page ranges. Most printed documents have
  151. some kind of title pages and or table of contents that are outside of
  152. the page numbers or are numbered with Roman numbers. This makes it
  153. hard if you read about something "on page 200" to jump to this page
  154. 200, because it will be the 205<sup>th</sup> page and not the
  155. 200<sup>th</sup> if there are five pages before page 1.</p>
  156. <p>Note that these page numbers do not appear on the page itself. For
  157. this kind of numbers, there is an option on the "Watermark" tab.</p>
  158. <p>To just change the number of the first physical page, click "Add"
  159. once, leave the "Start Page" at one and change the other controls. If
  160. you want to have "gaps" in your page numbers, add more lines and use
  161. "Start page" to point to the physical page numbers (i. e. those that
  162. start from 1) where the format should change.</p>
  163. <p>Assume you have a 6 page PDF, and you set it up as follows:</p>
  164. <table border="1" style="margin: 5px; border: 1px solid gray; border-collapse: collapse">
  165. <tr><th>Start Page</th><th>Style</th><th>Prefix</th><th>Logical Page</th></tr>
  166. <tr><td>1</td><td>Empty</td><td>Title</td><td>1</td></tr>
  167. <tr><td>2</td><td>I, II, III</td><td>&nbsp;</td><td>4</td></tr>
  168. <tr><td>5</td><td>1, 2, 3</td><td>S</td><td>32</td></tr>
  169. </table>
  170. <p>Then the six pages will have numbers <tt>Title</tt>, <tt>IV</tt>,
  171. <tt>V</tt>, <tt>VI</tt>, <tt>S32</tt>, <tt>S33</tt>.</p>
  172. <p>Be careful that your document does not end up having two pages with
  173. the same number (as represented as text) - some versions of Adobe
  174. Reader don't really like that. You can work around it by setting a
  175. prefix for these pages or use different number styles.</p>
  176. <h3>The Bookmarks Tab</h3>
  177. <p><img src="shot05.png" width="763" height="544" alt="Bookmark Options"></p>
  178. <p>Here you can tweak chapter bookmarks. If you selected more than one
  179. input file, chapter bookmarks will be combined automatically. But if
  180. you select individual pages or ranges instead of the full document,
  181. you will have to tweak the bookmarks manually.</p>
  182. <p>If you want to create bookmarks from scratch, it is useful to open
  183. existing PDFs and look what the bookmarks look like in there. If you
  184. want to add bookmarks that do not only point to a page but to a
  185. position on a page, you might need a tool like GSView (from
  186. GhostScript) which shows coordinates when moving the cursor on a PDF
  187. file.</p>
  188. <h3>The Attachments Tab</h3>
  189. <p><img src="shot06.png" width="763" height="544" alt="Attachment Options"></p>
  190. <p>Here you can add attachments and remove files you erroneously
  191. attached before. This view does not show which files have been
  192. attached to the original document. If you need them, use your PDF
  193. viewer to save them and reattach them if necessary.</p>
  194. <h3>The Interaction Tab</h3>
  195. <p><img src="shot07.png" width="763" height="544" alt="Interaction Options"></p>
  196. <p>This tab is interesting. When a PDF file is shown in full screen
  197. mode, pages can flip automatically and/or with a nice effect. Select
  198. effects and/or durations (durations are in seconds) on the left. You
  199. can set viewer preferences (how the document should be opened) on
  200. the right.</p>
  201. <h3>The Document Info Tab</h3>
  202. <p><img src="shot08.png" width="763" height="544" alt="Document Info Options"></p>
  203. <p>Here you can add information to the document info dictionary (shown
  204. when you open "Document summary"</p>
  205. <h3>The Encrypt/Sign Tab</h3>
  206. <p><img src="shot09.png" width="763" height="544" alt="Encrypt/Sign Options"></p>
  207. <p>Encrypting is quite standard nowadays, so I won't write much
  208. here. If you know the owner password, you may do everything with the
  209. document; if you know only the user password, you may only do things
  210. checked below. The user password may be empty, the owner password
  211. may not (but you can use the same password for both if desired).</p>
  212. <p>Signing is a bit more tricky, since you need a key and a
  213. certificate for this to be useful. Import that key into a Java
  214. KeyStore (using Sun's <tt>keytool</tt> tool), and you can use it
  215. from here.</p>
  216. <h3>The Output Tab</h3>
  217. <p><img src="shot10.png" width="763" height="544" alt="Output Options"></p>
  218. <p>Don't forget this tab! Select an output filename here. If you
  219. select a name of an existing file, you will receive a warning.
  220. However, if you run jPDF tweak more than once, it will <b>not</b>
  221. create a warning since warnings are annoying if you are just trying
  222. to find the right settings by trial and error.</p>
  223. <p>You may optionally burst the document into single page PDFs. Note
  224. that not all features (like bookmarks, transitions or viewer
  225. preferences) make sense when you burst a document.</p>
  226. <p>When you save a document uncompressed, you can add page marks
  227. (compatible to pdftk's page marks) to find pages easier in the PDF
  228. source code. Search for "pdftk_PageNum" in the uncompressed
  229. PDF to find a page. When you compress a PDF again, you can remove
  230. these marks.</p>
  231. <p>In case the matching JMuPdf native library is present, you can
  232. also burst the document to images or save it as a multipage TIFF
  233. document.</p>
  234. <hr>
  235. &copy; 2007-2011 Michael Schierl
  236. </body></html>