PDFに添付を埋め込む
Contents
[
Hide
]
Excelでは、Oleオブジェクト(embedded-attachments-example.xlsx)を挿入できます。Oleオブジェクトをダブルクリックすると、埋め込みファイルが開きます。
通常、PDFに変換するとき、OLEオブジェクトはアイコンまたはサムネイルとしてレンダリングされ、そのソースデータは表示されません。ただし、PdfSaveOptions.EmbedAttachmentsオプションを使用することで、OLEオブジェクトのソースデータを添付としてPDFに埋め込むことができます。アイコンやサムネイルをダブルクリックするとOLEオブジェクトのソースファイルを開くことができます。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// Open the template file | |
Workbook wb = new Workbook("embedded-attachments-example.xlsx"); | |
// Set to embed Ole Object attachment. | |
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); | |
pdfSaveOptions.setEmbedAttachments(true); | |
// Save the pdf file with PdfSaveOptions | |
wb.save("output.pdf", pdfSaveOptions); |