|
|
Winnovative Next PDF to Markdown Converter for .NET
|
|
|
The PDF to Markdown Converter is a component of the Winnovative PDF Next Library for .NET that turns PDF documents into Markdown text.
The headings, lists, tables and links are recognized from the way the pages are laid out, which means that any PDF document can be converted, with or without tags.
The images of the document can be included in the result.
Tagged PDF documents, such as PDF/UA files, can also be converted with the TaggedPdfToMarkdownConverter class, which writes the Markdown text
from the structure given by the tags of the document. You can find more details in the
Convert Tagged PDF to Markdown
documentation section. The class belongs to the
Winnovative Next Core PDF API for .NET.
The PDF to Markdown Converter is distributed as part of the
Winnovative Next PDF Processor for .NET,
which also includes functionality for extracting text, converting PDF pages to images and extracting images from PDF documents.
The library targets .NET Standard 2.0 and can be used in .NET Core and .NET Framework applications that you
can deploy on Windows, Linux and macOS platforms, including Azure App Service and Functions or Docker.
|
|
|
|
|
|
|
|
 |
|
Main Features
|
|
|
-
Convert PDF documents from memory, stream or file to Markdown
-
Recognize headings, lists and code blocks from the page layout
-
Write tables as Markdown tables, including tables split across pages
-
Keep the links of the document as Markdown links
-
Use the bookmarks of the document for the heading levels
-
Convert tagged PDF documents from the structure given by their tags
|
|
-
Embed the images in the Markdown or save them as PNG files
-
Leave out the page headers and footers that repeat
-
Convert password-protected PDF documents
-
Convert the entire PDF or a range of PDF pages
-
Asynchronous methods that can be used with async and await
|
|
|
|
|
Compatibility
|
|
|
-
Windows 10, 11 and Windows Server 2016 to 2025 (x64 and ARM64)
-
Linux 64-bit distributions (x64 and ARM64)
-
macOS 12.0+ (Apple Silicon / ARM64)
-
.NET 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, .NET Standard 2.0
-
.NET Framework 4.6.2 to 4.8.1
|
|
-
Azure App Service and Azure Functions
-
Azure Virtual Machines
-
Web, console and desktop applications
-
Docker containers for Windows and Linux
|
|
|
 |
|
Getting Started
|
|
|
|
You can quickly get started with the ASP.NET demo application available for download, or you can integrate the library into your own project.
The online documentation,
contains detailed instructions on how to run an application using Winnovative PDF Next Library for .NET on Windows, Linux and macOS platforms, Azure App Service
and Azure Functions for Windows and Linux.
You can view the current capabilities of the library by checking the
online demo
application and the API reference in the online documentation.
|
|
 |
|
Download Demo Application |
|
|
|
The ZIP package available for download from the link below includes an ASP.NET demo application project with complete C# source code covering all major library features.
|
|
|
|
|
|
Running the samples in the demo application that involve HTML to PDF conversion features on Linux platforms might require installing some system dependency packages. The documentation includes an entire section dedicated to building, publishing and running the demo application on multiple platforms.
|
|
 |
|
NuGet Packages
|
|
|
|
For Windows x64 deployments add a reference to the
Winnovative.Pdf.Next.PdfProcessor.Windows
NuGet Package and for Linux x64 deployments add a reference to the
Winnovative.Pdf.Next.PdfProcessor.Linux
NuGet Package. The packages without an architecture suffix target x64.
For Windows ARM64 and Linux ARM64 deployments add a reference to the
Winnovative.Pdf.Next.PdfProcessor.Windows.Arm64
and
Winnovative.Pdf.Next.PdfProcessor.Linux.Arm64
NuGet Packages respectively.
For macOS on Apple Silicon (ARM64) deployments add a reference to the
Winnovative.Pdf.Next.PdfProcessor.MacOS
NuGet Package.
The package for Windows is referenced by the
Winnovative.Pdf.Next.Windows
metapackage for all components, the package for Windows ARM64 is referenced by the
Winnovative.Pdf.Next.Windows.Arm64
metapackage for all components, the package for Linux is referenced by the
Winnovative.Pdf.Next.Linux
metapackage for all components, the package for Linux ARM64 is referenced by the
Winnovative.Pdf.Next.Linux.Arm64
metapackage for all components and the package for macOS is referenced by the
Winnovative.Pdf.Next.MacOS
metapackage for all components.
There are also multiplatform metapackages that reference both the Windows x64 and Linux x64 PDF Processor packages:
Winnovative.Pdf.Next.PdfProcessor
for the PDF Processor functionality and
Winnovative.Pdf.Next
for the entire Winnovative PDF Next library.
|
|
 |
|
Installation
|
|
|
|
The PDF Processor component ships its runtime inside the NuGet package and needs no system packages on Windows, Linux or macOS.
On Linux the runtime file must have execute permission, as the
Getting Started on Linux guide shows.
|
|
 |
|
Winnovative.Pdf.Next Namespace
|
|
|
|
All components of the Winnovative PDF Next for .NET library share the same
Winnovative.Pdf.Next
namespace and can be used together in the same application.
To use the library in your own code, add the using directive at the top of your C# source file, as shown below.
|
|
// add this using statement at the top of your C# file
using Winnovative.Pdf.Next;
|
|
 |
|
C# Code Samples |
|
|
|
You can use the sample code below to convert a PDF document to Markdown, first without images and then with the images saved in a folder.
|
|
// Create the PDF to Markdown converter instance with default options
PdfToMarkdownConverter pdfToMarkdownConverter = new PdfToMarkdownConverter();
// Convert the specified PDF file to Markdown
string markdown = pdfToMarkdownConverter.ConvertToMarkdown(pdfFilePath);
// Save the images of the document as PNG files and link them from Markdown
pdfToMarkdownConverter.ImageMode = PdfToMarkdownImageMode.File;
pdfToMarkdownConverter.ImagesFolder = imagesFolderPath;
string markdownWithImages = pdfToMarkdownConverter.ConvertToMarkdown(pdfFilePath);
|