Hello,
Using java Viewer to convert excel file (with more than 2 pages) to html pages generates only 2 pages when calling Viewer#view(ViewOptions viewOptions, int… pageNumbers) method.
If we call Viewer#view(ViewOptions viewOptions) all pages (html) are generated.
I attach a demo to reproduce the issue.
My environment is:
java version “1.8.0_451”
Java™ SE Runtime Environment (build 1.8.0_451-b10)
Java HotSpot™ 64-Bit Server VM (build 25.451-b10, mixed mode)
Operating System: Ubuntu 22.04.5 LTS
Kernel: Linux 6.5.0-44-generic
Architecture: x86-64
groupdocs-viewer-src-excel-2sheets.zip (58.5 KB)
Hello @catalin.croitoru ,
Thank you for reaching out to us. We have reviewed your example of using our library and found that the issue you described is related to the property viewOptions.getSpreadsheetOptions().setRenderingPrintAreaAndPageBreaks(true)
. Once you disable it, you will be able to generate the required number of pages. We will continue investigating to identify the reasons for this behavior, and we will inform you as soon as we have further updates.
Hello @evgen.efimov
I confirm removing this setting fix the generation of required pages. Do you have any update on your investigation? Still I consider you have a bug when this property is set to true.
Thanks
Hello @catalin.croitoru ,
You are absolutely right, this is a bug on our side. We have already created a corresponding ticket with ID VIEWERJAVA-3981 and linked it to this thread. As soon as a new version of the library with the fix is released, we will notify you immediately.