Esta es la referencia de la API REST para su instancia de IronSecureDoc. Este tutorial asume que ya tienes una instancia de contenedor en funcionamiento, si estás buscando Comenzar, por favor sigue nuestra Guía.
El marcador de posición de http://localhost:8080/ se utilizará para la URL en todos los ejemplos. Asegúrese de sustituirlo por su URL.
Asegúrese de reemplazar los valores de marcador de posición (por ejemplo, path/to/your/file.pdf, certificate_password, etc.) con valores reales.
Los encabezados author, title y subject están incluidos en todos los ejemplos de solicitud.
chequeo [GET]
Punto final:http://localhost:8080/v1/document-services/ping
Punto final de comprobación de estado para verificar que el servidor está funcionando.
Respuesta: 200 OK: pong
[GET] Comprobar licencia
Punto final:http://localhost:8080/v1/document-services/check-license
Verifica la validez de la licencia.
Respuesta: 200 OK: Válido
[POST] Redactar texto
Punto final:http://localhost:8080/v1/document-services/pdfs/redact-text
Oculta palabras sensibles en un documento en formato PDF mediante una verdadera redacción. Incluya un archivo PDF como un objeto pdf_file en el cuerpo de la solicitud.
Parámetros obligatorios del cuerpo de la solicitud
Nombre
Tipo de Datos
Descripción
pdf_file
archivo application/pdf
El archivo PDF para redactar.
words_to_redact
array[string]
Un arreglo de palabras para redactar del documento.
Parámetros opcionales del cuerpo de la solicitud
Name
Data Type
Default
Description
user_password
string
null
User password for the input PDF. Required if the PDF has a user password to grant read access.
owner_password
string
null
Owner password for the input PDF. Required if the PDF has an owner password to grant access to make modifications.
specific_pages
array[int]
null
Optionally specify pages to apply to. If left empty, all pages will apply.
draw_black_box
bool
True
Have a Black Box drawn over redacted text areas.
match_whole_word
bool
True
Allow partial matches within words be redacted too.
match_case
bool
null
Match case for the words to be redacted.
overlay_text
string
null
If your prefer an Overlay Text on the redaction area such as words or symbols, set them here. If not set, a blank character will be used.
Oculta coincidencias sensibles de Expresiones Regulares (como fechas, nombres o patrones) en un documento en formato PDF utilizando verdadero redactado. Incluya un archivo PDF como un objeto pdf_file en el cuerpo de la solicitud.
Parámetros obligatorios del cuerpo de la solicitud
Name
Data Type
Description
pdf_file
application/pdf file
The PDF file to redact.
regular_expression
string
Regular Expression from which matching cases will be redacted from the document.
Parámetros opcionales del cuerpo de la solicitud
Name
Data Type
Default
Description
user_password
string
null
User password for the input PDF. Required if the PDF has a user password to grant read access.
owner_password
string
null
Owner password for the input PDF. Required if the PDF has an owner password to grant access to make modifications.
specific_pages
array[int]
null
Optionally specify pages to apply to. If left empty, all pages will apply.
draw_black_box
bool
True
Have a Black Box drawn over redacted text areas.
overlay_text
string
null
If your prefer an Overlay Text on the redaction area such as words or symbols, set them here. If not set, a blank character will be used.
Punto final:http://localhost:8080/v1/document-services/pdfs/redact-region
Descripción: Oculta texto sensible en una región específica de un documento PDF utilizando redacción verdadera. Incluya un archivo PDF como un objeto pdf_file en el cuerpo de la solicitud.
Parámetros obligatorios del cuerpo de la solicitud
Nombre
Tipo de Dato
Descripción
pdf_file
archivo application/pdf
El archivo PDF a redactar.
region_to_redact_x
float
Coordenada X de la región a redactar, comenzando desde la parte inferior izquierda de la página.
region_to_redact_y
float
Coordenada Y de la región a redactar, comenzando desde la parte inferior izquierda de la página.
region_to_redact_w
float
Anchura de la región a redactar, comenzando desde la coordenada X especificada.
region_to_redact_h
float
Altura de la región a redactar, comenzando desde la coordenada Y especificada.
Parámetros opcionales del cuerpo de la solicitud
Name
Data Type
Default
Description
user_password
string
null
User password for the input PDF. Required if the PDF has a user password to grant read access.
owner_password
string
null
Owner password for the input PDF. Required if the PDF has an owner password to grant access to make modifications.
specific_pages
array[int]
null
Optionally specify pages to apply to. If left empty, all pages will apply.
Punto final:http://localhost:8080/v1/document-services/pdfs/certify
Descripción: Añade una certificación a un documento PDF para afirmar que no ha sido manipulado mediante un archivo de certificado (.p12, .pfx). Incluya un archivo PDF como un objeto pdf_file en el cuerpo de la solicitud y un archivo de certificado como un objeto certificate_file en el cuerpo de la solicitud.
Parámetros obligatorios del cuerpo de la solicitud
Name
Data Type
Description
pdf_file
application/pdf file
The PDF file to certify.
certificate_file
application/x-pkcs12 file
The certificate file (.p12, .pfx) to use for certification.
certificate_password
string
Password for the provided certificate file.
certificate_permissions
int
certificate_permissions value
Permissions
1
No Changes Allowed. Any further document changes will invalidate the signature.
2
Only Additional Signatures and Form Filling Allowed.
3
Only AdditionalSignatures, Form Filling, and Annotations Allowed
Parámetros opcionales del cuerpo de la solicitud
Name
Data Type
Default
Description
user_password
string
null
User password for the input PDF. Required if the PDF has a user password to grant read access.
owner_password
string
null
Owner password for the input PDF. Required if the PDF has an owner password to grant access to make modifications.
Descripción: Agrega una imagen y certificación a esa imagen en un documento PDF para asegurar que no ha sido manipulado mediante un archivo de Certificado (.p12, .pfx). Incluya un archivo PDF como un objeto pdf_file en el cuerpo de la solicitud y un archivo de certificado como un objeto certificate_file en el cuerpo de la solicitud.
Parámetros obligatorios del cuerpo de la solicitud
Name
Data Type
Description
pdf_file
application/pdf file
The PDF file to certify.
signature_image_file
image/jpeg or image/png file
The signature image (.png, .jpg, .jpeg) to use for certification. Can be a logo, autograph, etc.
certificate_file
application/x-pkcs12 file
The certificate file (.p12, .pfx) to use for certification.
certificate_password
string
Password for the provided certificate file.
certificate_permissions
int
certificate_permissions value
Permissions
1
No Changes Allowed. Any further document changes will invalidate the signature.
2
Only Additional Signatures and Form Filling Allowed.
3
Only AdditionalSignatures, Form Filling, and Annotations Allowed
sign_specific_page
int
Specify page to apply the image and certificate to. First page is 0. If left empty, only first page will apply.
signature_image_x
float
The X coordinate of the Rectangle region of the signature image. This starts from the top-left of the page.
signature_image_y
float
The Y coordinate of the Rectangle region of the signature image. This starts from the top-left of the page.
signature_image_w
float
The Width of the Rectangle region of the signature image. This starts from the top-left of the page.
signature_image_h
float
The Height of the Rectangle region of the signature image. This starts from the top-left of the page.
Parámetros opcionales del cuerpo de la solicitud
Name
Data Type
Default
Description
user_password
string
null
User password for the input PDF. Required if the PDF has a user password to grant read access.
owner_password
string
null
Owner password for the input PDF. Required if the PDF has an owner password to grant access to make modifications.
specific_pages
array[int]
null
Optionally specify pages to apply to. If left empty, all pages will apply.
Resultado 400 BadRequest si no hay firmas o al menos una es inválida.
[POST] Cifrar / Añadir contraseña y permisos
Punto final:http://localhost:8080/v1/document-services/pdfs/encrypt
Descripción: Añade una capa de seguridad a un documento PDF encriptándolo con una contraseña de usuario y de propietario. Incluir un archivo PDF como objeto pdf_file en el cuerpo de la solicitud.
Parámetros obligatorios del cuerpo de la solicitud
Nombre
Tipo de dato
Descripción
pdf_file
archivo application/pdf
El archivo PDF a encriptar.
allow_extracting_content
bool
Permitir la extracción de contenido del archivo PDF.
allow_form_filling
bool
Permitir el llenado de formularios en el PDF resultante.
allow_annotations
bool
Permitir la adición o modificación de anotaciones en el PDF resultante.
allow_printing
bool
Permitir la impresión del PDF resultante.
allow_modifications
bool
Permitir modificaciones en el PDF resultante.
new_owner_password
cadena
Nueva contraseña de propietario para el PDF de salida. Otorga acceso completo, incluyendo cambiar permisos y contraseñas.
Parámetros opcionales del cuerpo de la solicitud
Name
Data Type
Default
Description
user_password
string
null
User password for the input PDF. Required if the PDF has a user password to grant read access.
owner_password
string
null
Owner password for the input PDF. Required if the PDF has an owner password to grant access to make modifications.
new_user_password
string
null
New user password for the output PDF. Grants read access and other specified permissions.
Chaknith trabaja en IronXL e IronBarcode. Tiene una gran experiencia en C# y .NET, ayudando a mejorar el software y a apoyar a los clientes. Sus conocimientos de las interacciones con los usuarios contribuyen a mejorar los productos, la documentación y la experiencia general.