

'Initialize ExcelToPdfConverter for workbookĭim converter As ExcelToPdfConverter = New ExcelToPdfConverter(workbook) 'Initialize IApplication and set the default application versionĭim application As IApplication = excelEngine.ExcelĪpplication.DefaultVersion = ExcelVersion.Excel2016ĭim workbook As IWorkbook = (filePath, ExcelOpenType.Automatic) Close the instances of PdfDocument, IWorkbook, and dispose the ExcelEngineĭim excelEngine As ExcelEngine = New ExcelEngine PdfDocument document = converter.Convert(settings)
#Pdf merge extension pdf#
Convert the Excel document to PDF with converter settings Settings.LayoutOptions = LayoutOptions.FitAllColumnsOnOnePage Initialize ExcelToPdfConverterSettings and set the layoutĮxcelToPdfConverterSettings settings = new ExcelToPdfConverterSettings() Initialize ExcelToPdfConverter for workbookĮxcelToPdfConverter converter = new ExcelToPdfConverter(workbook) IWorkbook workbook = (filePath, ExcelOpenType.Automatic) IApplication application = excelEngine.Excel Īpplication.DefaultVersion = ExcelVersion.Excel2016 Initialize IApplication and set the default application version
#Pdf merge extension code#

'Convert the Word document into PDF and store it in stream Stream = ConvertExcelToPDF(fileInfo.FullName) If ((fileInfo.Extension = ".xls") OrElse (fileInfo.Extension = ".xlsx")) Then 'Convert the Excel document into PDF and store it in stream Stream = ImportPagesFromPDF(fileInfo.FullName) 'Import pages from PDF document and store it into stream 'Get the path of documents into DirectoryInfoĭim directoryInfo As DirectoryInfo = New DirectoryInfo("././Documents/")ĭim document As PdfDocument = New PdfDocumentĭim stream As MemoryStream = New MemoryStreamįor Each fileInfo As FileInfo In directoryInfo.GetFiles PdfLoadedDocument loadedDocument = new PdfLoadedDocument(stream) If (fileInfo.Extension = ".jpg" || fileInfo.Extension = ".png" || fileInfo.Extension = ".jpeg") Convert the Image file into PDF and store it in stream If (fileInfo.Extension = ".doc" || fileInfo.Extension = ".docx") Convert the Word document into PDF and store it in stream If (fileInfo.Extension = ".xls" || fileInfo.Extension = ".xlsx") Convert the Excel document into PDF and store it in stream Import pages from PDF document and store it into stream MemoryStream stream = new MemoryStream() įoreach (FileInfo fileInfo in directoryInfo.GetFiles()) PdfDocument document = new PdfDocument() Get the path of documents into DirectoryInfoĭirectoryInfo directoryInfo = new DirectoryInfo("././Documents/")
#Pdf merge extension install#


This library also offers functionality to merge, split, stamp, forms, compress, and secure the PDF files. NET PDF library used to create, read, and edit the PDF documents programmatically without Adobe dependencies. Syncfusion Essential PDF is a feature-rich and high performance.
