Aspose.Cells for Java 印刷時の拡大/縮小指定について

Excelのページレイアウトの[拡大/縮小]にて、88%を指定し、印刷プレビューした際には
1ページに収まっているのみ関わらず、Aspose.CellsにてPDF変換すると1ページに収まりません。
何か対策はありますでしょうか?

@tetsurokawabata,

PDF ファイル形式にレンダリングする前に、 PdfSaveOptions.setOnePagePerSheet() を使用してみてください。これにより、ワークシート全体に対して 1 つのページが確実に作成されます。
例えば
サンプルコード:

            Workbook workbook = new Workbook(filePathStr);
			PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
			pdfSaveOptions.setOnePagePerSheet(true);
		   	workbook.save(pdfFilePathStr, pdfSaveOptions);

それでも問題が見つかった場合は、テンプレートの Excel ファイルを圧縮し、サンプル コードを貼り付けて問題を再現してください。すぐに確認いたします。

必ず1ページにしたいわけではなく
Excelの印刷プレビューと同じようにPDF変換をしたいです。
これはAsposeでは無理ということでしょうか?
(回避策としては、Excelのページレイアウトで縦・横を1ページ指定
にすることで対応は可能なのですが)

@tetsurokawabata

Please share us the source file and sample code.

Please check these files.
TEST.zip (22.3 KB)

My sample code.
SAMPLE.zip (581 Bytes)

@tetsurokawabata,

Thanks for the sample files.

Please notice, I am able to reproduce the issue as you mentioned by using your template file. In the Excel file sheet, page scaling is set to 88%. When the print preview is performed, it fits on one page. But when converted to PDF with Aspose.Cells for Java, it does not fit on one page. I have logged a ticket with an id “CELLSJAVA-44832” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

Thank you so much.

@tetsurokawabata,

You are welcome.

@tetsurokawabata,

This is to inform you that your issue has been resolved. now. The fix will be included in our upcoming release (Aspose.Cells v22.9) scheduled for the second week of September 2022. You will also be notified when the next version is released.

The issues you have found earlier (filed as CELLSJAVA-44832) have been fixed in this update. This message was posted using Bugs notification tool by Peyton.Xu