Hello,
We have a problem with the save function in PDF.
As you can see, the borders are covered by the image and it seems that the image has been transformed, bigger than the one in the Excel file.
Please check the content of the attached documents.
Our implementation:
Public Sub ProcessFile(p_s_filePath As String) Implements IFileProcessor.ProcessFile
Dim l_s_outFolder As String = TestAsposeUtils.GetSettings(“output.folder”)
Dim l_s_outFile As String
Dim l_o_pdfSaveOptions As Aspose.Cells.PdfSaveOptions
l_s_outFile = System.IO.Path.GetFileName(p_s_filePath.Replace(C_S_FILE_EXTENSION, C_S_PDF_EXTENSION))
l_s_outFile = System.IO.Path.Combine(l_s_outFolder, l_s_outFile)
l_o_pdfSaveOptions = New Aspose.Cells.PdfSaveOptions()
'l_o_pdfSaveOptions.OptimizationType = Aspose.Cells.Rendering.PdfOptimizationType.MinimumSize
l_o_pdfSaveOptions.PdfExportImagesFolder = “img”
Using l_o_workbook As Aspose.Cells.Workbook = New Aspose.Cells.Workbook(p_s_filePath)
l_o_workbook.Save(l_s_outFile, l_o_pdfSaveOptions)
End Using
Using l_o_document As Document = New Document(l_s_outFile)
For Each l_o_page As Page In l_o_document.Pages
For Each l_o_artifcat As Artifact In l_o_page.Artifacts
If l_o_artifcat.Subtype = Artifact.ArtifactSubtype.Watermark Then
l_o_artifcat.Rotation = 45
End If
Next
l_o_document.Save(l_s_outFile.Replace(".pdf", “_01.pdf”))
Next
End Using
End Sub
Thanks for your help