C# 、VB 将Excel转为PDFA/1B

 时间:2026-02-16 10:44:43

1、可通过E-iceblue中文官网下载10.10.6版本的hotfix,下载后,解压到指定路径,完成解压后,将文件夹Bin下的Spire.Xls.dll和Spire.Pdf.dll文件添加引用到VS程序(如下图):

C# 、VB 将Excel转为PDFA/1B

1、using Spire.Xls;

namespace ExceltoPDFA1B

{

    class Program

    {

        static void Main(string[] args)

        {

            //加载Excel测试文档

            Workbook wb = new Workbook();

            wb.LoadFromFile("sample.xlsx", ExcelVersion.Version2013);

            //将Excel保存为Pdf_A1B格式

            wb.ConverterSetting.PdfConformanceLevel = Spire.Pdf.PdfConformanceLevel.Pdf_A1B;

            wb.SaveToFile("result.pdf", Spire.Xls.FileFormat.PDF);

            System.Diagnostics.Process.Start("result.pdf");

        }

    }

}

2、文档转换结果:

C# 、VB 将Excel转为PDFA/1B

1、Imports Spire.Xls

Namespace ExceltoPDFA1B

               Class Program

                   Private Shared Sub Main(args As String())

                            '加载Excel测试文档

                            Dim wb As New Workbook()

                            wb.LoadFromFile("sample.xlsx", ExcelVersion.Version2013)

                            '将Excel保存为Pdf_A1B格式

                            wb.ConverterSetting.PdfConformanceLevel = Spire.Pdf.PdfConformanceLevel.Pdf_A1B

                            wb.SaveToFile("result.pdf", Spire.Xls.FileFormat.PDF)

                            System.Diagnostics.Process.Start("result.pdf")

                   End Sub

               End Class

End Namespace

  • Notepad++怎么设置代码折叠标志位简洁
  • AVS Video Editor如何复制视频
  • edius的推拉转场怎么使用
  • 百度经验新回享收入怎么计算
  • 百度文库怎样上传文档 百度文库文档上传教程
  • 热门搜索
    小学二年级手抄报大全 庆五一手抄报 初中手抄报图片大全 读书节手抄报图片 成语手抄报 清明节手抄报花边 小学生中国梦手抄报 小学数学手抄报图片 教师节手抄报简单又漂亮 中国加油武汉加油手抄报