Preparing a PDF for sharing: order, pages, numbering, stamps and what it still carries

Assemble, mark, reduce and check a PDF before sending it: a three-page report and two-page appendix merged, numbered and stamped, with sizes measured.

A PDF that goes to a client or a board is usually assembled from parts: a report, an appendix, a signature page, a scan that came in sideways. The work falls into three passes. Assemble the pages in the right order; mark them with numbers, headers, a watermark or a signature; then reduce and check, which is where the file's metadata and form fields deserve a look before it leaves. This guide names the tool for each step and ends with a three-page report and a two-page appendix merged, renumbered and stamped, with the page counts and page sizes measured at every stage.

Pass one: assemble

Merge PDF appends the pages of several files in the order they appear in its list. Each file you choose is added to the list with its size and a remove button, so a wrong order is fixed by removing and re-adding. The output is always named merged.pdf. Page sizes are copied as they are: merging a US Letter report with an A4 appendix gives a file whose pages are two different sizes, which is exactly what happened in the walkthrough.

Reorder PDF Pages builds a new file from a page list such as 3,1,2. Ranges work (4-5,1-3 puts the last two pages first), a page listed twice is copied twice, and a page left out is dropped, so the list is also a way to extract. Delete PDF Pages is the simpler form for removals: 3,5 or 2-4, with at least one page required to remain. On the five-page merged file, deleting 3,5 produced a three-page merged-pages-removed.pdf.

Rotate PDF turns every page by 90, 180 or 270 degrees. It does so by adding to each page's rotation attribute rather than redrawing the page, so after a 90-degree turn the metadata viewer still reports the page as 612.0 × 792.0 pt, now with rotation 90°. Viewers honour the attribute; some print workflows ignore it. Rotation applies to the whole file, so a single sideways scan should be rotated as its own file before merging.

Pass two: mark

Marking draws text or an image on top of the existing content. Nothing underneath is removed, and the added text is real text in Helvetica, which a reader can select and a search can find.

Add PDF Page Numbers draws a number on every page at bottom centre, bottom right or top right, in the size you set, starting from the number you set. Starting at 41 is how an appendix bound after a 40-page report gets its numbers. The number sits 22 points from the bottom edge, so a document whose own footer lives there should use the top-right position instead.

PDF Header & Footer draws one line at the top or bottom, aligned left, centre or right, with two placeholders: {page} and {pages}. The default template, Page {page} of {pages}, makes this the tool to use when numbering must show the total. A template such as Q3 sales report - review copy - {page} of {pages} gives a title and a count in one pass. The built-in font covers basic Latin only, so keep the template to plain characters.

PDF Watermark draws one word or phrase across the middle of every page, rotated 35 degrees, at the size and opacity you choose; the defaults are CONFIDENTIAL, 44 points and 25% opacity. It is added text, not a rasterised layer, so a PDF editor can remove it: treat it as a label, not protection. For a logo instead of words, Add Image Stamp to PDF places a PNG or JPEG in a corner or the centre of every page at a width you set, capped at 45% of the page width. For a signature, Add Signature to PDF places an image on one page only, at a position given as percentages from the left and bottom edges, which is how a scanned signature lands on the last page without touching the rest.

Pass three: reduce and check

Two tools in this group change the nature of the file. PDF to Grayscale renders every page to an image at 1×, 1.35× or 1.75× its size, converts the pixels to grey, and builds a new PDF with one image per page at the original dimensions. Page count and sizes survive; the walkthrough file came back as five pages at the same two sizes. But the text is now pixels: it cannot be selected, searched or read aloud. The same applies to Compress PDF, which re-renders pages as JPEG at a quality and scale you set. Use either when the recipient needs a print-friendly or smaller file and will not search it, and keep the original for everything else.

Convert PDF Page Size fixes the mixed sizes left by a merge. It places each page on a new A4, A3, Letter, Legal or custom sheet, scaled to fit inside the margin you set or stretched to fill it. The merged file with three Letter pages and two A4 pages came back from a Letter conversion as five pages of 612 × 792 pt, named merged-Letter.pdf. With the default 18-point margin every page is scaled a little: the Letter pages to about 94%, the A4 pages to about 90%.

Flatten PDF Forms turns form fields into fixed page content. A filled form sent unflattened still contains editable fields: the recipient can change the values, and the field names and defaults travel with the file. Flattening draws the current values onto the page and removes the fields. Comments, highlights and links are a similar case; Remove PDF Annotations deletes them and reports the count, which on a clean file is Annotations removed: 0.

What the file still carries

PDF Metadata Viewer is the check to run before anything is sent. It lists file size, page count, title, author, subject, creator, producer and both dates, then a per-page table of width, height and rotation. On the two source files in the walkthrough every property read No metadata value. On the merged file it showed creator and producer as pdf-lib (https://github.com/Hopding/pdf-lib), the library these tools use, with creation and modification dates set to the moment of merging. That is the pattern: every tool here that writes a PDF stamps that producer string and updates the modification date, and a file that began in Word or on a scanner carries its original author field through every step until something removes it.

Clean PDF Metadata empties title, author, subject, keywords, creator and producer in one step and writes -clean.pdf. It does not remove the dates: the walkthrough file, once cleaned, still showed its creation date from the merge and a modification date from the cleaning. It does not touch anything inside the pages either, so a name in a header you added, on a signature image or in a comment is unaffected. To make the fields say something specific rather than nothing, Edit PDF Metadata sets title, author, subject and keywords; on the merged file it recorded Q3 sales report and Ann Lee where the viewer had shown nothing.

Walkthrough: report plus appendix

Two files: report-3p.pdf, three pages at 612.0 × 792.0 pt (US Letter), and appendix-2p.pdf, two pages at 595.0 × 842.0 pt (A4). The metadata viewer shows no title, author, creator or dates on either. The goal is one file, numbered through, with a header on every page, marked as a review copy, and with nothing in its properties that names anyone.

  1. Merge. Choose the report, then the appendix; the list shows both. Process. merged.pdf: five pages. The viewer's page table reads 612.0 × 792.0 pt for pages 1 to 3 and 595.0 × 842.0 pt for pages 4 and 5, all at 0°.
  2. Number. Load merged.pdf into Add PDF Page Numbers: bottom centre, start at 1, size 12. Output merged-numbered.pdf, five pages, sizes unchanged; the appendix pages are now 4 and 5.
  3. Header. Load that into PDF Header & Footer with Q3 sales report - review copy - {page} of {pages}, position top, alignment right, size 11. Output merged-numbered-header-footer.pdf; the line on page 4 ends in 4 of 5.
  4. Watermark. Load that into PDF Watermark with DRAFT, size 44, opacity 0.25. Output merged-numbered-header-footer-watermarked.pdf: five pages, still three at 612 × 792 pt and two at 595 × 842 pt.
  5. Check. The viewer on the watermarked file shows no title or author, creator and producer pdf-lib, a creation date equal to the merge time and a modification date equal to the watermark time. Clean PDF Metadata turns the two library strings into No metadata value; the dates stay. If the mixed sizes matter for printing, Convert PDF Page Size to Letter makes all five pages 612 × 792 pt.

Each step reads the previous step's download and adds a suffix to the name, so the chain documents itself and the file to send is the last one. Order matters in one place: numbering and headers must come after any reorder or delete, because they are drawn onto pages by position and do not move with them.

Before you send

  • Open the final file and page through it; a 25% watermark over a dark chart can be unreadable, and a header can collide with an existing one.
  • Run the metadata viewer on the final file, not an intermediate one; every step rewrites the properties.
  • If the file was ever a form, flatten it; if it had comments, remove the annotations; if it was rendered to grayscale, remember that the recipient cannot search it.
  • Keep the sources and the intermediate files until the recipient has confirmed; re-running from the merge is a few steps, reconstructing a lost source is not.

送出 PDF 前的組合、標記、縮減與檢查:三頁報告與兩頁附錄合併、編頁碼、加浮水印,每步量測頁數與尺寸。

要送給客戶或董事會的 PDF 通常是拼起來的:一份報告、一份附錄、一頁簽名頁、一張掃成橫向的掃描件。工作分成三個階段。先把頁面照正確順序組合;再加上頁碼、頁眉、浮水印或簽名;最後縮減與檢查,這一步要在檔案送出前看一眼它的中繼資料與表單欄位。本文為每一步指出對應的工具,最後把一份三頁的報告與一份兩頁的附錄合併、重新編頁碼並加上浮水印,每個階段都量測頁數與頁面尺寸。

第一階段:組合

合併 PDF會依清單順序把多個檔案的頁面接起來。每個選入的檔案都會連同大小與移除按鈕列在清單裡,順序錯了就移除再加回來。輸出一律命名為 merged.pdf。頁面尺寸會原樣複製:把一份 US Letter 的報告與一份 A4 的附錄合併,得到的檔案會有兩種頁面尺寸,下面的實作正是如此。

重新排列 PDF 頁面依頁面清單(例如 3,1,2)建立新檔。可以用範圍(4-5,1-3 會把最後兩頁放到最前面),列兩次的頁面會複製兩次,沒列到的頁面會被捨棄,所以這份清單也能用來抽取頁面。刪除 PDF 頁面是移除頁面的簡化版:3,5 或 2-4,至少要留一頁。在五頁的合併檔上刪除 3,5,得到三頁的 merged-pages-removed.pdf。

旋轉 PDF會把每一頁轉 90、180 或 270 度。它的做法是累加每頁的旋轉屬性而不是重畫頁面,所以轉 90 度之後,文件資訊檢視器仍報告該頁為 612.0 × 792.0 pt,只是旋轉變成 90°。檢視程式會遵守這個屬性,有些列印流程則會忽略。旋轉作用於整個檔案,所以單張橫掉的掃描件應該先以獨立檔案旋轉,再合併。

第二階段:標記

標記是在既有內容上方畫上文字或圖片。底下的內容不會被移除,加上去的文字是以 Helvetica 繪製的真正文字,讀者可以選取,搜尋也找得到。

PDF 加頁碼會在每一頁的下方置中、右下或右上畫上號碼,字級與起始號碼由你設定。從 41 起算,就是接在 40 頁報告後面裝訂的附錄取得頁碼的方法。號碼距底邊 22 pt,若文件本身的頁尾就在那個位置,改用右上。

PDF 頁眉與頁尾在頂端或底端畫一行文字,可靠左、置中或靠右,提供兩個佔位符:{page} 與 {pages}。預設範本 Page {page} of {pages} 讓它成為需要顯示總頁數時的工具。像 Q3 sales report - review copy - {page} of {pages} 這樣的範本能一次給出標題與頁數。內建字型只涵蓋基本拉丁字母,範本請保持純文字。

PDF 浮水印會在每頁正中央以 35 度斜角畫上一個詞或一句話,字級與不透明度由你決定;預設是 CONFIDENTIAL、44 pt、25% 不透明度。它是加上去的文字而非點陣圖層,PDF 編輯器可以移除它:把它當標籤,別當保護。想放標誌而非文字,「PDF 加入圖片印章」會把 PNG 或 JPEG 放在每頁的角落或中央,寬度由你設定,上限為頁寬的 45%。要放簽名,「PDF 加入簽名」只在一頁放上圖片,位置以距左邊與底邊的百分比指定,掃描的簽名就能落在最後一頁而不影響其他頁。

第三階段:縮減與檢查

這一組有兩個工具會改變檔案的本質。PDF 轉灰階會把每一頁以 1×、1.35× 或 1.75× 的尺寸算成圖片,把像素轉成灰色,再以每頁一張圖、原始尺寸建立新的 PDF。頁數與尺寸都保留;實作中的檔案回來仍是五頁、同樣的兩種尺寸。但文字已經變成像素:無法選取、搜尋或朗讀。「PDF 壓縮」也一樣,它用你設定的品質與倍率把頁面重新算成 JPEG。收件人需要方便列印或較小的檔案、又不需要搜尋時再用,其他用途一律保留原檔。

PDF 頁面尺寸轉換能處理合併後留下的尺寸不一。它把每一頁放到新的 A4、A3、Letter、Legal 或自訂紙張上,可縮放到你設定的邊界內,或拉伸填滿。三頁 Letter 加兩頁 A4 的合併檔經 Letter 轉換後,回來是五頁 612 × 792 pt,檔名 merged-Letter.pdf。在預設 18 pt 的邊界下每一頁都會稍微縮小:Letter 頁約縮到 94%,A4 頁約縮到 90%。

扁平化 PDF 表單會把表單欄位變成固定的頁面內容。填好卻沒扁平化就送出的表單仍含有可編輯的欄位:收件人可以改值,欄位名稱與預設值也會跟著檔案走。扁平化會把目前的值畫到頁面上並移除欄位。註解、螢光標記與連結是類似的情況;「移除 PDF 註解」會刪除它們並回報數量,乾淨的檔案會顯示 Annotations removed: 0。

檔案仍帶著什麼

PDF 文件資訊檢視器是送出任何檔案前都該跑的檢查。它列出檔案大小、頁數、標題、作者、主旨、建立程式、產生程式與兩個日期,接著是每頁的寬度、高度與旋轉表格。對實作中的兩個來源檔,每個屬性都顯示 No metadata value。對合併後的檔案,它顯示建立程式與產生程式為 pdf-lib (https://github.com/Hopding/pdf-lib),也就是這些工具使用的函式庫,建立與修改日期則是合併當下的時間。這就是通則:這裡每個會寫出 PDF 的工具都會蓋上那個產生程式字串並更新修改日期,而一份源自 Word 或掃描器的檔案,原本的作者欄位會一路跟著,直到有東西把它移除。

清除 PDF 中繼資料一步清空標題、作者、主旨、關鍵字、建立程式與產生程式,寫出 -clean.pdf。它不會移除日期:實作中的檔案清理後仍顯示合併時的建立日期與清理時的修改日期。它也不碰頁面內的任何東西,所以你加的頁眉裡的名字、簽名圖片上的名字或註解裡的名字都不受影響。想讓欄位寫上特定內容而不是空白,「編輯 PDF 中繼資料」可設定標題、作者、主旨與關鍵字;在合併檔上它記錄了 Q3 sales report 與 Ann Lee,檢視器原本在那兩處什麼都沒有。

實作:報告加附錄

兩個檔案:report-3p.pdf,三頁、612.0 × 792.0 pt(US Letter);appendix-2p.pdf,兩頁、595.0 × 842.0 pt(A4)。文件資訊檢視器顯示兩者都沒有標題、作者、建立程式或日期。目標是一個檔案,頁碼連續,每頁都有頁眉,標示為審閱版,屬性裡沒有任何人名。

  1. 合併。先選報告,再選附錄;清單顯示兩者。執行。merged.pdf:五頁。檢視器的頁面表格顯示第 1 到 3 頁為 612.0 × 792.0 pt,第 4、5 頁為 595.0 × 842.0 pt,全部 0°。
  2. 編頁碼。把 merged.pdf 載入 PDF 加頁碼:下方置中、從 1 開始、字級 12。輸出 merged-numbered.pdf,五頁,尺寸不變;附錄現在是第 4、5 頁。
  3. 頁眉。把它載入 PDF 頁眉與頁尾,文字 Q3 sales report - review copy - {page} of {pages},位置頂端、靠右、字級 11。輸出 merged-numbered-header-footer.pdf;第 4 頁那一行以 4 of 5 結尾。
  4. 浮水印。把它載入 PDF 浮水印,文字 DRAFT、字級 44、不透明度 0.25。輸出 merged-numbered-header-footer-watermarked.pdf:五頁,仍是三頁 612 × 792 pt、兩頁 595 × 842 pt。
  5. 檢查。用檢視器看浮水印檔:沒有標題與作者,建立程式與產生程式是 pdf-lib,建立日期等於合併時間,修改日期等於加浮水印的時間。清除 PDF 中繼資料把那兩個函式庫字串變成 No metadata value;日期留著。若尺寸不一會影響列印,用 PDF 頁面尺寸轉換轉成 Letter,五頁都會是 612 × 792 pt。

每一步都讀取上一步的下載檔,並在檔名加上後綴,所以整條流程自己就是紀錄,要送出的就是最後那個檔案。順序只有一處要緊:編頁碼與頁眉必須在任何重排或刪頁之後,因為它們是依位置畫在頁面上,不會跟著頁面移動。

送出之前

  • 開啟最終檔案逐頁翻過;25% 的浮水印疊在深色圖表上可能看不清,頁眉也可能和原有的撞在一起。
  • 對最終檔案跑文件資訊檢視器,而不是中間產物;每一步都會重寫屬性。
  • 檔案若曾是表單,就扁平化;若曾有註解,就移除註解;若已轉成灰階,記得收件人無法搜尋它。
  • 在收件人確認之前,保留來源檔與中間檔;從合併重跑只是幾個步驟,重建遺失的來源檔就不是了。