问题描述
GemBox刚刚发布了其电子表格读写软件的.NET Core版本.我可以按预期成功构建和导出电子表格.但是,另存为PDF时,出现错误:
GemBox just released .NET Core version of their spreadsheet reading and writing software. I can successfully build and export spreadsheets as expected. However, when saving as PDF, I get the error:
'SaveOptions.PdfDefault' is obsolete: 'PDF saving is not supported in .NET Standard.'
在旧版本中,这不是问题.在.NET Standard/Core版本中,该功能仍然存在,但给出了此消息. .NET Core不能做到这一点,还是GemBox尚未发布该功能?
In older versions, this was not an issue. In the .NET Standard/Core version, the function still exists, but gives this message. Is this just not possible with .NET Core, or has GemBox just not released the functionality?
推荐答案
最新版本的GemBox.Spreadsheet具有跨平台支持,可保存为PDF,因此从现在开始,您可以将SaveOptions.PdfDefault
与 GemBox一起使用. .NET Standard 2.0的电子表格,请参见 Linux/macOS示例.
The latest versions of GemBox.Spreadsheet have cross-platform support for saving to PDF, so from now on you can use SaveOptions.PdfDefault
with GemBox.Spreadsheet for .NET Standard 2.0, see Linux / macOS example.
此外,还有一个用于.NET Core 3.0的 GemBox.Spreadsheet 版本,该版本也支持保存为PDF,请参见 ASP.NET Core示例.
Additionally, there is also a version of GemBox.Spreadsheet for .NET Core 3.0 which supports saving to PDF as well, see ASP.NET Core example.
这篇关于将XLSX文件另存为PDF .NET Core(GemBox)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!