If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

Instalación
El paquete está disponible en npmjs.com y se puede instalar mediante npm ejecutando el siguiente comando:
npm install groupdocs-conversion-cloud

Requisitos
Dependencias
El SDK requiere los siguientes paquetes:
| Package | Constraint |
|---|
| axios | 1.14.0 |
| form-data | * |
| jsonwebtoken | 9.0.1 |
| qs | 6.15.0 |
Inicio rápido
Obtenga sus credenciales de API
Para usar GroupDocs.Conversion Cloud, regístrese en el GroupDocs.Cloud Dashboard y obtenga su Client ID y Client Secret.
Inicialice la API
Utilice el siguiente código para empezar a usar el GroupDocs.Conversion Cloud SDK for Node.js.
"use strict";
const conversion_cloud = require("groupdocs-conversion-cloud");
// Get your ClientId and ClientSecret at https://dashboard.groupdocs.cloud
const clientId = "YourClientId";
const clientSecret = "YourClientSecret";
const config = new conversion_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";
const convertApi = conversion_cloud.ConvertApi.fromConfig(config);
Vea el ejemplo completo en RunExamples.js.
Convierta un documento (directo, sin almacenamiento en la nube)
Una vez inicializado, use este ejemplo básico para convertir un documento local y recibir el resultado directamente.
"use strict";
const conversion_cloud = require("groupdocs-conversion-cloud");
const fs = require("fs");
const convertApi = conversion_cloud.ConvertApi.fromKeys("YourClientId", "YourClientSecret");
(async () => {
let file = fs.readFileSync("./Resources/WordProcessing/four-pages.docx");
let request = new conversion_cloud.ConvertDocumentDirectRequest("pdf", file);
let result = await convertApi.convertDocumentDirect(request);
console.log("Document converted: " + result.length);
})();
Vea el ejemplo completo en ConvertToPdfDirect.js.
Convierta documentos con almacenamiento en la nube
Este ejemplo carga un archivo en el almacenamiento de GroupDocs Cloud, lo convierte y descarga el resultado.
"use strict";
const conversion_cloud = require("groupdocs-conversion-cloud");
const fs = require("fs");
const clientId = "YourClientId";
const clientSecret = "YourClientSecret";
const config = new conversion_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";
const convertApi = conversion_cloud.ConvertApi.fromConfig(config);
const fileApi = conversion_cloud.FileApi.fromConfig(config);
(async () => {
let file = fs.readFileSync("./myFile.docx");
await fileApi.uploadFile(new conversion_cloud.UploadFileRequest("myFile.docx", file));
let settings = new conversion_cloud.ConvertSettings();
settings.filePath = "myFile.docx";
settings.format = "pdf";
settings.outputPath = "converted";
let result = await convertApi.convertDocument(new conversion_cloud.ConvertDocumentRequest(settings));
console.log("Document converted: " + result[0].url);
let response = await fileApi.downloadFile(new conversion_cloud.DownloadFileRequest("converted/myFile.pdf", null));
console.log("Expected response type is Stream: " + response.length);
})();
Consulte la SDK README para obtener más detalles.
Este código convierte un documento de Word protegido con contraseña a PDF con opciones de salida.
"use strict";
const conversion_cloud = require("groupdocs-conversion-cloud");
const convertApi = conversion_cloud.ConvertApi.fromKeys("YourClientId", "YourClientSecret");
(async () => {
let settings = new conversion_cloud.ConvertSettings();
settings.filePath = "WordProcessing/password-protected.docx";
settings.format = "pdf";
settings.outputPath = "converted";
let loadOptions = new conversion_cloud.WordProcessingLoadOptions();
loadOptions.password = "password";
let convertOptions = new conversion_cloud.PdfConvertOptions();
convertOptions.centerWindow = true;
convertOptions.compressImages = false;
convertOptions.displayDocTitle = true;
convertOptions.dpi = 1024;
convertOptions.fromPage = 1;
convertOptions.imageQuality = 100;
convertOptions.password = "password";
convertOptions.unembedFonts = true;
settings.loadOptions = loadOptions;
settings.convertOptions = convertOptions;
let result = await convertApi.convertDocument(new conversion_cloud.ConvertDocumentRequest(settings));
console.log("Document converted: " + result[0].url);
})();
Vea el ejemplo completo en ConvertToPdf.js.
Convierta páginas específicas de un documento
Este ejemplo convierte solo las páginas 1 y 3.
"use strict";
const conversion_cloud = require("groupdocs-conversion-cloud");
const convertApi = conversion_cloud.ConvertApi.fromKeys("YourClientId", "YourClientSecret");
(async () => {
let settings = new conversion_cloud.ConvertSettings();
settings.filePath = "WordProcessing/four-pages.docx";
settings.format = "pdf";
settings.outputPath = "converted/two-pages.pdf";
let convertOptions = new conversion_cloud.PdfConvertOptions();
convertOptions.pages = [1, 3];
settings.convertOptions = convertOptions;
let result = await convertApi.convertDocument(new conversion_cloud.ConvertDocumentRequest(settings));
console.log("Document converted: " + result[0].url);
})();
Vea el ejemplo completo en ConvertSpecificPages.js.
Recupere las conversiones admitidas de origen a destino.
"use strict";
const conversion_cloud = require("groupdocs-conversion-cloud");
const infoApi = conversion_cloud.InfoApi.fromKeys("YourClientId", "YourClientSecret");
(async () => {
let response = await infoApi.getSupportedConversionTypes(new conversion_cloud.GetSupportedConversionTypesRequest());
console.log("Formats count: " + response.length);
})();
Vea el ejemplo completo en GetSupportedConversions.js.
Ejemplos en GitHub
El repositorio GroupDocs.Conversion Cloud Node.js Examples incluye ejemplos listos para ejecutar que cubren:
| Category | Examples |
|---|
| Convert | PDF, HTML, imagen, presentación, hoja de cálculo, procesamiento de texto; conversión directa; conversión asíncrona |
| Common Options | Marcas de agua, páginas específicas, páginas consecutivas, fuentes personalizadas |
| Load Options | CAD, CSV, correo electrónico, HTML, OneNote, PDF, presentación, hoja de cálculo, texto, procesamiento de texto |
| Info | Conversiones compatibles, información del documento, licencia |
Cómo ejecutar los ejemplos
- Clone o descargue el repositorio de ejemplos
- Edite
Examples/RunExamples.js y establezca clientId y clientSecret - Vaya al directorio
Examples - Ejecute
npm install - Ejecute
npm update - Ejecute
npm run-script start
Para obtener más detalles, visite Getting Started.

Document Conversion API | Node.js Cloud API | GroupDocs.Conversion Cloud | REST API | Document Conversion | Auto-detect Formats | Watermarking API | Multi-Format Output | Batch Document Conversion | PDF Conversion | Custom Conversion Options | Page-by-Page Conversion | Font Replacement | OCR Support | Metadata Extraction | Document Merge | Storage API | Document Information API | Document Load Options | Multi-Language Support | Cloud Storage Integration | SDKs for .NET, Java, Node.js | Secure API Access | Docker Support | Scalable Document Conversion | API Rate Limiting