Làm phẳng PDF
Biến các trường biểu mẫu và chú thích thành một phần của trang.
Công cụ này chạy hoàn toàn trong trình duyệt của bạn. Tệp của bạn không bao giờ được tải lên, và bạn có thể tự kiểm chứng điều đó trong tab mạng của trình duyệt. Tự kiểm chứng: mở tab mạng của trình duyệt và theo dõi. Bạn sẽ thấy một yêu cầu nhỏ hỏi xem bạn còn tác vụ nào không - một tên công cụ và một mã băm, không bao giờ là tệp.
Công cụ này làm gì
Flattening turns things that sit on top of a page into part of the page itself. A filled form stops being fillable and becomes a document that reads the same everywhere; a highlight stops being an annotation a reader can drag away and becomes ink. The values and marks are drawn into the page content, and the field and annotation objects are then removed.
Use it before you send a completed form back, so the recipient cannot alter what you entered and no reader can clear the fields by accident. It is also the fix for a form that looks filled on screen and prints blank, and for a marked-up draft you want to circulate with the comments visible but no longer editable.
Cách hoạt động
- Drop the PDF onto this page.
- Leave Flatten form fields on to make the filled values permanent, and Flatten annotations on to burn in highlights, notes, stamps and drawings.
- Turn one of them off to keep the other: flattening only the annotations leaves the form fillable, and flattening only the form leaves the comments editable.
- Check the advanced options if you want unfilled fields to stay visible as empty boxes, or the drawing font embedded so the result renders identically elsewhere.
- Press Flatten. The result reports how many fields and how many annotations were burned in.
There is one failure this tool is built around, and most flatteners fall into it. A form whose /NeedAppearances flag is set carries no drawn appearance for its fields - the reader is expected to render the contents itself from the raw values. Flatten such a file naively and every filled box comes out empty, silently, with the typed data gone. Here the appearances are generated first and then flattened, which is why your entries survive, and any field that could not be drawn is reported rather than quietly dropped.
Links are never flattened, and that is deliberate. A link annotation has no ink of its own - it is an invisible rectangle that responds to a click - so burning it into the page would destroy a working hyperlink and draw nothing in its place. Pop-up windows are skipped for the same reason, and annotations marked hidden are left alone since they were never meant to be seen.
Flattening is one-way. The values are now marks on the page and there is no field left holding them, so no reader can extract, edit or clear them again. Keep the fillable original if you might need to correct an entry, and treat the flattened file as the copy you send rather than the copy you keep.
This is not a digital signature and does not stand in for one. Flattening makes a document harder to edit casually, but the page content is still ordinary PDF an editor can change. If you need evidence that a document has not been altered, sign it; if you need to stop people extracting or editing it, Protect PDF adds the restrictions. Flattening an already-signed document invalidates the signature.
The work happens with pdf-lib in a Web Worker on your device. A completed form usually contains exactly the details you would least like to post to a stranger's server - name, address, account number - and this one never leaves your browser.
Công cụ này không làm được gì
- Flattening cannot be undone from the output. The fields no longer exist, so keep the fillable original if you may need to change an entry.
- A digital signature does not survive flattening. The signed bytes change, so the signature stops validating and the file must be signed again afterwards.
Câu hỏi thường gặp
- Làm phẳng một PDF nghĩa là gì?
- Nó vẽ mọi thứ nằm trên trang - giá trị trường biểu mẫu, tô sáng, ghi chú, con dấu, hình vẽ - vào chính nội dung trang rồi xóa các đối tượng từng giữ chúng. Tài liệu trông vẫn như cũ nhưng hành xử khác đi: không còn gì trên đó mà người đọc có thể sửa, xóa hay di chuyển nữa.
- Tôi có thể hoàn tác việc làm phẳng sau này không?
- Không. Một khi một giá trị đã là một phần của trang thì không còn trường nào để đưa nó trở lại, nên thay đổi trong tệp xuất ra là vĩnh viễn. Bản gốc của bạn không bị đụng tới, vì công cụ này ghi một tệp mới chứ không sửa tệp bạn thả vào - hãy giữ lại nó nếu có bất kỳ khả năng nào bạn cần chỉnh một mục.
- Điều gì xảy ra với các trường tôi để trống?
- Chúng được làm phẳng cùng với phần còn lại, nên một ô có viền nhìn thấy được sẽ giữ viền của nó mà không có gì bên trong. Nếu bạn đang chuẩn bị một biểu mẫu để in ra và điền bằng tay, hãy dùng tùy chọn giữ trường trống trong cài đặt nâng cao để các ô trống vẫn hiện ra như những ô để viết vào.
- Một biểu mẫu đã làm phẳng có giống với biểu mẫu đã ký không?
- Không. Làm phẳng loại bỏ các trường, việc này chặn được chỉnh sửa tùy tiện, nhưng nội dung trang vẫn có thể sửa được trong một trình biên tập PDF và không có gì chứng minh tài liệu chưa bị thay đổi. Hãy dùng chữ ký số cho điều đó, và lưu ý rằng làm phẳng một tệp sau khi nó đã được ký sẽ làm chữ ký mất hiệu lực.
- Biểu mẫu đã hoàn thành của tôi có được tải lên không?
- Không. Một biểu mẫu đã điền thường là PDF nhạy cảm nhất mà một người xử lý, và biểu mẫu này được pdf-lib xử lý bên trong trình duyệt của bạn. Không có gì được truyền đi, và bạn có thể theo dõi tab mạng để xác nhận điều đó.