<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Documentation – 渲染、打印和预览</title>
    <link>https://docs.aspose.com/cells/zh/java/rendering/</link>
    <description>Recent content in 渲染、打印和预览 on Documentation</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh</language>
    
	  <atom:link href="https://docs.aspose.com/cells/zh/java/rendering/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Java: 打印工作簿</title>
      <link>https://docs.aspose.com/cells/zh/java/printing-workbooks/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/printing-workbooks/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

本文档旨在为开发人员提供如何以简明方式打印电子表格的理解。
&lt;/div&gt;

&lt;h2 id=&#34;使用情景&#34;&gt;使用情景&lt;/h2&gt;
&lt;p&gt;完成创建电子表格后，您可能希望打印工作表的硬拷贝以备份。在打印时，MS Excel假定您要打印整个工作表区域，除非您指定所需的选择。以下截图显示了在Excel中打印工作簿的对话框。&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;printing-workbooks_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;图表：&lt;/strong&gt; 打印对话框&lt;/p&gt;
&lt;h2 id=&#34;使用-asposecells-打印工作簿&#34;&gt;使用 Aspose.Cells 打印工作簿&lt;/h2&gt;
&lt;p&gt;Aspose.Cells for Java提供了&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetrender&#34;&gt;&lt;strong&gt;SheetRender&lt;/strong&gt;&lt;/a&gt;类的&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetrender#toPrinter-java.lang.String-&#34;&gt;&lt;strong&gt;toPrinter&lt;/strong&gt;&lt;/a&gt;方法。通过使用&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetrender#toPrinter-java.lang.String-&#34;&gt;&lt;strong&gt;SheetRender.toPrinter&lt;/strong&gt;&lt;/a&gt;方法，您可以提供打印机名称以及打印作业名称。&lt;/p&gt;
&lt;h2 id=&#34;示例代码&#34;&gt;示例代码&lt;/h2&gt;
&lt;h3 id=&#34;打印所选工作表&#34;&gt;打印所选工作表&lt;/h3&gt;
&lt;p&gt;以下代码片段演示了使用&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetrender#toPrinter-java.lang.String-&#34;&gt;&lt;strong&gt;SheetRender.toPrinter&lt;/strong&gt;&lt;/a&gt;方法打印所选工作表的方法。&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-main-java-com-aspose-cells-examples-articles-PrintingSelectedWorksheet-PrintingSelectedWorksheet.java&#34;&gt;&lt;/script&gt;

&lt;h3 id=&#34;打印整个工作簿&#34;&gt;打印整个工作簿&lt;/h3&gt;
&lt;p&gt;您还可以使用&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/workbookrender#toPrinter-java.lang.String-&#34;&gt;&lt;strong&gt;WorkbookRender.toPrinter&lt;/strong&gt;&lt;/a&gt;方法打印整个工作簿。以下代码片段演示了使用&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/workbookrender#toPrinter-java.lang.String-&#34;&gt;&lt;strong&gt;WorkbookRender.toPrinter&lt;/strong&gt;&lt;/a&gt;方法打印整个工作簿的方法。&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-main-java-com-aspose-cells-examples-articles-PrintingWholeWorkbook-PrintingWholeWorkbook.java&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;相关文章&#34;&gt;相关文章&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/specify-job-or-document-name-while-printing-with-aspose-cells/&#34;&gt;在使用 Aspose.Cells 打印时指定作业或文档名称&lt;/a&gt;
&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 为工作表生成缩略图</title>
      <link>https://docs.aspose.com/cells/zh/java/generate-a-thumbnail-image-of-a-worksheet/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/generate-a-thumbnail-image-of-a-worksheet/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

从工作表生成缩略图可能很有用。缩略图是一个小图像，可以粘贴到 Word 文档或 PowerPoint 演示文稿中，以预览工作表内容。它可以添加到网页，用于提供下载原始文档的链接，并且具有各种其他用途。
&lt;/div&gt;

&lt;p&gt;Aspose.Cells for Java 允许将工作表输出为图像文件，因此制作缩略图变得很容易。&lt;/p&gt;
&lt;p&gt;以下示例代码逐步显示了如何操作。&lt;/p&gt;
&lt;p&gt;&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-GenerateThumbnailofWorksheet-1.java&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 将工作表转换为不同的图像格式</title>
      <link>https://docs.aspose.com/cells/zh/java/converting-worksheet-to-different-image-formats/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/converting-worksheet-to-different-image-formats/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

Aspose.Cells允许您从工作簿导出工作表并将其转换为不同的格式。本文解释了如何将工作表转换为不同的格式。
&lt;/div&gt;

&lt;h2 id=&#34;将工作表转换为图像&#34;&gt;&lt;strong&gt;将工作表转换为图像&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;有时保存工作表图片是很有用的。图片可以在线共享，插入到其他文档（例如用Microsoft Word编写的报告或PowerPoint演示文稿）。&lt;/p&gt;
&lt;p&gt;Aspose.Cells通过&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetrender&#34;&gt;&lt;strong&gt;SheetRender&lt;/strong&gt;&lt;/a&gt;类提供图像导出功能。该类表示将呈现为图像的工作表。&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetrender&#34;&gt;&lt;strong&gt;SheetRender&lt;/strong&gt;&lt;/a&gt;类提供了将工作表转换为图像文件的&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetrender#toImage-int-java.io.OutputStream-&#34;&gt;&lt;strong&gt;toImage()&lt;/strong&gt;&lt;/a&gt;方法。支持BMP、PNG、JPEG、TIFF和EMF格式。&lt;/p&gt;
&lt;p&gt;

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

Aspose.Cells for Java 还支持转换为 TIFF 格式。要将工作表转换为 TIFF 图像，需将 JAI 库添加到类路径中。
&lt;/div&gt;
 

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

目前，转换工作表到图像API不支持3D气泡图表。
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;下面的代码显示了如何将Microsoft Excel文件中的工作表转换为PNG文件。&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-LoadingSavingConvertingAndManaging-WorksheetToImage-1.java&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;将工作表转换为svg&#34;&gt;&lt;strong&gt;将工作表转换为SVG&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;SVG代表&lt;strong&gt;可伸缩矢量图形&lt;/strong&gt;。SVG是基于XML标准的二维矢量图形规范。它是一个开放标准，自1999年由万维网联盟（W3C）开发。&lt;/p&gt;
&lt;p&gt;自 v7.1.0 发布以来，&lt;strong&gt;Aspose.Cells for Java&lt;/strong&gt; 可以将工作表转换为 SVG 图像。&lt;/p&gt;
&lt;p&gt;要使用此功能，您需要在程序或项目中导入com.aspose.cells命名空间。它有一些有价值的类用于呈现和打印，例如&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetrender&#34;&gt;&lt;strong&gt;SheetRender&lt;/strong&gt;&lt;/a&gt;、&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/ImageOrPrintOptions&#34;&gt;&lt;strong&gt;ImageOrPrintOptions&lt;/strong&gt;&lt;/a&gt;、&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/workbookrender&#34;&gt;&lt;strong&gt;WorkbookRender&lt;/strong&gt;&lt;/a&gt;等。&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/ImageOrPrintOptions&#34;&gt;&lt;strong&gt;com.aspose.cells.ImageOrPrintOptions&lt;/strong&gt;&lt;/a&gt;类指定工作表将以SVG格式保存。&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetrender&#34;&gt;&lt;strong&gt;SheetRender&lt;/strong&gt;&lt;/a&gt;类以&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/ImageOrPrintOptions&#34;&gt;&lt;strong&gt;ImageOrPrintOptions&lt;/strong&gt;&lt;/a&gt;的对象作为参数，设置保存格式为SVG格式。&lt;/p&gt;
&lt;p&gt;下面的代码片段显示了如何将Excel文件中的工作表转换为SVG图像文件。&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-main-java-com-aspose-cells-examples-loading_saving-ConvertingWorksheetToSVG-ConvertingWorksheetToSVG.java&#34;&gt;&lt;/script&gt;

&lt;h3 id=&#34;渲染工作簿中的活动工作表&#34;&gt;&lt;strong&gt;渲染工作簿中的活动工作表&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;将工作簿中的活动工作表转换成SVG的简单方法是设置活动工作表索引，然后将工作簿保存为SVG。这将把活动工作表呈现为SVG。以下示例代码演示了这个特性：&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-LoadingSavingConvertingAndManaging-ConvertActiveWorksheetToSVG-1.java&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;相关文章&#34;&gt;相关文章&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/export-chart-to-svg-with-viewbox-attribute/&#34;&gt;使用viewBox属性将图表导出为SVG&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/export-worksheet-or-chart-into-image-with-desired-width-and-height/&#34;&gt;使用所需的宽度和高度将工作表或图表导出为图像&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/converting-worksheet-to-image-and-worksheet-to-image-by-page/&#34;&gt;将工作表转为图像以及按页面转为图像&lt;/a&gt;
&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Java: Create Transparent Image of Excel Worksheet</title>
      <link>https://docs.aspose.com/cells/zh/java/create-transparent-image-of-excel-worksheet/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/create-transparent-image-of-excel-worksheet/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

有时，您需要将自己的工作表的图像生成为透明图像。您希望将透明度应用于所有空白填充颜色的单元格。Aspose.Cells提供了&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#Transparent&#34;&gt;&lt;strong&gt;ImageOrPrintOptions.setTransparent()&lt;/strong&gt;&lt;/a&gt;属性来应用透明度到工作表图像。当该属性为&lt;strong&gt;false&lt;/strong&gt;时，没有填充颜色的单元格将以白色绘制，当该属性为&lt;strong&gt;true&lt;/strong&gt;时，没有填充颜色的单元格将透明绘制。
&lt;/div&gt;

&lt;p&gt;在下面的工作表图片中，没有应用透明度。没有填充颜色的单元格绘制成了白色。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;未应用透明度的工作表图像&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;create-transparent-image-of-excel-worksheet_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;p&gt;而在下面的工作表图片中，应用了透明度。没有填充颜色的单元格是透明的。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;应用透明度后的工作表图像&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;create-transparent-image-of-excel-worksheet_2.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;p&gt;您可以使用以下示例代码生成Excel工作表的透明图像。&lt;/p&gt;
&lt;p&gt;&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-CreateTransparentImage-1.java&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 当没有要打印的内容时输出空白页</title>
      <link>https://docs.aspose.com/cells/zh/java/output-blank-page-when-there-is-nothing-to-print/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/output-blank-page-when-there-is-nothing-to-print/</guid>
      <description>
        
        
        &lt;h2 id=&#34;可能的使用场景&#34;&gt;&lt;strong&gt;可能的使用场景&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;如果工作表为空，则Aspose.Cells在将工作表导出为图像时不会打印任何内容。您可以通过使用&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#OutputBlankPageWhenNothingToPrint&#34;&gt;&lt;strong&gt;ImageOrPrintOptions.OutputBlankPageWhenNothingToPrint&lt;/strong&gt;&lt;/a&gt;属性来更改此行为。当将其设置为&lt;strong&gt;true&lt;/strong&gt;时，它将打印空白页。&lt;/p&gt;
&lt;h2 id=&#34;当没有要打印的内容时输出空白页&#34;&gt;&lt;strong&gt;当没有要打印的内容时输出空白页&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;以下示例代码创建了一个空工作簿，其中有一个空工作表，并在设置&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#OutputBlankPageWhenNothingToPrint&#34;&gt;&lt;strong&gt;ImageOrPrintOptions.OutputBlankPageWhenNothingToPrint&lt;/strong&gt;&lt;/a&gt;属性为&lt;strong&gt;true&lt;/strong&gt;后将空工作表呈现为图像。因此，它会生成空白页，因为没有要打印的内容，您可以从下面看到。&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;output-blank-page-when-there-is-nothing-to-print_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;示例代码&#34;&gt;&lt;strong&gt;示例代码&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-Rendering-OutputBlankPageWhenThereIsNothingToPrint-1.java&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Java: Aspose.Cells字体使用</title>
      <link>https://docs.aspose.com/cells/zh/java/aspose-cells-font-usage/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/aspose-cells-font-usage/</guid>
      <description>
        
        
        &lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Java: 使用 ImageOrPrintOptions 的 PageIndex 和 PageCount 属性按顺序呈现页面</title>
      <link>https://docs.aspose.com/cells/zh/java/render-sequence-of-pages-using-pageindex-and-pagecount-properties-of-imageorprintoptions/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/render-sequence-of-pages-using-pageindex-and-pagecount-properties-of-imageorprintoptions/</guid>
      <description>
        
        
        &lt;h2 id=&#34;可能的使用场景&#34;&gt;&lt;strong&gt;可能的使用场景&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;您可以使用 Aspose.Cells 的 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#PageIndex&#34;&gt;&lt;strong&gt;ImageOrPrintOptions.PageIndex&lt;/strong&gt;&lt;/a&gt; 和 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#PageCount&#34;&gt;&lt;strong&gt;ImageOrPrintOptions.PageCount&lt;/strong&gt;&lt;/a&gt; 属性将 Excel 文件的页面序列渲染为图像。当工作表中有很多（例如成千上万）页，但您只想渲染其中的一些页时，这些属性将非常有用。这不仅可以节省处理时间，还可以节省渲染过程的内存消耗。&lt;/p&gt;
&lt;h2 id=&#34;使用imageorprintoptions的pageindex和pagecount属性呈现页面序列&#34;&gt;&lt;strong&gt;使用ImageOrPrintOptions的PageIndex和PageCount属性呈现页面序列&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;以下示例代码加载了 &lt;a href=&#34;55541812.xlsx&#34;&gt;示例 Excel 文件&lt;/a&gt;，并仅使用 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#PageIndex&#34;&gt;&lt;strong&gt;ImageOrPrintOptions.PageIndex&lt;/strong&gt;&lt;/a&gt; 和 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#PageCount&#34;&gt;&lt;strong&gt;ImageOrPrintOptions.PageCount&lt;/strong&gt;&lt;/a&gt; 属性渲染页面 4、5、6 和 7。以下是代码生成的渲染页面。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&#34;text-align:left&#34;&gt;&lt;img src=&#34;render-sequence-of-pages-using-pageindex-and-pagecount-properties-of-imageorprintoptions_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/th&gt;
&lt;th style=&#34;text-align:left&#34;&gt;&lt;img src=&#34;render-sequence-of-pages-using-pageindex-and-pagecount-properties-of-imageorprintoptions_2.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&#34;text-align:left&#34;&gt;&lt;img src=&#34;render-sequence-of-pages-using-pageindex-and-pagecount-properties-of-imageorprintoptions_3.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/td&gt;
&lt;td style=&#34;text-align:left&#34;&gt;&lt;img src=&#34;render-sequence-of-pages-using-pageindex-and-pagecount-properties-of-imageorprintoptions_4.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;示例代码&#34;&gt;&lt;strong&gt;示例代码&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-Rendering-RenderLimitedNoOfSequentialPages-1.java&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 转换Excel到高分辨率图像</title>
      <link>https://docs.aspose.com/cells/zh/java/convert-excle-to-high-resolution-image/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/convert-excle-to-high-resolution-image/</guid>
      <description>
        
        
        &lt;p&gt;随着高分辨率屏幕的普及，以默认96 DPI生成的图像往往显得模糊不清。为了确保在高分辨率屏幕上的清晰度，必须以更高的DPI生成图像。Aspose.Cells提供设置 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions/#setHorizontalResolution-int-&#34;&gt;&lt;strong&gt;ImageOrPrintOptions.HorizontalResolution&lt;/strong&gt;&lt;/a&gt; 和 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions/#setVerticalResolution-int-&#34;&gt;&lt;strong&gt;ImageOrPrintOptions.VerticalResolution&lt;/strong&gt;&lt;/a&gt; 的功能，从而可以从Excel文件创建在高分辨率显示器上清晰锐利的高质量图像。&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Docs-Image-ExcelToHighResolutionImage.java&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Java: 字体</title>
      <link>https://docs.aspose.com/cells/zh/java/fonts/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/fonts/</guid>
      <description>
        
        
        &lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Java: 在呈现Excel文件为PDF时，有时会进行字体替换。Aspose.Cells提供了一个功能，让开发人员知道特定字体已经被替换，从而发出警告。这是一个有用的功能，可以帮助您确定为什么Aspose.Cells呈现的PDF与实际Excel文件不同，并且您可以采取相应的措施。例如，您可以安装缺少的字体，以便呈现结果看起来一致。</title>
      <link>https://docs.aspose.com/cells/zh/java/get-warnings-for-font-substitution-while-rendering-excel-file/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/get-warnings-for-font-substitution-while-rendering-excel-file/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

&lt;p&gt;有时，在将Microsoft Excel文件渲染为PDF时，Aspose.Cells会替换字体。Aspose.Cells提供了一个功能，通过触发警告来让开发人员知道特定字体已经被替换。这是一个有用的功能，可以帮助您确定为什么Aspose.Cells呈现的PDF与实际的Excel文件不同，然后您可以采取适当的措施。例如，您可以安装缺失的字体，以便呈现结果看起来相同。&lt;/p&gt;
&lt;p&gt;如果您想在呈现Excel文件为PDF时获得有关字体替换的警告，请实现IWarningCallback接口，并将PdfSaveOptions.setWarningCallback()方法设置为您实现的接口。&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;以下截图显示了下面代码中使用的源Excel文件。 单元格A6和A7中有一些文本，其字体在Microsoft Excel中无法正确呈现。&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;get-warnings-for-font-substitution-while-rendering-excel-file_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;p&gt;Aspose.Cells将使用合适的字体替换单元格A6和A7中的字体，如下所示。&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;get-warnings-for-font-substitution-while-rendering-excel-file_2.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;下载源文件和输出pdf&#34;&gt;&lt;strong&gt;下载源文件和输出PDF&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;您可以从以下链接下载源Excel文件和输出PDF&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;5472700.xlsx&#34;&gt;source.xlsx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;5472699.pdf&#34;&gt;output.pdf&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;以下代码实现&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/IWarningCallback&#34;&gt;&lt;strong&gt;IWarningCallback&lt;/strong&gt;&lt;/a&gt;并设置实现接口的&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/pdfsaveoptions#WarningCallback&#34;&gt;&lt;strong&gt;PdfSaveOptions.setWarningCallback()&lt;/strong&gt;&lt;/a&gt;方法。现在，无论在任何单元格中是否替换字体，Aspose.Cells都会在WarningCallback.warning()方法内触发警告。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt; &lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;WarningCallback&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;implements&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;IWarningCallback&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;

    &lt;span class=&#34;nd&#34;&gt;@Override&lt;/span&gt;

    &lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;warning&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WarningInfo&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;info&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;

        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;info&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;getWarningType&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;WarningType&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;FONT_SUBSTITUTION&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;

        &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;

            &lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;out&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;println&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;WARNING INFO: &amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;info&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;getDescription&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;());&lt;/span&gt;

        &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;

    &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;

&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;

&lt;span class=&#34;c1&#34;&gt;//........
&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;
&lt;span class=&#34;c1&#34;&gt;//........
&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;
&lt;span class=&#34;kd&#34;&gt;static&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;Run&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;throws&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Exception&lt;/span&gt;

&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;

    &lt;span class=&#34;n&#34;&gt;Workbook&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;workbook&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Workbook&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;source.xlsx&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;);&lt;/span&gt;

    &lt;span class=&#34;n&#34;&gt;PdfSaveOptions&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;options&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;PdfSaveOptions&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;();&lt;/span&gt;

    &lt;span class=&#34;n&#34;&gt;options&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;setWarningCallback&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;WarningCallback&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;());&lt;/span&gt;

    &lt;span class=&#34;n&#34;&gt;workbook&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;save&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;output.pdf&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;options&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;);&lt;/span&gt;

&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;警告输出&#34;&gt;&lt;strong&gt;警告输出&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;在转换源文件后，以下警告将输出到调试控制台：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;n&#34;&gt;WARNING&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;INFO&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Font&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;substitution&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Font&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Athene&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Logos&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Regular&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;has&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;been&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;substituted&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Cell&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;A6&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Sheet&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Sheet1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;].&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;WARNING&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;INFO&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Font&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;substitution&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Font&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;B&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Traffic&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Regular&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;has&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;been&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;substituted&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Cell&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;A7&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Sheet&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Sheet1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;].&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

如果您的电子表格包含公式，最好在将电子表格呈现为PDF格式之前调用Workbook.calculateFormula方法。这样做将确保重新计算基于公式的值，并且在PDF中呈现正确的值。
&lt;/div&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 导出工作表中的单元格范围为图像</title>
      <link>https://docs.aspose.com/cells/zh/java/export-range-of-cells-in-a-worksheet-to-image/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/export-range-of-cells-in-a-worksheet-to-image/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

您可以使用 Aspose.Cells 制作工作表的图像。但是，有时您只需将工作表中的一定范围的单元格导出为图像。本文解释了如何实现这一点。
&lt;/div&gt;

&lt;p&gt;要获取范围的图像，请将打印区域设置为所需的范围，然后将所有页面边距设置为0。还应设置&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#OnePagePerSheet&#34;&gt;&lt;strong&gt;ImageOrPrintOptions.setOnePagePerSheet()&lt;/strong&gt;&lt;/a&gt;为&lt;strong&gt;true&lt;/strong&gt;。&lt;/p&gt;
&lt;p&gt;以下代码获取了范围E8:H10的图像。下面是代码中使用的源工作簿的屏幕截图。您可以尝试任何工作簿中的代码。&lt;/p&gt;
&lt;p&gt;输入文件&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;export-range-of-cells-in-a-worksheet-to-image_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;p&gt;执行此代码会创建只包含范围E8:H10的图像。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;输出图像&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;export-range-of-cells-in-a-worksheet-to-image_2.jpg&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-ExportRangeofCells-1.java&#34;&gt;&lt;/script&gt;

&lt;p&gt;您可能还会发现文章&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/converting-worksheet-to-different-image-formats/&#34;&gt;将工作表转换为不同的图像格式&lt;/a&gt;有用。
&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 工作簿和工作表打印预览</title>
      <link>https://docs.aspose.com/cells/zh/java/workbook-and-worksheet-print-preview/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/workbook-and-worksheet-print-preview/</guid>
      <description>
        
        
        &lt;h2 id=&#34;使用场景&#34;&gt;&lt;strong&gt;使用场景&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;可能存在需要将拥有数百万页的 Excel 文件转换为 PDF 或图像的情况。处理这样的文件将消耗大量时间和资源。在这种情况下，工作簿和工作表打印预览功能可能会被证明是有用的。在转换此类文件之前，用户可以检查总页数，然后决定是否要转换该文件。本文重点介绍如何使用 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/WorkbookPrintingPreview&#34;&gt;&lt;strong&gt;WorkbookPrintingPreview&lt;/strong&gt;&lt;/a&gt; 和 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/SheetPrintingPreview&#34;&gt;&lt;strong&gt;SheetPrintingPreview&lt;/strong&gt;&lt;/a&gt; 类来查找总页数。&lt;/p&gt;
&lt;h2 id=&#34;工作簿和工作表打印预览&#34;&gt;&lt;strong&gt;工作簿和工作表打印预览&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Aspose.Cells 提供了打印预览功能。作业队列提供了 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/WorkbookPrintingPreview&#34;&gt;&lt;strong&gt;WorkbookPrintingPreview&lt;/strong&gt;&lt;/a&gt; 和 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/SheetPrintingPreview&#34;&gt;&lt;strong&gt;SheetPrintingPreview&lt;/strong&gt;&lt;/a&gt; 类。要创建整个工作簿的打印预览，通过将 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/Workbook&#34;&gt;&lt;strong&gt;Workbook&lt;/strong&gt;&lt;/a&gt; 和 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/ImageOrPrintOptions&#34;&gt;&lt;strong&gt;ImageOrPrintOptions&lt;/strong&gt;&lt;/a&gt; 对象传递到构造函数中来创建 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/WorkbookPrintingPreview&#34;&gt;&lt;strong&gt;WorkbookPrintingPreview&lt;/strong&gt;&lt;/a&gt; 类的实例。 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/WorkbookPrintingPreview&#34;&gt;&lt;strong&gt;WorkbookPrintingPreview&lt;/strong&gt;&lt;/a&gt; 类提供了一个 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/workbookprintingpreview#EvaluatedPageCount&#34;&gt;&lt;strong&gt;EvaluatedPageCount&lt;/strong&gt;&lt;/a&gt; 方法，该方法返回生成的预览中的页数。类似于 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/WorkbookPrintingPreview&#34;&gt;&lt;strong&gt;WorkbookPrintingPreview&lt;/strong&gt;&lt;/a&gt; 类， &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/SheetPrintingPreview&#34;&gt;&lt;strong&gt;SheetPrintingPreview&lt;/strong&gt;&lt;/a&gt; 类用于生成特定工作表的打印预览。要创建工作表的打印预览，通过将 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/Worksheet&#34;&gt;&lt;strong&gt;Worksheet&lt;/strong&gt;&lt;/a&gt; 和 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/ImageOrPrintOptions&#34;&gt;&lt;strong&gt;ImageOrPrintOptions&lt;/strong&gt;&lt;/a&gt; 对象传递到构造函数中来创建 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/SheetPrintingPreview&#34;&gt;&lt;strong&gt;SheetPrintingPreview&lt;/strong&gt;&lt;/a&gt; 类的实例。 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/SheetPrintingPreview&#34;&gt;&lt;strong&gt;SheetPrintingPreview&lt;/strong&gt;&lt;/a&gt; 类还提供了一个 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetprintingpreview#EvaluatedPageCount&#34;&gt;&lt;strong&gt;EvaluatedPageCount&lt;/strong&gt;&lt;/a&gt; 方法，该方法返回生成的预览中的页数。&lt;/p&gt;
&lt;p&gt;以下代码片段展示了如何使用 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/WorkbookPrintingPreview&#34;&gt;&lt;strong&gt;WorkbookPrintingPreview&lt;/strong&gt;&lt;/a&gt; 和 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/SheetPrintingPreview&#34;&gt;&lt;strong&gt;SheetPrintingPreview&lt;/strong&gt;&lt;/a&gt; 类，使用 &lt;a href=&#34;Book1.xlsx&#34;&gt;示例 excel 文件&lt;/a&gt;。&lt;/p&gt;
&lt;h3 id=&#34;示例代码&#34;&gt;&lt;strong&gt;示例代码&lt;/strong&gt;&lt;/h3&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-Workbook-PrintPreview-1.java&#34;&gt;&lt;/script&gt;

&lt;p&gt;执行上述示例代码生成的输出如下。&lt;/p&gt;
&lt;h3 id=&#34;控制台输出&#34;&gt;&lt;strong&gt;控制台输出&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;n&#34;&gt;Workbook&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;page&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;count&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;n&#34;&gt;Worksheet&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;page&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;count&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 使用Aspose.Cells在打印时指定作业或文档名称</title>
      <link>https://docs.aspose.com/cells/zh/java/specify-job-or-document-name-while-printing-with-aspose-cells/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/specify-job-or-document-name-while-printing-with-aspose-cells/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

您可以使用&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/WorkbookRender&#34;&gt;&lt;strong&gt;WorkbookRender&lt;/strong&gt;&lt;/a&gt;或&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/SheetRender&#34;&gt;&lt;strong&gt;SheetRender&lt;/strong&gt;&lt;/a&gt;对象打印工作簿或工作表时指定作业或文档名称。Aspose.Cells提供了&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/workbookrender#toPrinter-java.lang.String-java.lang.String-&#34;&gt;&lt;strong&gt;WorkbookRender.toPrinter(printerName, jobName)&lt;/strong&gt;&lt;/a&gt;和&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetrender#toPrinter-java.lang.String-java.lang.String-&#34;&gt;&lt;strong&gt;SheetRender.toPrinter(printerName, jobName)&lt;/strong&gt;&lt;/a&gt;方法，您可以使用它们来指定打印工作簿或工作表时的作业名称。
&lt;/div&gt;

&lt;h2 id=&#34;在使用-asposecells-打印时指定作业或文档名称&#34;&gt;&lt;strong&gt;在使用 Aspose.Cells 打印时指定作业或文档名称&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;示例代码加载源Excel文件，然后通过指定作业或文档名称使用&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/workbookrender#toPrinter-java.lang.String-java.lang.String-&#34;&gt;&lt;strong&gt;WorkbookRender.toPrinter(printerName, jobName)&lt;/strong&gt;&lt;/a&gt;和&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetrender#toPrinter-java.lang.String-java.lang.String-&#34;&gt;&lt;strong&gt;SheetRender.toPrinter(printerName, jobName)&lt;/strong&gt;&lt;/a&gt;方法将其发送到打印机。屏幕截图显示了作业名称在打印队列中的外观。&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;specify-job-or-document-name-while-printing-with-aspose-cells_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-main-java-com-aspose-cells-examples-articles-SpecifyJoborDocumentName-SpecifyJoborDocumentName.java&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;相关文章&#34;&gt;相关文章&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/printing-workbooks/&#34;&gt;打印工作簿&lt;/a&gt;
&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 生成条件格式数据条形图像</title>
      <link>https://docs.aspose.com/cells/zh/java/generate-conditional-formatting-databars-images/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/generate-conditional-formatting-databars-images/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

有时，您需要生成条件格式数据条的图像。您可以使用Aspose.Cells的&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/databar#toImage-com.aspose.cells.Cell-com.aspose.cells.ImageOrPrintOptions-&#34;&gt;&lt;strong&gt;DataBar.toImage()&lt;/strong&gt;&lt;/a&gt;方法生成这些图像。本文展示了如何使用Aspose.Cells生成DataBar图像。
&lt;/div&gt;

&lt;h2 id=&#34;示例&#34;&gt;&lt;strong&gt;示例&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;下面的示例代码生成了单元格C1的DataBar图像。首先，访问单元格的格式条件对象，然后从该对象访问DataBar对象，并使用其 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/databar#toImage-com.aspose.cells.Cell-com.aspose.cells.ImageOrPrintOptions-&#34;&gt;&lt;strong&gt;DataBar.toImage()&lt;/strong&gt;&lt;/a&gt; 方法生成单元格的图像。最后，将图像保存在磁盘上。&lt;/p&gt;
&lt;p&gt;&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-GenerateDatabarImage-1.java&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 导出工作表或图表为指定宽度和高度的图像</title>
      <link>https://docs.aspose.com/cells/zh/java/export-worksheet-or-chart-into-image-with-desired-width-and-height/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/export-worksheet-or-chart-into-image-with-desired-width-and-height/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

您可以使用 Aspose.Cells 将工作表或图表导出为具有指定宽度和高度的图像。它提供了 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#setDesiredSize-int-int-&#34;&gt;&lt;strong&gt;ImageOrPrintOptions.setDesiredSize()&lt;/strong&gt;&lt;/a&gt; 方法，用于设置导出图像的期望宽度和高度。宽度和高度以像素为单位指定。
&lt;/div&gt;

&lt;h2 id=&#34;将工作表导出为具有所需宽度和高度的图像&#34;&gt;&lt;strong&gt;将工作表导出为具有所需宽度和高度的图像&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;以下代码将工作表导出为一个 400x400 大小的图像。&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-ExportWorksheettoImage-1.java&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;相关文章&#34;&gt;相关文章&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/chart-rendering/&#34;&gt;图表渲染&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/converting-worksheet-to-different-image-formats/&#34;&gt;将工作表转换为不同的图像格式&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/export-chart-to-svg-with-viewbox-attribute/&#34;&gt;使用viewBox属性将图表导出为SVG&lt;/a&gt;
&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 将工作表转换为图像以及按页将工作表转换为图像</title>
      <link>https://docs.aspose.com/cells/zh/java/converting-worksheet-to-image-and-worksheet-to-image-by-page/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/converting-worksheet-to-image-and-worksheet-to-image-by-page/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

&lt;p&gt;本文档旨在为开发人员提供详细了解如何将工作表转换为图像文件以及将带有多个页面的工作表转换为每页一个图像文件。&lt;/p&gt;
&lt;p&gt;有时，您可能需要将工作表呈现为图片，例如在应用程序或网页中使用。您可能需要将图像插入到Word文档、PDF文件、PowerPoint演示文稿中，或在其他一些场景中使用。简单地说，您希望将工作表呈现为图像。Aspose.Cells API支持将Microsoft Excel文件中的工作表转换为图像。此外，Aspose.Cells支持将工作簿转换为多个图像文件，每个页面一个图像文件。&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;使用-asposecells-将工作表转换为图像文件&#34;&gt;&lt;strong&gt;使用 Aspose.Cells 将工作表转换为图像文件&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;本文介绍如何使用 Aspose.Cells for Java API 将工作表转换为图像。API 提供了一些有价值的类，比如 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/SheetRender&#34;&gt;&lt;strong&gt;SheetRender&lt;/strong&gt;&lt;/a&gt;、&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/ImageOrPrintOptions&#34;&gt;&lt;strong&gt;ImageOrPrintOptions&lt;/strong&gt;&lt;/a&gt;、&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/WorkbookRender&#34;&gt;&lt;strong&gt;WorkbookRender&lt;/strong&gt;&lt;/a&gt; 等。 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/SheetRender&#34;&gt;&lt;strong&gt;SheetRender&lt;/strong&gt;&lt;/a&gt; 类表示要为其渲染图像的工作表，并具有重载的 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/sheetrender#toImage-int-java.io.OutputStream-&#34;&gt;&lt;strong&gt;toImage&lt;/strong&gt;&lt;/a&gt; 方法，可以直接将工作表转换为图像文件，而无需设置任何属性或选项。&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-ConvertWorksheettoImageFile-1.java&#34;&gt;&lt;/script&gt;

&lt;h3 id=&#34;结果&#34;&gt;&lt;strong&gt;结果&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;执行上述代码后，名为Sheet1的工作表将被转换为图像文件SheetImage.jpg。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;JPG输出&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;converting-worksheet-to-image-and-worksheet-to-image-by-page_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;使用asposecells按页将工作表转换为图像文件&#34;&gt;&lt;strong&gt;使用Aspose.Cells按页将工作表转换为图像文件&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;此示例演示如何使用Aspose.Cells将模板工作簿中具有多个页面的工作表转换为每页一个图像文件。&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-ConvertWorksheetToImageByPage-1.java&#34;&gt;&lt;/script&gt;

&lt;h3 id=&#34;结果-1&#34;&gt;&lt;strong&gt;结果&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;执行上述代码后，名为Sheet1的工作表将转换为两个图像文件（每页一个）Sheet 1 Page 1.Tiff和Sheet 1 Page 2.Tiff。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;生成的图像文件（Sheet 1 Page 1.Tiff）&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;converting-worksheet-to-image-and-worksheet-to-image-by-page_2.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;生成的图像文件（Sheet 1 Page 2.Tiff）&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;converting-worksheet-to-image-and-worksheet-to-image-by-page_3.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;


&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

本文介绍如何使用Aspose.Cells将工作表转换为图像文件，并将具有多个页面的工作表转换为多个图像文件（每页一个）。Aspose.Cells比其他组件提供更多的灵活性，并且具有出色的速度、效率和可靠性。结果表明，Aspose.Cells已经受益于多年的研究、设计和精心调整。
&lt;/div&gt;

&lt;h2 id=&#34;相关文章&#34;&gt;相关文章&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/converting-worksheet-to-different-image-formats/&#34;&gt;将工作表转换为不同的图像格式&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/export-worksheet-or-chart-into-image-with-desired-width-and-height/&#34;&gt;使用所需的宽度和高度将工作表或图表导出为图像&lt;/a&gt;
&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 使用 ImageOrPrintOptions 将工作表和工作簿转换为图像</title>
      <link>https://docs.aspose.com/cells/zh/java/render-the-worksheet-and-workbook-to-image-using-imageorprintoptions/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/render-the-worksheet-and-workbook-to-image-using-imageorprintoptions/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

本文档旨在详细介绍将工作表或工作簿转换为图像文件并对图像和打印选项应用不同设置的方法，如分辨率、TIFF 压缩、图像格式和页面质量。
&lt;/div&gt;

&lt;h2 id=&#34;概述&#34;&gt;&lt;strong&gt;概述&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;有时候，您可能需要将工作表呈现为图形表示。您可能需要将工作表图像嵌入到应用程序或网页中。您可能需要将图像插入到Word文档、PDF文件、PowerPoint演示文稿中，或者在某些其他情景中使用。简单来说，您希望将工作表呈现为图像，以便在别处使用。Aspose.Cells支持将Excel文件中的工作表转换为图像。此外，Aspose.Cells支持设置不同选项，如图像格式、分辨率（垂直和水平）、图像质量以及其他图像和打印选项。&lt;/p&gt;
&lt;p&gt;该 API 提供了一些有价值的类，例如 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/SheetRender&#34;&gt;&lt;strong&gt;SheetRender&lt;/strong&gt;&lt;/a&gt;、&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/ImageOrPrintOptions&#34;&gt;&lt;strong&gt;ImageOrPrintOptions&lt;/strong&gt;&lt;/a&gt;、&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/WorkbookRender&#34;&gt;&lt;strong&gt;WorkbookRender&lt;/strong&gt;&lt;/a&gt; 等。&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/SheetRender&#34;&gt;&lt;strong&gt;SheetRender&lt;/strong&gt;&lt;/a&gt;类处理渲染工作表图像的任务，而&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/WorkbookRender&#34;&gt;&lt;strong&gt;WorkbookRender&lt;/strong&gt;&lt;/a&gt;类则处理工作簿的渲染。上述两个类都有多个重载版本的&lt;em&gt;toImage&lt;/em&gt;方法，可以直接将工作表或工作簿转换为指定属性或选项的图像文件。您可以将图像文件保存到磁盘/流中。支持多种图像格式，例如BMP，PNG，GIFF，JPEG，TIFF，EMF等。&lt;/p&gt;
&lt;h3 id=&#34;将工作表转为图像&#34;&gt;&lt;strong&gt;将工作表转为图像&lt;/strong&gt;&lt;/h3&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-ConvertWorksheettoImage-1.java&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;转换选项&#34;&gt;&lt;strong&gt;转换选项&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;可以保存特定页面到图像。下面的代码将工作簿中的第一个和第二个工作表转换为JPG图像。&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-ConversionOptions-1.java&#34;&gt;&lt;/script&gt;

&lt;p&gt;或者您可以循环遍历工作簿，并将其中的每个工作表渲染为单独的图像：&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-WorksheetToSeparateImage-1.java&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;将工作簿转为图像&#34;&gt;&lt;strong&gt;将工作簿转为图像&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;要将完整的工作簿渲染为图像格式，您可以采用上述方法，也可以简单地使用接受&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/WorkbookRender&#34;&gt;&lt;strong&gt;WorkbookRender&lt;/strong&gt;&lt;/a&gt;类的实例以及&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/Workbook&#34;&gt;&lt;strong&gt;Workbook&lt;/strong&gt;&lt;/a&gt;对象的&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/ImageOrPrintOptions&#34;&gt;&lt;strong&gt;ImageOrPrintOptions&lt;/strong&gt;&lt;/a&gt;对象。&lt;/p&gt;
&lt;p&gt;您可以将整个工作簿保存到包含多帧或多页的单个TIFF图像中：&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-ConvertWorkbooktoImage-1.java&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;相关文章&#34;&gt;相关文章&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/converting-worksheet-to-different-image-formats/&#34;&gt;将工作表转换为不同的图像格式&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/export-chart-to-svg-with-viewbox-attribute/&#34;&gt;使用viewBox属性将图表导出为SVG&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/export-worksheet-or-chart-into-image-with-desired-width-and-height/&#34;&gt;使用所需的宽度和高度将工作表或图表导出为图像&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.aspose.com/cells/cells/zh/java/converting-worksheet-to-image-and-worksheet-to-image-by-page/&#34;&gt;将工作表转为图像以及按页面转为图像&lt;/a&gt;
&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 从工作表中提取图像</title>
      <link>https://docs.aspose.com/cells/zh/java/extract-images-from-worksheets/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/extract-images-from-worksheets/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

Microsoft Excel 用户可以向电子表格中添加图像。使用 Aspose.Cells，可以从 Microsoft Excel 文件中读取图像并将其保存到本地驱动器。本文展示了如何使用 Aspose.Cells for Java API 实现此操作。
&lt;/div&gt;

&lt;p&gt;下面的示例代码显示了如何从 Excel 文件中提取图像并保存。&lt;/p&gt;
&lt;p&gt;&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-ExtractImagesfromWorksheets-1.java&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 在将数据呈现为图像之前从数据中删除空白格</title>
      <link>https://docs.aspose.com/cells/zh/java/remove-white-spaces-from-the-data-before-rendering-to-image/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/remove-white-spaces-from-the-data-before-rendering-to-image/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

有时候，您需要在应用程序或网页中呈现工作表图像。例如，您可能需要将图像插入到 Word 文档、PDF 文件、PowerPoint 演示文稿或其他文档中。基本上，您想要将工作表呈现为图像，以便将其粘贴到其他应用程序中。Aspose.Cells API 允许您将 Microsoft Excel 工作表转换为图像。
&lt;/div&gt;

&lt;p&gt;&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/SheetRender&#34;&gt;&lt;strong&gt;SheetRender&lt;/strong&gt;&lt;/a&gt; 类能够将工作表转换为带有任何指定属性的图像文件，例如，图像格式、分页工作表等。支持多种图像格式，包括 BMP、GIF、JPG、TIFF 和 EMF。&lt;/p&gt;
&lt;p&gt;在使用工作表转图像功能时，默认情况下，输出图像周围会有白色/空白空间，即边框。您可以移除此空白空间。设置源工作表的顶部、左侧、底部和右侧页面设置边距为 0 并相应地指定 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/ImageOrPrintOptions&#34;&gt;&lt;strong&gt;ImageOrPrintOptions&lt;/strong&gt;&lt;/a&gt; 属性。&lt;/p&gt;
&lt;p&gt;&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-AsposeCellsExamples-TechnicalArticles-RemoveWhitespaceAroundData-1.java&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Java: 将工作表呈现到图形上下文</title>
      <link>https://docs.aspose.com/cells/zh/java/render-worksheet-to-graphic-context/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/render-worksheet-to-graphic-context/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

&lt;p&gt;Aspose.Cells现在可以将工作表渲染到图形上下文。图形上下文可以是图像文件、屏幕或打印机等。请使用以下方法将工作表渲染到图形上下文。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SheetRender.toImage(int pageIndex, Graphics2D graphic)&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;

&lt;h2 id=&#34;将工作表渲染到图形上下文&#34;&gt;&lt;strong&gt;将工作表渲染到图形上下文&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;以下代码演示了如何使用Aspose.Cells将工作表渲染到图形上下文。执行代码后，将打印整个工作表，并将剩余的空白区域填充为蓝色，并保存图像为&lt;strong&gt;test.png&lt;/strong&gt;文件。您可以尝试此代码使用任何源Excel文件。还请阅读代码内的评论以便更好地理解。&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-main-java-com-aspose-cells-examples-articles-RenderWorksheetToGraphicContext-ReleaseUnmanagedResources.java&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Java: 在将电子表格呈现为图像时设置默认字体</title>
      <link>https://docs.aspose.com/cells/zh/java/set-default-font-while-rendering-spreadsheet-to-images/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/zh/java/set-default-font-while-rendering-spreadsheet-to-images/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

请使用&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#DefaultFont&#34;&gt;ImageOrPrintOptions.DefaultFont&lt;/a&gt;属性将默认字体设置为在将电子表格呈现为图像时使用的字体。当工作簿的默认字体无法呈现您的字符时，此属性将生效。使用&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#DefaultFont&#34;&gt;ImageOrPrintOptions.DefaultFont&lt;/a&gt;属性指定的默认字体用于所有那些具有无效或不存在字体的单元格。
&lt;/div&gt;

&lt;h2 id=&#34;在将电子表格呈现为图像时设置默认字体&#34;&gt;&lt;strong&gt;在将电子表格呈现为图像时设置默认字体&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;以下示例代码创建一个工作簿，在第一个工作表的单元格A4中添加一些文本，并将其字体设置为无效或不存在的字体。然后，它获取工作表的两个图像。第一个图像是通过将&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#DefaultFont&#34;&gt;ImageOrPrintOptions.DefaultFont&lt;/a&gt;属性设置为&lt;em&gt;Courier New&lt;/em&gt;获得的，第二个图像是通过将&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#DefaultFont&#34;&gt;ImageOrPrintOptions.DefaultFont&lt;/a&gt;属性设置为&lt;em&gt;Times New Roman&lt;/em&gt;获得的。&lt;/p&gt;
&lt;p&gt;将&lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#DefaultFont&#34;&gt;ImageOrPrintOptions.DefaultFont&lt;/a&gt;属性设置为&lt;em&gt;Courier New&lt;/em&gt;后的输出图像。&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;set-default-font-while-rendering-spreadsheet-to-images_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;p&gt;在将 &lt;a href=&#34;https://reference.aspose.com/cells/java/com.aspose.cells/imageorprintoptions#DefaultFont&#34;&gt;ImageOrPrintOptions.DefaultFont&lt;/a&gt; 属性设置为 &lt;em&gt;Times New Roman&lt;/em&gt; 后，这是输出图像。&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;set-default-font-while-rendering-spreadsheet-to-images_2.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/5876dc77e47649b66bdb5deefb4b5639.js?file=Examples-src-main-java-com-aspose-cells-examples-files-utility-SetDefaultFontWhileRenderingSpreadsheetToImages-.java&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/java?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
  </channel>
</rss>
