Word Documents in ONYRI Sanitize: What the PDF Export Keeps
See exactly what ONYRI Sanitize keeps and drops when a Word file becomes a masked PDF, and when to export from Word yourself first.
You drop a Word file into ONYRI Sanitize and you get back a PDF, not a masked Word file. That is by design. The browser reads your .docx, lays it out page by page, masks the sensitive parts, then flattens everything into one file. This article walks through exactly what survives that trip, what gets left behind, and when you should export to PDF from Word yourself first.
How does ONYRI Sanitize read a Word file?
Nothing is uploaded. Say Jane Example drops a signed client letter, jane-letter.docx, into the app. Reading the file, finding the sensitive parts, drawing the masks, and building the final PDF all happen on her own computer. The server only hears back a count: one document, a few pages, a handful of masks.
- 1The browser converts your .docx file to HTML with a library called mammoth, right there in the tab.
- 2That HTML is laid out as A4 pages, 794 by 1123 pixels, without ever cutting a line of text in half.
- 3Each page is scanned by the same detectors ONYRI Sanitize uses for PDFs and images: names, IBANs, emails, and more.
- 4Every masked page is rendered as an image and assembled into one brand-new PDF file.
That covers what you see on the page. The more interesting question is what happens to everything Word tracks around your text without showing it.
What does the PDF export keep, and what does it drop?
A .docx file carries more than paragraphs. It can hold comments, tracked changes, a running header, and an author name in its file properties. Here is exactly what ONYRI Sanitize's converter, a library called mammoth, keeps and drops, checked directly in its code.
| Element of your Word file | What happens in the export |
|---|---|
| Paragraphs, headings and lists | Kept, with bold, italic and links. Underline is dropped by default |
| Tables | Kept as a table, with its rows and columns. Cell borders and shading are not carried over |
| Images | Kept, placed inline where they sit in the text |
| Footnotes and endnotes | Kept, added where mammoth places them |
| Comments | Dropped. The converter ignores them by default |
| Tracked changes | Dropped. Insertions appear as normal text, deletions disappear, and no markup is left behind |
| Headers and footers | Dropped. Running page headers and footers are never read |
| Author, title and other file properties | Dropped. The new PDF carries none of the original properties |
The result is always a flattened PDF: one image per page, built with a library called pdf-lib. There is no hidden text layer under the black bars or the token labels. That is also why the file always comes back as a PDF, never as an editable Word file.
Why can the layout look different from Word?
A .docx file does not store one fixed page layout the way a PDF does. Word works out line breaks and page breaks itself, using your fonts and printer settings. ONYRI Sanitize renders the same file with its own fonts and margins, so a page break can land in a slightly different spot.
Say Jane Example is filing a formatted contract where every page break matters. She should open it in Word, choose File, then Save As, pick PDF, and add that PDF to ONYRI Sanitize instead of the .docx. ONYRI's PDF pipeline reads existing pages exactly as Word drew them, instead of laying the text out again.
What should you check before you share the file?
The download keeps your original file name and adds -anonymized before the extension. A file named client-report.docx comes back as client-report-anonymized.pdf. If the file name itself is sensitive, for example because it carries a real client's surname, rename it before you send it.
- Scroll through the page-by-page preview before you download anything.
- Open the Detected data list and uncheck any value that should stay visible.
- Look for a warning that a detected value could not be placed on the page.
- Remember the PDF you download cannot be edited back into a Word file.
None of this makes the document automatically compliant. Detection is not exhaustive, and the flattened PDF cannot be turned back into your original. Keep the .docx you started from. It is the only editable copy you will ever have.
Frequently asked questions
- Do I get back an editable Word file?
- No. You download a flattened PDF built from page images. That keeps the masks from being lifted with a simple copy and paste. If you need to keep editing, work from your original .docx and export a fresh anonymized copy each time.
- Will ONYRI Sanitize warn me about open comments or tracked changes?
- No warning is shown. Comments are dropped, and tracked changes are treated as accepted before masking starts. Check the Review tab in Word yourself first if you are not sure the file is clean.
- Why does a one-page Word letter come back as a PDF instead of an image?
- A .docx pipeline always builds a PDF. Only a single image file, like a photo, can come back as a PNG. A Word page does not map to one raster image the way a photo does, so ONYRI assembles a proper PDF page by page.
- Can I add an old .doc file instead of .docx?
- No, ONYRI Sanitize reads .docx only. Open the old .doc file in Word and use Save As to convert it to .docx first.
- What happens to the file name after export?
- The download keeps your original name and adds -anonymized before the extension. Rename the file yourself first if the original name is sensitive on its own.
Sources & references
- Save or convert to PDF or XPS in Office desktop apps — Microsoft Support
- Remove hidden data and personal information by inspecting documents — Microsoft Support
- ECMA-376: Office Open XML File Formats — Ecma International
Mask a document without uploading it
ONYRI Sanitize finds names, identifiers, bank details and secrets in a PDF, a Word file or a scan, and masks them in your browser. You check the preview, then download a flattened copy.