---
title: "Secure PDF and Office documents in Java"
canonical_url: "https://www.nutrient.io/guides/document-converter/document-converter-services/document-security/java/"
md_url: "https://www.nutrient.io/guides/document-converter/document-converter-services/document-security/java.md"
last_updated: "2026-06-11T09:57:18.961Z"
description: "Protect your PDFs and Office documents easily with our Java API. Add passwords and restrict access without server setup."
---

# Secure PDF and MS Office documents with Java

Ensure document confidentiality by securing PDF and MS Office documents in your application using our REST API. Add passwords to your PDF files or restrict the copying and printing of documents in your workflow. No server setup is required — simply start your free trial or sign up for an account to integrate our REST API into your application.

## Code Samples: Secure Documents Using Java

Explore our code samples to learn how you can quickly secure PDF and Office documents in your application or workflow.

1. [Secure MS Office Documents Using Java](https://github.com/Muhimbi/PDF-Converter-Services-Online/tree/master/clients/v1/java/samples/secure_document)

2. [Secure PDF Documents Using Java](https://github.com/Muhimbi/PDF-Converter-Services-Online/tree/master/clients/v1/java/samples/secure_pdf)

---

## Related pages

- [Sample code in C# for pattern redaction and highlighting](/guides/document-converter/document-converter-services/document-security/code-samples.md)
- [Secure and protect PDFs and Office documents in C#](/guides/document-converter/document-converter-services/document-security/csharp.md)
- [Secure your PDFs and Office files easily with .NET](/guides/document-converter/document-converter-services/document-security/dotnet-core.md)
- [Secure PDF API](/guides/document-converter/document-converter-services/document-security.md)
- [WSDL URL.](/guides/document-converter/document-converter-services/document-security/pattern-highlighting-using-python.md)
- [Secure PDF and Office documents with JavaScript](/guides/document-converter/document-converter-services/document-security/javascript.md)
- [Pattern redaction and highlighting with C#](/guides/document-converter/document-converter-services/document-security/pattern-redaction-and-highlighting.md)
- [Password protection for PDF documents in PHP](/guides/document-converter/document-converter-services/document-security/php.md)
- [WSDL URL.](/guides/document-converter/document-converter-services/document-security/pattern-redaction-using-python.md)
- [Smart document redaction with C#](/guides/document-converter/document-converter-services/document-security/smart-redaction.md)

