HTML den PDF ye C++ ile nasıl dönüştürülür
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.
- C++ HTML'den PDF'ye dönüştürme
- C++ HTML'yi PDF'ye dönüştürme
- C++ ile HTML'den PDF'ye dönüştürme nasıl yapılır
HTML’yi PDF’ye dönüştürme C++ ile
HTML’yi PDF’ye nasıl dönüştürürüm? Aspose.Cells for C++ kütüphanesi ile, HTML’yi birkaç satır kodla programlı olarak PDF’ye kolayca dönüştürebilirsiniz. Aspose.Cells for 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ştirme kapasitesine sahiptir.
** C++ HTML’yi PDF’ye dönüştürme**
Aşağıdaki C++ kod örneği, Aspose.Cells for C++ kullanarak bir HTML belgesini PDF’ye nasıl dönüştüreceğinizi gösterir.
- HtmlLoadOptions sınıfının bir örneğini oluşturun.
- Workbook nesnesini başlatın.
- Workbook.Save() yöntemini çağırarak çıktı PDF belgesini kaydedin.
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
// Create HTML load options
HtmlLoadOptions options(LoadFormat::Html);
// Load the HTML file into a workbook
U16String inputFilePath(u"sample.html");
Workbook book(inputFilePath, options);
// Save the workbook as PDF
U16String outputFilePath(u"out.pdf");
book.Save(outputFilePath);
std::cout << "HTML file converted to PDF successfully!" << std::endl;
Aspose::Cells::Cleanup();
}
HTML’i PDF’e çevirmeyi deneyin
Aspose.Cells for C++ presents you with an online free application “HTML’den PDF’e”, where you may try to investigate the functionality and quality it works.