Nedev.FileConverters.DocxToPdf 0.1.0

dotnet add package Nedev.FileConverters.DocxToPdf --version 0.1.0
                    
NuGet\Install-Package Nedev.FileConverters.DocxToPdf -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Nedev.FileConverters.DocxToPdf" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nedev.FileConverters.DocxToPdf" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Nedev.FileConverters.DocxToPdf" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Nedev.FileConverters.DocxToPdf --version 0.1.0
                    
#r "nuget: Nedev.FileConverters.DocxToPdf, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Nedev.FileConverters.DocxToPdf@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Nedev.FileConverters.DocxToPdf&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Nedev.FileConverters.DocxToPdf&version=0.1.0
                    
Install as a Cake Tool

DocxToPdf

A high-performance .NET 10 library and CLI tool for converting DOCX files to PDF using a custom-built PDF engine.

🌟 Features

  • Rich Document Support: Converts complex DOCX elements including:
    • Paragraphs with advanced styling (indentation, spacing, alignment).
    • Multi-level lists and numbering.
    • Tables with cell merging, borders, and custom background colors.
    • Images (Inline and Floating) with support for text wrapping (Square, Tight, Through, Top/Bottom).
    • Hyperlinks and Bookmarks.
  • Advanced Layout:
    • Multi-column page layouts.
    • Section-specific page settings (size, margins, orientation).
    • Headers and Footers (Different first page, even/odd support).
  • Professional Enhancements:
    • Dynamic Watermarks (Text-based).
    • Document Field Resolution (DATE, AUTHOR, TITLE, etc.).
    • Footnotes and Endnotes support.
    • Comments Summary Page generation.
  • Custom PDF Engine: Built on top of a specialized PDF generation layer for precise control over rendering.

🛠 Technical Stack

  • Framework: .NET 10
  • Core Dependencies:
    • DocumentFormat.OpenXml: For robust DOCX parsing.
    • SkiaSharp: For high-quality text and image rendering.
    • Nedev.FileConverters.Core (>=0.1.0): shared converter interfaces and discovery
  • Architecture: Modular converter design with dedicated processors for paragraphs, tables, images, and lists.

🚀 Getting Started

Prerequisites

  • .NET 10 SDK

Installation

Clone the repository and build the project:

git clone <repository-url>
cd Nedev.FileConverters.DocxToPdf/src
dotnet build

Usage (CLI)

There is now a dedicated console application under src/Nedev.FileConverters.DocxToPdf.Cli.

You can invoke it using the CLI project:

cd Nedev.FileConverters.DocxToPdf/src/Nedev.FileConverters.DocxToPdf.Cli
dotnet run -- <input.docx> <output.pdf>

When run without arguments, it defaults to test.docxtest.pdf.

The CLI also demonstrates how to call the shared Nedev.FileConverters.Converter entry point. In a host application you can simply load this assembly (or reference the project) and use:

using Nedev.FileConverters;

using var outStream = Converter.Convert(inStream, "docx", "pdf");

Because DocxToPdfConverter is attributed, the core library will discover and instantiate it automatically when a conversion is requested.

For applications using dependency injection you can register the converter in two ways:

// using core method directly:
services.AddFileConverter("docx", "pdf", new DocxToPdfConverter());

// or via the convenience helper provided by this library:
services.AddDocxToPdf();

📂 Project Structure

  • src/Nedev.FileConverters.DocxToPdfConverter.cs: The main orchestration logic for the conversion process. Implements IFileConverter and is decorated with [FileConverter("docx","pdf")] so it is automatically discovered by the core library.
  • src/PdfEngine/: Core PDF generation and rendering engine.
  • src/Converters/: Specialized logic for handling different DOCX elements (Tables, Images, etc.).
  • src/Helpers/: Utility classes for font handling, styling, and OpenXml extensions.
  • src/Models/: Data models used during the conversion process (now extends/works alongside core models if applicable).
  • src/Nedev.FileConverters.DocxToPdf.Cli: Simple console application demonstrating both direct and Nedev.FileConverters.Converter usage.

📄 License

[Insert License Information Here]

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 98 3/6/2026