1. BeCyPDFMetaEdit Help
  2. Contents
  3. 1. User Interface
  4. 1.1 General
  5. 1.2 Metadata
  6. 1.3 Metadata (XMP)
  7. 1.4 Viewer Preferences
  8. 1.5 Pages
  9. 1.6 Bookmarks
  10. 1.7 Slide Show
  11. 1.8 Security
  12. 1.9 Extras
  13. 2. Command Line
  14. 2.1 Synopsis
  15. 2.2 Exitcode / Output
  16. 2.3 Dynamic Path Names
  17. 2.4 Summary Templates
  18. 2.5 Examples
  19. 1. User Interface
  20. 1.1 General
  21. The PDF document to be edited is selected at "Source". To do so, the
  22. button "Open..." allows browsing the file system. After opening a file,
  23. the application will read its content and display the available data in
  24. the various fields and tabs for editing.
  25. When opening a document, one can choose among three editing modes:
  26. incremental updating, complete rewriting and repairing.
  27. Using incremental updating, the changes are just appended to the end of
  28. the original file without touching its previous contents, i. e. the
  29. appended changes will logically overwrite the old data rather than
  30. physically. This method allows fast opening and updating even of huge
  31. documents and allows furthermore to undo the changes and to restore the
  32. original document contents. Two disadvantages of this approach should
  33. also be mentioned. First, repeated updating of a document will increase
  34. its file size. Second, the optimization for fast web-view
  35. (linearization) becomes unusuable.
  36. Using complete rewriting, the file is entirely regenerated and its
  37. previous content is overwritten with the updated document. All
  38. previously made incremental updates will be irreversibly merged into a
  39. single new edition of the document. Rewriting a file requires more
  40. memory and time both when loading and saving a document. The advantage
  41. of this approach is the possibility to change the document's encryption
  42. or to reduce the file size by merging incremental updates.
  43. The mode repair is basically the same as rewriting. The only difference
  44. is that upon loading the document syntax errors are ignored or corrected
  45. if possible. This mode should only be chosen if the application reports
  46. errors that indicate a file corruption when loading the document.
  47. Note: The application does not support signed documents. Saving such
  48. documents may therefore invalidate the integrity of the document.
  49. Documents can be opened directly from the Windows Explorer using
  50. Drag&Drop, too. One simply clicks the document with the left mouse
  51. button and drags it onto the main window of the application. The actual
  52. editing mode for the document is controlled by the keyboard:
  53. If the key <Shift> is hold down when releasing the mouse button, the
  54. document is opened for "complete rewriting".
  55. If otherwise the key <Alt> is hold down, the document will be opened
  56. using "repair" mode.
  57. In all other cases, the document will be opened for "incremental
  58. updating".
  59. The buttons "Save" and "Save as..." can be used to write changes to the
  60. current or a new file. For read-only files, the changes can only be
  61. saved to a new file using "Save as...". The kind of saving performed
  62. (complete or incremental) depends on the editing mode selected during
  63. opening.
  64. The button "Cancel" exits the applications. All unsaved changes to the
  65. document are discarded.
  66. 1.2 Metadata
  67. This tab allows to edit the general information about the document like
  68. author, title, subject etc.
  69. If the option "Automatic" for the field "Created at" or "Modified at" is
  70. active, the creation/modification date will be set to the current time
  71. when the document is saved.
  72. The timestamps for the file will be automatically synchronized to the
  73. values of the fields "Created at" and "Modified at".
  74. Changing these values can also be performed in batch mode using the
  75. command-line. More information on this topic is available in the section
  76. covering the command-line usage.
  77. 1.3 Metadata (XMP)
  78. Since PDF version 1.4, metadata can be stored in a new XML-based format
  79. named XMP ("Extensible Metadata Platform"). With regard to backward
  80. compatibility, newer PDF documents contain the metadata both in XMP and
  81. also in classical form. However, the application is currently not
  82. capable of processing metadata in XMP format. This can lead to the
  83. effect that a PDF viewer shows the original field values after the
  84. metadata has been edited. Even if the PDF viewer shows the new metadata,
  85. the XMP metadata still contains the original field values which could be
  86. extracted using a hex or text editor.
  87. To address these problems, the application allows at least to remove the
  88. XMP metadata. The metadata will then only be stored in the classical
  89. format.
  90. Attention: XMP-based metadata cannot only be specified for the entire
  91. PDF document but also for parts of it. The application only deletes the
  92. document-specific metadata, metadata attached to other document content
  93. stays as is. Therefore, additional tools like a hex editor are required
  94. if all XMP metadata shall be removed.
  95. 1.4 Viewer Preferences
  96. Here, certain details about the display of the document by a PDF viewer
  97. can be customized. For instance, the viewer can be told to directly
  98. enter fullscreen mode when opening the document or to show the bookmark
  99. hierarchy.
  100. 1.5 Pages
  101. This section allows configuring the page labels for the document. Page
  102. labels primarily specify a numbering style like arabic or roman with an
  103. optional prefix. Some portions of the document like the index, the
  104. appendix or the contents can be equipped with an individual page
  105. numbering that helps the user to orientate himself within the document.
  106. The actual way of page numbering is specified for a continous range of
  107. pages. Such a range begins at an explicitly given page index and extends
  108. to the beginning of the next range with a different numbering.
  109. 1.6 Bookmarks
  110. As some kind of hyperlink-like index, the bookmarks of a document allow
  111. a reader to quickly access certain text locations.
  112. After opening a document, the application displays the current bookmark
  113. hierarchy which can then be customized.
  114. The text location to which a bookmark refers is given by a page number
  115. and a position somewhere on this page. The position allows a PDF viewer
  116. to scroll the appropriate text portion into view, regardless of the
  117. current zoom mode. For this reason, the upper-left corner of the text
  118. portion can be specified using the two coordinates X and Y. These
  119. coordinates are relative to a coordinate space whose origin is the
  120. upper-left corner of the current page and whose positive x-/y-axis point
  121. rightwards/downwards. The length of a unit is one Millimeter (1 in =
  122. 25,4 mm) on both axes. For instance, the tuple (X=0 / Y=0) refers to the
  123. beginning of the page while (X = 210 / Y = 297) refers to the lower-
  124. right edge of a DIN A4 page.
  125. Note: Bookmarks whose text location is unknown are indicated by the page
  126. number ? (zoom mode and scroll position are also unknown in this case).
  127. The other attributes of such bookmarks can be edited without affecting
  128. the function of the bookmark. Explicitly adjusting the page number is
  129. not neccessary:
  130. 1.7 Slide Show
  131. The elements of this tab allow to edit the page transitions for a slide
  132. show presentation of the document. PDF viewer will typically use those
  133. transition effects only when viewing the document in full-screen mode.
  134. The "display duration" of a page denotes the maximum time before a PDF
  135. viewer automatically advances to the next page. The value 0 indicates
  136. that no automatic page navigation is to be performed.
  137. The field "Effect" controls the style of the transition to this page and
  138. "Effect duration" gives the speed of the transition. Depending on the
  139. effect selected, several other options can be used to further customize
  140. the transition.
  141. 1.8 Security
  142. Note: The elements of this page are only enabled when the document was
  143. opened for "complete rewrite".
  144. The selection box "Security system" determines the encryption of the
  145. document. The current encryption can be left unchanged, it can be
  146. entirely removed or replaced with a new password-based one.
  147. When choosing a password-based encryption, additional fields allow
  148. setting two passwords and optionally to restrict permissions. An
  149. encrypted document can be fully opend with either of the two passwords
  150. (owner/user). Differences only arise when concerning further operations
  151. like printing or modifying the document. For a document with different
  152. owner and user passwords, persons giving the correct owner password will
  153. always have unrestricted access to the document. In contrast, persons
  154. giving just the user password can only perform operations granted by the
  155. permissions.
  156. Note that PDF viewer will only prompt for a password when the user
  157. password is set for a document. In other words, a document without an
  158. user password but with an owner password can be opened by anyone who is
  159. then automatically subject to the access restrictions set.
  160. The granularity of the permissions depends on the selected security
  161. system. But in general, a permission with a check mark is granted to the
  162. user. In order to deny a certain operation, the corresponding check mark
  163. has to be removed.
  164. 1.9 Extras
  165. Some technical details about the document's file structure and command
  166. for special tasks can be found on this page.
  167. The "PDF version" indirectly indicates which features of the PDF
  168. specification a document uses and which PDF viewer is required to fully
  169. support all those features.
  170. If the document was not opened for incremental update, the PDF version
  171. can be altered, too. This feature might be useful for preventing an
  172. annoying warning message displayed by old PDF viewers when opening a PDF
  173. document with a rather new version.
  174. Note: Changing the PDF version only affects the header of the PDF file.
  175. The body of the document is neither checked for conformance with the new
  176. version nor is the body converted.
  177. The "Document edition" illustrates how often the document has been
  178. updated using incremental updates. The application titles the original
  179. version of a document as "1. edition", a document with one update as "2.
  180. edition" and so on.
  181. The "File identifier" serves the unique identification of the document,
  182. e. g. for external links or in workflows. It usually consists of two
  183. hexadecimal-encoded byte sequences (major and minor id) each being 16
  184. bytes long. The major id should not change when updating the document.
  185. If the option "Automatic" is active, the application will create a new
  186. minor id for the document upon saving in order to separate the new
  187. document edition from its previous edition.
  188. The buttons "Save template..." and "Open template..." support loading
  189. and saving of all the document settings from/into a text file for easier
  190. reusage. This way, metadata, viewer preferences, bookmarks etc. can be
  191. configured once for later or multiple usage.
  192. The dialogs for saving/opening templates allow to restrict which
  193. settings to export/import. Importing settings overwrites the current
  194. document contents, therefore not importing settings simply means to keep
  195. the current setting.
  196. Tip: Users requiring an even finer control over the settings to be
  197. imported are encouraged to directly edit the template file using an
  198. ordinary text editor. This way, individual settings can be deleted from
  199. the sections (by deleting the whole line not just the value) which are
  200. not to be imported.
  201. Using the button "Restore edition..." previously saved incremental
  202. updated can be undone in order to restore some older document edition.
  203. The requested document edition is stored to a new file so that its
  204. contents can be verified.
  205. 2. Command Line
  206. 2.1 Synopsis
  207. Most of the application functionality can be used by script or batch
  208. files using the command-line, i. e. without interaction with a user. The
  209. exact format of the command-line to issue is described below. The long-
  210. options have not been listed here in favor of a compact presentation.
  211. Brackets [ ] indicate optional parameters.
  212. > BeCyPDFMetaEdit ["PDF file"]
  213. [-s [RecursionDepth]]
  214. [-d EditingMode]
  215. [-V PdfVersion]
  216. [-T "Title"]
  217. [-S "Subject"]
  218. [-A "Author"]
  219. [-K "Keywords"]
  220. [-R "Application"]
  221. [-P "Generator"]
  222. [-C "Created"]
  223. [-M "Modified"]
  224. [-X DeleteMode]
  225. [-PL PageLayout]
  226. [-PM PageMode]
  227. [-Pm PageModeAfterFullScreen]
  228. [-HT Mode]
  229. [-HM Mode]
  230. [-HW Mode]
  231. [-CW Mode]
  232. [-FW Mode]
  233. [-DDT Mode]
  234. [-FP FirstPage]
  235. [-pl "PageLabel"] ... [-pl "PageLabel"]
  236. [-pwd "Password"]
  237. [-e Encryption]
  238. [-o "Owner"]
  239. [-u "User"]
  240. [-p "Permissions"]
  241. [-tf "TemplateFile"]
  242. [-tm "TemplateMask"]
  243. [-st "SummaryTemplate"]
  244. [-sf "SummaryTemplateFile"]
  245. [-so "SummaryOutput"]
  246. [-r] [-f] [-q] [-v] [-?]
  247. The meaning of the individual parameters and flags is as follows:
  248. "PDF file"
  249. path to the PDF document to edit. The usual wildcard characters asterisk
  250. (*) and question mark (?) can be used to specify a search pattern and to
  251. process all documents within a directory whose file names match the
  252. pattern; omitting PDF file directs the application to start the
  253. interactive mode (as long as the flags -? or -v are not given)
  254. -s, -SubDirs RecursionDepth
  255. maximum recursion depth when scanning sub directories for documents
  256. which match the pattern; a value of 0 for RecursionDepth limits the
  257. search to the base directory, a value of 1 includes also all immediate
  258. sub directories of the base directory and so on
  259. If this parameter is entirely omitted, there will be no recursion at
  260. all. If the parameter is used just without a value for RecursionDepth,
  261. all reachable sub directories are scanned.
  262. -d, -EditMode EditingMode
  263. mode to use when opening the document (see subsection 1.1); allowed
  264. values for EditingMode are:
  265. 1 incremental updating
  266. 2 complete rewriting
  267. 3 repairing
  268. If this parameter is omitted, the application behaves as follows:
  269. Giving -Repair selects EditingMode 3, giving any parameter concerning
  270. the encryption selects EditingMode 2, otherwise the default EditingMode
  271. 1 is chosen.
  272. -V, -PdfVersion PdfVersion
  273. new PDF version of the document (see subsection 1.9); valid values are
  274. strings of the form "major.minor" like "1.0", "1.1", ... and "1.6".
  275. Note: The PDF version can only be lowered using this option (downgrade
  276. of version).
  277. -T, -Title "Title"
  278. new title for the document
  279. -S, -Subject "Subject"
  280. new subject for the document
  281. -A, -Author "Author"
  282. new author for the document
  283. -K, -Keywords "Keywords"
  284. new keywords for the document
  285. -R, -Creator "Application"
  286. new name for the application that created the original text document
  287. -P, -Producer "Generator"
  288. new name for the application that produced the PDF document (from the text document)
  289. -C, -Created "Created"
  290. new creation date for the document (format according to PDF
  291. specification, D:YYYYMMDDHHMM); alternatively, the special value auto
  292. can be specified to use the current time; the timestamp of the file will
  293. be synchronized to this value
  294. -M, -Modified "Modified"
  295. new modification date for the document (format according to PDF
  296. specification, D:YYYYMMDDHHMM); alternatively, the special value auto
  297. can be specified to use the current time; the timestamp of the file will
  298. be synchronized to this value
  299. -X, -DeleteXMP DeleteMode
  300. allows to remove the XMP metadata of the document; possible values are:
  301. 0 keep XMP metadata (default)
  302. 1 remove XMP metadata
  303. -PL, -PageLayout PageLayout
  304. new page layout; allowed values for PageLayout are:
  305. 0 default
  306. 1 single page
  307. 2 continous
  308. 3 two pages (1st page left)
  309. 4 two pages (1st page right)
  310. -PM, -PageMode PageMode
  311. new page mode; allowed values for PageMode are:
  312. 0 default
  313. 1 simple
  314. 2 bookmarks
  315. 3 thumbnails
  316. 4 fullscreen
  317. 5 content group
  318. 6 attachments
  319. -Pm, -PageModeNFS PageModeAfterFullScreen
  320. new page mode after leaving the page mode fullscreen; allowed values for
  321. PageModeAfterFullScreen are:
  322. 0 default
  323. 1 simple
  324. 2 bookmarks
  325. 3 thumbnails
  326. 5 content group
  327. -HT, -HideToolbar Mode
  328. new display mode for the toolbar; allowed values for Mode are:
  329. 0 show
  330. 1 hide
  331. -HM, -HideMenubar Mode
  332. new display mode for the menubar; allowed values for Mode are:
  333. 0 show
  334. 1 hide
  335. -HW, -HideWindowUI Mode
  336. new display mode for the window user interface (scroll bars, navigation
  337. controls); allowed values for Mode are:
  338. 0 show
  339. 1 hide
  340. -CW, -CenterWindow Mode
  341. new display mode for the document window; allowed values for Mode are:
  342. 0 no centering
  343. 1 center window on screen
  344. -FW, -FitWindow Mode
  345. new size mode for the document window; allowed values for Mode are:
  346. 0 no resizing
  347. 1 resize window to fit first page of document
  348. -DDT, -DisplayDocTitle Mode
  349. new display mode for the window title; allowed values for Mode are:
  350. 0 show file name
  351. 1 show document title (as given by the metadata)
  352. -FP, -FirstPage FirstPage
  353. new first page to display; the value FirstPage gives the one-based index
  354. of the page that a PDF viewer is supposed to show first when opening a
  355. document
  356. -pl, -PageLabel "PageLabel"
  357. creates a page label for a continous range of pages; the value PageLabel
  358. gives the details for the page numbering and has the following format:
  359. FirstPage Style [Offset [Prefix]] where the individual components are
  360. encoded as follows:
  361. FirstPage
  362. one-based index of the page from which on the page label is to be applied
  363. Style
  364. single character specifying the numbering style; supported values are:
  365. _
  366. no numbering
  367. D
  368. arabic decimal numbers (1, 2, 3, 4, ...)
  369. R
  370. roman numbers using uppercase letters (I, II, III, IV, ...)
  371. r
  372. roman numbers using lowercase letters (i, ii, iii, iv, ...)
  373. A
  374. alphabetic uppercase letters (A, B, C, D, ...)
  375. a
  376. alphabetic lowercase letters (a, b, c, d, ...)
  377. Offset
  378. number from which on to start the page numbering within the page range
  379. (default: 1)
  380. Prefix
  381. text to be prepended to the page numbers
  382. Note that the components of PageLabel are self-delimitting and hence are
  383. to be concatenated without any delimitter (the spaces in the above
  384. notation are just for optical separation and are not part of the
  385. format).
  386. A complete page label specification for the whole document will
  387. typically consist of multiple such page ranges so that for each range
  388. one parameter -pl "PageLabel" is to be given. The order of the several
  389. parameters does not matter. The only requirement is that there be a
  390. parameter specifying a page label starting at page index 1 so that each
  391. page of the document is properly numbered.
  392. The parameter given on its own without any values will delete all page
  393. labels from the document.
  394. -pwd, -Password "Password"
  395. allows opening password-protected documents; documents with different
  396. owner and user passwords will often require the owner password in order
  397. to be modified
  398. -e, -Encrypt Encryption
  399. new encryption method for document; valid values for Encryption are:
  400. 0 keep current settings
  401. 1 no encryption
  402. 2 password protection with low encryption (Acrobat 3.x or higher)
  403. 3 password protection with high encryption (Acrobat 5.x or higher)
  404. The application behaves as follows when omitting this parameter: If
  405. passwords are given by the parameters -PwdOwner or -PwdUser, the value 3
  406. is assumed for Encryption. Otherwise it defaults to value 0.
  407. -o, -PwdOwner "Besitzer"
  408. new owner password for unrestricted acces to document contents; this
  409. parameter is meaningless if Encryption is not set to value 2 or 3.
  410. -u, -PwdUser "Benutzer"
  411. new user password for possibly restricted acces to document contents;
  412. this parameter is meaningless if Encryption is not set to value 2 or 3.
  413. -p, -Permit "Permissions"
  414. bit mask giving which operations users may perform in addition to just
  415. open the document; these bits are represented by a single character in
  416. Permissions with an occurence of the character being interpreted as 1 (=
  417. grant permission) and its absence as 0 (= deny permission):
  418. p Print
  419. P Print using full resolution (addition to bit p; only valid for
  420. Encryption 3 or higher); not setting this bit in addition to bit p
  421. will restrict printing using a low resoluation
  422. m Change the document
  423. A Assemble the document (only valid for Encryption 3 or higher);
  424. if bit m is not set, this permission still allows restricted
  425. modificatios to the document (e. g. insert/delete/rotate pages)
  426. x Extract/copy contents from the document (e. g. using the clipboard)
  427. X Extract contents in support of accessibility (only valid for
  428. Encryption 3 or higher); if bit x is not set, this permissions
  429. still allows for accessibility
  430. a Add comments and fill-in form fields
  431. F Fill-in form fields (only valid for Encryption 3 or higher);
  432. if bitit a is not set, this permission still allows filling-in
  433. form fields
  434. Note that this mask is case-sensitive. Omitting this parameter entirely
  435. results in setting all permissions. When giving this parameter (which
  436. includes just giving its name) only those permissions explicitly given
  437. are set.
  438. Changing permissions is only possible in conjunction with the parameters
  439. -PwdOwner and -PwdUser.
  440. -tf, -Template "TemplateFile"
  441. path to a template from which the settings for the document update will
  442. be read; competing values from the command-line have precedence over
  443. values from the template; which values from the template are to be
  444. processed can be controlled via the -TemplateMask parameter
  445. Giving just ">" for TemplateFile (whereas the quotation marks are
  446. obligatory) enables the application's export mode. This way, the current
  447. settings of the document are exported to the template file. There will
  448. be no updating of the document. The path of the template file to write
  449. is always derived from the path of the document by simply appending the
  450. extension .ini. Attention: An existing will be overwritten without any
  451. query.
  452. -tm, -TemplateMask "TemplateMask"
  453. bit mask controlling which sections (if existent) of the template file
  454. are to be processed; these bits are represented by a single character in
  455. TemplateMask with an occurrence of the character being interpreted as 1
  456. (= process section) and its absence as 0 (= ignore section):
  457. i metadata
  458. v viewer preferences
  459. l page labels
  460. t page transitions for slide show
  461. o bookmarks
  462. Note that this mask is case-sensitive. Omitting this parameters results
  463. in processing all available sections of the template file.
  464. -st, -SummaryTemplate "SummaryTemplate"
  465. string with variables used to print information about a PDF document;
  466. the exact form of this string is discussed in the subsection about
  467. summary templates
  468. Giving this parameters puts the application into summary mode. In this
  469. mode, a user-defined summary about each processed document is generated.
  470. None of the processed documents will be updated.
  471. -sf, -SummaryFile "SummaryTemplateFile"
  472. path to a text file (TXT, HTML, XML, usw.) from which the summary
  473. template is loaded; the exact form of the file's contents is discussed
  474. in the subsection about summary templates
  475. Giving this parameters puts the application into summary mode. In this
  476. mode, a user-defined summary about each processed document is generated.
  477. None of the processed documents will be updated.
  478. -so, -SummaryOutput "SummaryOutput"
  479. path to a output file for the summary mode which is relative to the
  480. current working directory; three cases are distinguished regarding the
  481. value of SummaryOutput:
  482. a) device name CON:
  483. b) static path name
  484. c) dynamic path name
  485. Giving the case-insensitive device name CON: (including the trailing
  486. colon) causes the summary to be printed on the console. In this special
  487. case, the application will not output the path names of the processed
  488. documents as is usually the case. The concept of dynamic/static path
  489. names is covered in a separate subsection below.
  490. If using static path names, the output behaviour also depends on whether
  491. the parameter PDF file specifies a search pattern using wildcards or
  492. just a single file. In the first case, all summaries are appended to the
  493. output file which is not even cleared before processing the first
  494. document. In the last case, the output file is completely overwritten
  495. with the summary of the one and only document processed.
  496. In general, using a dynamic path name allows to store the summary of
  497. each document in its own file. However, if the path name does not
  498. contain the variable $FileTitle$ but only $Dir$ followed by a static
  499. file name, the summaries of all documents within the same directory will
  500. again be appended.
  501. By default, all summaries get printed on the console.
  502. -r, -Repair
  503. opens the document in repair mode, explicitly specifying -EditMode 3 is
  504. then not neccessary; after updating, the document is completely
  505. rewritten so that it should open normally the next time
  506. Note that although this flag implies setting the -EditMode to 3, the
  507. effect is not the same. The flag -Repair enables the application's batch
  508. mode while the parameter -EditMode 3 merely specifies how to open a
  509. document and does not prevent the application to use interactive mode.
  510. -f
  511. prevents automatically updating the file identifier when modifying a document
  512. -q, -Quiet
  513. prevents the display of dialog-based error/status messages when in batch
  514. mode; for password-protected documents this flag also prevents
  515. interactive password input from the user so that documents cannot be
  516. opened unless their password is given by the -pwd parameter. output to
  517. the console is not affected by this option
  518. -v, -Version
  519. outputs the version of the application on the console using the format
  520. major.minor.build.revision; this flag suppresses all other parameters,
  521. i. e. there will never be a document processing
  522. -?, -Help
  523. displays this help; this flag suppresses all other parameters, i. e.
  524. there will never be a document processing
  525. All parameter values are subject to the usual encoding rules for
  526. command-lines: If it contains spaces the value is to be enclosed in
  527. double quotation marks ("). If the value itself already contains
  528. quotation marks each of them is to be escaped by a preceding backslash
  529. (\).
  530. Long or short options can be arbitrarily mixed on the command-line.
  531. There is no need for a consistent usage.
  532. Attention: In contrast to the long options, the short options are case-
  533. sensitive.
  534. If PDF file is given without any request to update its contents, the
  535. application starts in interactive dialog mode as usual and opens the
  536. specified file.
  537. Giving one of the parameters -Title, -Subject, -Author, -Keywords, -
  538. Creator, -Produder, -Created or -Modified without a value will cause the
  539. corresponding metadata to be deleted. Giving -HideToolbar, -HideMenubar,
  540. -HideWindowUI, -CenterWindow, -FitWindow or -DisplayDocTitle without
  541. value is equal to giving the Mode 1.
  542. Note that encrypting a document requires a complete rewrite of the file.
  543. Therefore, when giving one of the encryption related paramters the
  544. application does not perform an incremental update but rewrites the
  545. entire file; explicitly giving -EditMode 2 is then not neccessary. All
  546. previously made incremental updates will be irreversibly merged into a
  547. single new edition of the document.
  548. Tip: Giving the command -Encrypt 0 forces the regeneration of the
  549. document in batch mode without changing the current encryption.
  550. Attention: Care must be taken to use the proper code-page when writing
  551. batch files. Batch files are run from DOS boxes which use the OEM code-
  552. page while Windows applications use the ANSI code-page. As long as the
  553. parameter values passed onto the application's command-line are
  554. restricted to the ASCII character set, the difference does not matter.
  555. However, if the batch file uses extended characters (e. g. characters
  556. with accents) the use of the OEM code-page is required. The DOS editior
  557. edit is recommened for writing batch files because it will use the OEM
  558. code-page and is available on all Windows versions (just type edit on
  559. the command prompt).
  560. 2.2 Exitcode / Output
  561. Independant from the option -Quiet, the application returns a positive
  562. exit code in case of an error. Batch files can evaluate this exit code
  563. using the DOS statement IF ERRORLEVEL 1 Command. When updating multiple
  564. documents using wildcards, only the first encountered error is returned
  565. (unless cancelled by the user or when using -Quiet, the application will
  566. continue to process the remaining documents). Success is indicated by
  567. exit code 0.
  568. The application outputs the file name of each processed input document
  569. (line by line) when in batch mode. All file names are relative to the
  570. base directory of the search pattern which is not neccessarily the
  571. current working directory. This is specially useful for checking whether
  572. all intended documents have been processed when using wildcards.
  573. Note: For technical reasons, GUI applications cannot directly write to
  574. the console of the hosting DOS box. To enable the hybrid functionality
  575. of the application as both a GUI and a console tool, the actual program
  576. file (EXE file) is accompanied by a console wrapper (COM file). Now when
  577. calling the application from DOS boxes by just giving its name (i. e.
  578. without the file extension ".exe"), DOS will by default call the COM
  579. file which in turn calls the EXE file and finally redirects the output
  580. from the EXE to the console window.
  581. Tip: By default, the setup will place the EXE and COM file together in
  582. the application directory. However, this constellation is not required
  583. for the COM file to find the EXE file. The COM file might also be placed
  584. within a directory listed by the environment variable PATH (e. g. the
  585. Windows directory). This way the application can be run from DOS boxes
  586. just by typing BeCyPDFMetaEdit and without giving a full path. For all
  587. this to work properly an additional entry to the Windows registry is
  588. required which is automatically created by the setup.
  589. 2.3 Dynamic Path Names
  590. Some parameters accept so called dynamic path names in order to offer
  591. flexible reactions when processing multiple documents using wildcards.
  592. These are path names that contain one of the following variables whose
  593. recognition is case-sensitive:
  594. - $FileTitle$
  595. - $Dir$
  596. In contrast, path names without any such variables are called static
  597. path names.
  598. The variables are evaluated using a concrete path and are accordingly
  599. replaced. The variable $FileTitle$ gets replaced with the title of a
  600. file, that is its path name without the directory part and without the
  601. file extension. The variable $Dir$ is replaced with the relative
  602. directory path that may but need not be followed by a directory
  603. separator. The combination $Dir$\$FileTitle$ results in the relative
  604. path name to the currently processed document, only the file extension
  605. is omitted.
  606. As an example, consider the current working directory of the application
  607. is "C:\Temp" and the document "C:\Temp\Demo\Intro.pdf" is being
  608. processed. Then $FileTitle$ resolves to the value "Intro" and $Dir$ is
  609. replaced with "Demo\".
  610. 2.4 Summary Templates
  611. To produce the output during summary mode, the application employs
  612. simple text templates with embedded variables. Later on when creating a
  613. summary, the variables are replaced with concrete data about a document.
  614. All variables are enclosed between dollar signs ($) and have the
  615. following form:
  616. $Keyword [Width] [Style]$
  617. The delimiting dollar signs can freely be used outside variables. If
  618. none of the supported keywords is recognized immediately after a dollar
  619. sign, it is automatically interpreted as an ordinary text character.
  620. The mandatory Keyword determines which information about a PDF document
  621. is to be inserted at the position of the variable. Currently, the
  622. following case-sensitive keywords are supported:
  623. PathName
  624. full path to document
  625. Directory, FileTitle, FileExt
  626. directory, file title and file extension of document
  627. FileSize
  628. file size of document
  629. Edition
  630. edition of document
  631. Version
  632. PDF version of document
  633. MajorID
  634. major id of document
  635. MinorID
  636. minor id of document
  637. Pages
  638. page count of document
  639. Author
  640. author of document
  641. Title
  642. title of document
  643. Subject
  644. subject of document
  645. Keywords
  646. keywords of document
  647. Created
  648. creation date of document
  649. Modified
  650. modifcation date of document
  651. Creator
  652. creating application of document
  653. Producer
  654. producing application of document
  655. Using the optional parameter Width, the minimum length of the output and
  656. its alignment can be controlled. The absolute value of this numeric
  657. input specifies the minimum number of text character to output. If the
  658. original output is too short, it is padded with space characters. The
  659. sign of the value determines the alignment. For positive values the
  660. output is left aligned, for negative values the output is right aligned.
  661. The default value is 0.
  662. The optional parameter Style selects one of the possible output formats
  663. for a specific information and consists of a single lower-case
  664. character. For many keywords, this parameter has no effect and is
  665. treated the same as the default value a. The style is only relevant for
  666. the following keywords:
  667. FileSize
  668. a automatic output of # Byte, # KB or # MB where # is the up-rounded integral value
  669. b integral number of bytes without output of unit
  670. c up-rounded integral number of kilobytes without output of unit
  671. d up-rounded integral number of megabytes without output of unit
  672. Created, Modified
  673. a short and localized output of date and time
  674. b short and localized output of date
  675. c short and localized output of time
  676. d long and localized output of date and time
  677. e long and localized output of date
  678. f long and localized output of time
  679. g international output of date/time using the format yyyy-MM-ddThh:mm:ss
  680. h international output of date using the format yyyy-MM-dd
  681. i international output of time using the format hh:mm:ss
  682. When giving the summary template directly on the command-line, two
  683. consecutive slashes (//) can be used in order to insert a line break in
  684. the text.
  685. For summary templates loaded from text files, the character encodings
  686. ANSI, UTF-8 and UTF-16 can be used.
  687. 2.5 Examples
  688. Note: The line breaks in the following examples have only been inserted
  689. to improve readability and are not part of the actual command-line.
  690. The following example changes the title of the document Test.pdf to
  691. Demonstration, removes the field about the creator and sets the creation
  692. date to 06/14/2005 01:25:00 pm. Furthermore, the toolbar of the PDf
  693. viewer is hidden and the initial page mode is set to fullscreen. The
  694. following page labels are created: the first 11 pages of the document
  695. are numbered with roman lowercase letters, pages 12 to 383 are numbered
  696. with arabic decimal number and the last pages from 384 on are numbered
  697. with decimal numbers of the form A-1, A-2, etc. The modification date
  698. and the file identifier are automatically updated. Error-boxes are
  699. suppressed:
  700. > BeCyPDFMetaEdit "E:\My Documents\Test.pdf" -T "Demonstration" -R
  701. -C "D:20050614132500" -HT -PM 4 -pl 1r -pl 12D -pl 384D1A- -quiet
  702. The next example sets the title of all PDF documents within the
  703. directory E:\Documents to "Demo". Note the backslashes that escape the
  704. quotation marks in the title value. Error-boxes or password queries are
  705. not suppressed, the XMP metadata is removed:
  706. > BeCyPDFMetaEdit "E:\Documents\*.pdf" -T "\"Demo\"" -X 1
  707. The example below sets the metadata and the viewer preferences for the
  708. document Test.pdf according to the template Test.ini. However, the title
  709. is always set to Demonstration regardless of the template's contents:
  710. > BeCyPDFMetaEdit "Test.pdf" -tf "Test.ini" -tm "iv" -T "Demonstration"
  711. This example exports the metadata and bookmarks from the document
  712. Test.pdf into the template file Test.pdf.ini. The PDF document itself is
  713. not altered. The parameter -M auto enforces the export of the special
  714. value Auto instead of the actual modification date:
  715. > BeCyPDFMetaEdit "Test.pdf" -tf ">" -tm "io" -M auto
  716. The following dumps a summary of all PDF documents in the current
  717. working directory and all its sub directories to the console using one
  718. line per document where each line gives the file title (left-aligned
  719. within field of 50 characters), the file size (right-aligned within
  720. field of 10 characters) and the date of the last modification of a
  721. document:
  722. > BeCyPDFMetaEdit "*.pdf" -s -st "$FileTitle 50$ $FileSize -10$ $Modified
  723. b$//"
  724. The last example tries to repair the document Bad.pdf and to restore a
  725. proper file structure::
  726. > BeCyPDFMetaEdit "Bad.pdf" -r

Help text dump of BeCyPDFMetaEdit v2.37

Comments powered by Disqus