Speichern Sie eine TXT-Datei als JPG in NodeJS
API
POST
https://api.aspose.cloud/v3.0/cells/{name}/SaveAs
Das Speichern von Dateiformaten von TXT als JPG ist eine komplexe Aufgabe. Alle Formatübergänge von TXT zu JPG werden von unserem NodeJS SDK durchgeführt, wobei der strukturelle und logische Hauptinhalt der TXT-Quelltabelle erhalten bleibt. Unsere NodeJS-Bibliothek ist eine professionelle Lösung zum Online-Speichern von TXT als JPG-Dateien. Dieses Cloud SDK bietet NodeJS-Entwicklern leistungsstarke Funktionen und perfekte JPG-Ausgabe.
NodeJS-Codebeispiel zum Speichern von TXT als JPG mit REST API
// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-node/
const { CellsApi, CellsSaveAs_PostDocumentSaveAsRequest } = require("asposecellscloud");
const cellsApi = new CellsApi(process.env.ProductClientId, process.env.ProductClientSecret);
var req = new CellsSaveAs_PostDocumentSaveAsRequest({
name: "Book1.txt",
folder: "CellsTests",
newfilename: "Book1Saveas.jpg",
});
cellsApi.cellsSaveAsPostDocumentSaveAs(req)
.then((result) => {
console.log(result)
});
So speichern Sie TXT als JPG mit der Cells Cloud NodeJS-Bibliothek.
- Registrieren Sie ein Konto unterArmaturenbrett um ein kostenloses API-Kontingent und Autorisierungsdetails zu erhalten
- Installieren Sie die NodeJS-Bibliothek und fügen Sie die Referenz (importieren Sie die Bibliothek) zu Ihrem Projekt hinzu.
- Öffnen Sie die Quelldatei in JavaScript.
- Verwenden Sie die Methode `PostWorkbookSaveAs`, um den resultierenden Stream abzurufen.
System Anforderungen
- Node v6.17.1 oder neuer