HTML den PDF ye Dönüştürme Yöntemi Node.js ve C++

Genel Bakış

Aspose.Cells is a professional solution that allows you to generate PDF files from web pages and raw HTML code in your applications.

This article explains how to HTML’i PDF’e dönüştür. It covers the following topics.

Node.js’de HTML’den PDF’ye Dönüşüm

HTML’yi PDF’ye nasıl dönüştürürüz? Aspose.Cells for Node.js via C++ kütüphanesi ile HTML’yi birkaç kod satırıyla programatik olarak PDF’ye dönüştürebilirsiniz. Aspose.Cells for Node.js via C++, tüm Excel dosyalarını oluşturma, değiştirme, dönüştürme, görüntüleme ve yazdırma yeteneği ile çapraz platform uygulamaları geliştirebilir.

JavaScript HTML’yi PDF’ye Dönüştür

Aşağıdaki JavaScript kod örneği, Aspose.Cells for Node.js via C++ kullanarak bir HTML belgesini PDF’ye nasıl dönüştüreceğinizi gösterir.

  1. HtmlLoadOptions sınıfının bir örneğini oluşturun.
  2. Workbook nesnesini başlatın.
  3. Workbook.save() yöntemini çağırarak çıktı PDF belgesini kaydedin.
const AsposeCells = require("aspose.cells.node");
const path = require("path");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "sample.html");

// Loads the workbook which contains hidden external links
const options = new AsposeCells.HtmlLoadOptions(AsposeCells.LoadFormat.Html);
const book = new AsposeCells.Workbook(filePath, options);
book.save("out.pdf");

HTML’i PDF’e çevirmeyi deneyin

Aspose.Cells for Node.js via C++ presents you online free application “HTML’den PDF’e”, where you may try to investigate the functionality and quality it works.