Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, March 31, 2017 4:55:14 PM(UTC)
Nick Villalobos

Groups: Registered
Posts: 119

Was thanked: 4 time(s) in 4 post(s)

An updated tutorial can be found here: https://www.leadtools.co...-document-converter.html

If you are wanting to convert file formats to a Document output, then you would need to utilize the DocumentConverter Class:

https://www.leadtools.co...ument/document-converter

The Document Converter SDK can be used to convert raster and document formats alike, making it ideal for any Enterprise Content Management (ECM), document archival, and document normalization solution.

Convert to and from any document or raster image format
Adobe Acrobat PDF and PDF/A
Microsoft Office DOC/DOCX, XLS/XLSX, PPT/PPTX, PST, EML, MSG, and XPS formats
CAD formats such as DXF, DWG, and DWF
TIFF, JPEG, PNG, EXIF, BMP, and hundreds more raster image formats
Plain Text, RTF, HTML, MOBI, ePUB, and more
IBM AFP, MO:DCA, IOCA, and PTOCA


Here is some sample code on how to achieve this in a C# application:
Code:

using (DocumentConverter documentConverter = new DocumentConverter()) 
   { 
      var inFile = Path.Combine(ImagesPath.Path, @"Leadtools.docx"); 
      var outFile = Path.Combine(ImagesPath.Path, @"output.pdf"); 
      var format = DocumentFormat.Pdf; 
      var jobData = DocumentConverterJobs.CreateJobData(inFile, outFile, format); 
      jobData.JobName = "conversion job"; 
      var job = documentConverter.Jobs.CreateJob(jobData); 
      documentConverter.Jobs.RunJob(job); 
   } 

Edited by moderator Wednesday, December 27, 2023 3:53:53 PM(UTC)  | Reason: updated

Nick Villalobos
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.042 seconds.