Hello,
Pictures in excel file won’t be rendered if rendering as PDF. But render as PNG is OK.
groupdocs-viewer:24.8
Java 21
the following attachment could be used to reproduce this problem.
spread sheet with picture.zip (448.8 KB)
Testing codes:
package com.groupdocs.viewer.examples;
import com.groupdocs.viewer.Viewer;
import com.groupdocs.viewer.options.PdfViewOptions;
import com.groupdocs.viewer.options.PngViewOptions;
public class SpreedSheetWithPictureTest {
public static void main(String[] args) {
// TODO need to change the path of excel file
String path = "C:\\Work\\Doc\\dms\\spread sheet with picture.xls";
// render as PNG, picture will be presented in the output, it is OK.
{
PngViewOptions viewOptions = new PngViewOptions();
viewOptions.setMaxWidth(1024);
viewOptions.getSpreadsheetOptions().setRenderGridLines(true);
try (Viewer viewer = new Viewer(path)) {
viewer.view(viewOptions);
}
}
// FIXME render as PDF, picture won't be presented in the output
{
PdfViewOptions viewOptions = new PdfViewOptions();
viewOptions.getSpreadsheetOptions().setRenderGridLines(true);
try (Viewer viewer = new Viewer(path)) {
viewer.view(viewOptions);
}
}
}
}
Thanks & Regards
Aray