C++ ile PDF ye Ek Dosya Gölgelendirme
Contents
[
Hide
]
Excel’de, kaynağı verilerle Ole Nesnesi ekleyebilirsiniz (embedded-attachments-example.xlsx). Ole Nesnesine çift tıklayınca gömülü dosya açılır.
Genellikle, PDF’ye dönüştürürken Ole Nesnesi simge veya önizleme olarak gösterilir, Ole Nesnesi kaynağı veriler olmadan. PdfSaveOptions.GetEmbedAttachments() seçeneği ile, Ole Nesnesi kaynağı verilerini PDF’ye ek bağlantısı olarak gömebilirsiniz. PDF’deki simge veya önizleme üzerine çift tıklayarak Ole Nesnesinin kaynağını açabilirsiniz.
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-C
// Open the template file
Workbook workbook(u"embedded-attachments-example.xlsx");
// Set to embed Ole Object attachment.
PdfSaveOptions pdfSaveOptions;
pdfSaveOptions.SetEmbedAttachments(true);
// Save the pdf file with PdfSaveOptions
workbook.Save(u"output.pdf", pdfSaveOptions);
std::cout << "PDF saved successfully with embedded attachments!" << std::endl;
Aspose::Cells::Cleanup();
}