Incorpora Allegato in PDF
In Excel, è possibile inserire un Oggetto OLE con dati di origine (esempio-di-allegati-inseriti.xlsx) . Fare doppio clic sull’Oggetto OLE, il file incorporato verrà aperto.
In generale, durante la conversione in pdf, l’Oggetto OLE verrà rappresentato come icona o miniatura senza i dati di origine dell’Oggetto OLE. Con l’opzione PdfSaveOptions.EmbedAttachments, è possibile incorporare i dati di origine dell’Oggetto OLE come allegato in PDF. È possibile fare doppio clic sull’icona o sulla miniatura in PDF per aprire il file di origine dell’Oggetto OLE.
// 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); |