12-21 -addPageNumber: Adding Page Number

Processing

Inserts page numbers into the input PDF.

Example of commands

[Executing example commands]

Inserts the page number into test.pdf and output it as out.pdf.

  • Inserts the page number with the following settings:
    • Page to start inserting: 1st page (unspecified)
    • Starting number: The first page is page number "11"
    • Placement: Bottom right of the page
    • Text color: {R,G,B} = {0.0, 0.0, 1.0}

[Windows]

AHPDFToolCmd80.exe -addPageNumber -startNumber 11 -align 9 -colorText 0.0 0.0 1.0 -d C:\test\test.pdf -o C:\sav\out.pdf

[Linux]

AHPDFToolCmd80 -addPageNumber -startNumber 11 -align 9 -colorText 0.0 0.0 1.0 -d /home/antenna/test/test.pdf -o /home/antenna/sav/out.pdf

Folder settings: applied

You can perform batch processing by specifying the input folder to the -d parameter and the output folder to the -o parameter.

If a folder is specified, page numbers will be inserted into the PDF files in the input folder. Note that the output file will be output to the output folder with the same name as the input file name.

Parameters

Parameter

Content

-index <Val>

Sets the page position to start inserting page numbers. Can be omitted.

Page number is 0 origin. Therefore, the first page is counted from "0."

If not specified, "0" is applied.

-startNumber <Val>

Sets the starting page number to insert. Can be omitted.
If not specified, "1" is applied.

-align {1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}

Sets the page number insertion position. Can be omitted.

1: Top left 2: Top center 3: Top right
4: Center left 5: Center 6: Center right
7: Bottom left 8: Bottom center 9: Bottom right
If not specified, places at "8: Bottom center."
If a value other than 1 to 9 is specified, an error will occur.

-font

Sets the font [*1]. Can be omitted.

-name <Val>

Sets the font name. Can be omitted.
If not specified, "Helvetica" is applied.

-size <Val>

Sets the font size. Can be omitted.
Unit: point
If not specified, 12 point is applied.

-bold

If specified, makes the text bold.
If not specified, does not make the text bold.

-italic

If specified, makes the text italic.
If not specified, Makes the text upright.

-notEmbed

If specified, does not embed fonts.
If not specified, embeds fonts.

-colorText <r> <g> <b>

Sets the fill color of the text. Can be omitted.
Setting value range: <r>, <g>, <b> 0.0 to 1.0 for each

If not specified, black (0.0 0.0 0.0) is applied.

-colorOutline <r> <g> <b>

Sets the color of the text outline. Can be omitted.

Setting value range: <r>, <g>, <b>, 0.0 to 1.0 for each.

If not specified, black (0.0 0.0 0.0) is applied.

-opacity <Val>

Sets the transparency of the text. Can be omitted.

Setting value range: 0.0 to 1.0. 0.0 are transparent, 1.0 is opaque.

If not specified, 1.0 (opaque) is applied.

[*1]
For information on obtaining font information and restrictions on the Antenna House PDF API Command-line, see "Chapter.5 Handling Fonts" and "Chapter.8 Limitations 8-5 Font Limitations" in this manual.