Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 101 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,21 @@ Your star or donation can make MiniPdf better

</div>

This repository now maintains **MiniPdf for .NET** only. Rust, Java, Go,
Python, and Node.js have moved to their own [PdfLibrarys repositories](https://github.com/PdfLibrarys).
The implementation links below point to those independent repositories.
MiniPdf provides a **.NET library, command-line tool, and standalone Native AOT binaries**
for converting XLSX, DOCX, and PPTX files to PDF.

MiniPdf converts Office documents directly to PDF without Microsoft Office,
LibreOffice, Adobe Acrobat, or COM automation at runtime.

## Choose an implementation
## .NET overview

| Implementation | Inputs | Interfaces | Maturity | Documentation | Visual results |
|---|---|---|---|---|---|
| .NET | XLSX, DOCX, PPTX | Library, CLI, Native AOT binaries | Stable | **[.NET guide](documents/README.nuget.md)** | **[XLSX](https://mini-software.github.io/minipdf-web-page/?language=dotnet&suite=classic&format=xlsx)**<br>**[DOCX](https://mini-software.github.io/minipdf-web-page/?language=dotnet&suite=classic&format=docx)**<br>**[PPTX](https://mini-software.github.io/minipdf-web-page/?language=dotnet&suite=issue&format=pptx)** |
| Rust | XLSX, DOCX, PPTX | Crate, CLI | Stable | **[Rust guide](https://github.com/PdfLibrarys/minipdf-rs/blob/main/README.md)** | **[XLSX](https://mini-software.github.io/minipdf-web-page/?language=rust&suite=classic&format=xlsx)**<br>**[DOCX](https://mini-software.github.io/minipdf-web-page/?language=rust&suite=classic&format=docx)** |
| Java | XLSX, DOCX, PPTX | Library, CLI | Experimental | **[Java source](https://github.com/PdfLibrarys/minipdf-java)** | **[XLSX](https://mini-software.github.io/minipdf-web-page/?language=java&suite=issue&format=xlsx)**<br>**[DOCX](https://mini-software.github.io/minipdf-web-page/?language=java&suite=issue&format=docx)** |
| Python | DOCX | Package, CLI | Stable | **[Python guide](https://github.com/PdfLibrarys/minipdf-python/blob/main/README.md)** | **[XLSX](https://mini-software.github.io/minipdf-web-page/?language=python&suite=issue&format=xlsx)**<br>**[DOCX](https://mini-software.github.io/minipdf-web-page/?language=python&suite=issue&format=docx)** |
| Node.js | XLSX, DOCX, PPTX | Native package | Stable | **[Node.js guide](https://github.com/PdfLibrarys/minipdf-node/blob/main/README.md)** | **[XLSX](https://mini-software.github.io/minipdf-web-page/?language=node&suite=issue&format=xlsx)**<br>**[DOCX](https://mini-software.github.io/minipdf-web-page/?language=node&suite=issue&format=docx)** |
| Go | XLSX, DOCX, PPTX | Package, CLI | Experimental | **[Go guide](https://github.com/PdfLibrarys/minipdf-go/blob/main/README.md)** | **[XLSX](https://mini-software.github.io/minipdf-web-page/?language=go&suite=issue&format=xlsx)** |

## Quick start

### .NET
### Install the library

```bash
dotnet add package MiniPdf
Expand All @@ -48,17 +42,111 @@ dotnet add package MiniPdf
```csharp
using MiniSoftware;

MiniPdf.ConvertToPdf("workbook.xlsx", "workbook.pdf");
MiniPdf.ConvertToPdf("report.docx", "report.pdf");
MiniPdf.ConvertToPdf("slides.pptx", "slides.pdf");

byte[] pdfBytes = MiniPdf.ConvertToPdf("report.docx");
```

Prefer a command-line tool?
### Use the command line

```bash
dotnet tool install --global MiniPdf.Cli
minipdf report.docx -o report.pdf
minipdf workbook.xlsx -o workbook.pdf --compress
minipdf slides.pptx -o slides.pdf
minipdf --help
```

No .NET runtime installed on the destination machine? Download a standalone
Native AOT binary from [Releases](https://github.com/mini-software/MiniPdf/releases).

## Usage examples

### Convert streams

```csharp
using System.IO;
using MiniSoftware;

using var input = File.OpenRead("report.docx");
using var output = File.Create("stream-output.pdf");
MiniPdf.ConvertToPdf(input, output);
```

The caller owns the streams and disposes them. Use the overload returning
`byte[]` when an in-memory result is needed.

### Select Excel sheets and control layout

```csharp
using MiniSoftware;

MiniPdf.ConvertToPdf("workbook.xlsx", "summary.pdf", new MiniPdfConversionOptions
{
Sheets = new[] { "Summary" },
Landscape = true,
FitToPage = true,
Compress = true,
});
```

Sheet names, 1-based `SheetIndexes`, orientation, print scale, and fit-to-page
options apply to XLSX input. See the [conversion options](documents/README.nuget.md#conversion-options)
for the complete list.

### Set Word page size and margins

```csharp
using MiniSoftware;

MiniPdf.ConvertToPdf("report.docx", "a4-report.pdf", new MiniPdfConversionOptions
{
PageSize = MiniPdfPageSize.A4,
Margins = new MiniPdfMargins(left: 36, top: 48, right: 36, bottom: 48),
});
```

See the [.NET guide](documents/README.nuget.md) for usage.
`PageSize` and `Margins` apply to DOCX input. Dimensions use PDF points:
72 points equal one inch. They do not override XLSX worksheet or PPTX slide sizes.

### Reduce memory for large, simple Excel tables

```csharp
using System.IO;
using MiniSoftware;

using var input = File.OpenRead("workbook.xlsx");
using var output = File.Create("low-memory.pdf");
MiniPdf.ConvertToPdf(input, output, new MiniPdfConversionOptions
{
LowMemory = true,
Compress = true,
});
```

This opt-in XLSX mode uses temporary disk storage. Unsupported features, such
as formulas, merged cells, and drawings, produce an explicit error rather than
silently falling back. Read the [supported features and limitations](documents/README.nuget.md#low-memory-xlsx-conversion-opt-in)
before enabling it. Returning `byte[]` still retains the complete PDF in memory.

### Provide fonts for headless hosts

```csharp
using System.IO;
using MiniSoftware;

MiniPdf.RegisterFont("Arial", File.ReadAllBytes(Path.Combine("Fonts", "arial.ttf")));
MiniPdf.ConvertToPdf("report.docx", "font-report.pdf");
```

Supply licensed `.ttf` or `.ttc` files that contain the required glyphs.
Register fonts once at application startup: registrations are process-wide.
MiniPdf does not distribute these font files.

See the [.NET library guide](documents/README.nuget.md) and
[CLI reference](documents/README.nuget.cli.md) for more examples and options.

## Why MiniPdf

Expand Down Expand Up @@ -88,11 +176,7 @@ Run the minipdf-contribution skill.
|---|---|
| [Online demo](https://mini-software.github.io/MiniPdf/) | Try conversion in a browser |
| [.NET documentation](documents/README.nuget.md) | Stable library and CLI usage |
| [Rust documentation](https://github.com/PdfLibrarys/minipdf-rs/blob/main/README.md) | Experimental crate and CLI usage |
| [Java implementation](https://github.com/PdfLibrarys/minipdf-java) | Experimental Maven library and CLI source |
| [Python documentation](https://github.com/PdfLibrarys/minipdf-python/blob/main/README.md) | Experimental package and CLI usage |
| [Node.js documentation](https://github.com/PdfLibrarys/minipdf-node/blob/main/README.md) | Experimental native package usage |
| [Go documentation](https://github.com/PdfLibrarys/minipdf-go/blob/main/README.md) | Experimental package and CLI usage |
| [CLI reference](documents/README.nuget.cli.md) | Commands, fonts, compression, and Excel preview options |
| [.NET XLSX benchmark](https://mini-software.github.io/minipdf-web-page/?language=dotnet&suite=classic&format=xlsx) | Visual comparison results for spreadsheets |
| [.NET DOCX benchmark](https://mini-software.github.io/minipdf-web-page/?language=dotnet&suite=classic&format=docx) | Visual comparison results for documents |
| [Community governance](GOVERNANCE.md) | Decisions, roles, voting, and maintainer selection |
Expand Down
112 changes: 95 additions & 17 deletions documents/README.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,15 @@ Votre étoile ou votre don peut améliorer MiniPdf.

</div>

This repository now maintains **MiniPdf for .NET** only. Rust, Java, Go,
Python, and Node.js have moved to their own [PdfLibrarys repositories](https://github.com/PdfLibrarys).
The implementation links below point to those independent repositories.
MiniPdf provides a .NET library, command-line tool, and standalone Native AOT binaries for XLSX, DOCX, and PPTX conversion.

MiniPdf convertit directement les documents Office en PDF sans nécessiter Microsoft Office, LibreOffice, Adobe Acrobat ni automatisation COM à l'exécution.

## Choisir une implémentation
## .NET

| Implémentation | Entrées | Interfaces | Maturité | Documentation | Résultats visuels |
|---|---|---|---|---|---|
| .NET | XLSX, DOCX, PPTX | Bibliothèque, CLI, binaires Native AOT | Stable | **[Guide .NET](README.nuget.md)** | **[XLSX](https://mini-software.github.io/minipdf-web-page/?language=dotnet&suite=classic&format=xlsx)**<br>**[DOCX](https://mini-software.github.io/minipdf-web-page/?language=dotnet&suite=classic&format=docx)**<br>**[PPTX](https://mini-software.github.io/minipdf-web-page/?language=dotnet&suite=issue&format=pptx)** |
| Rust | XLSX, DOCX, PPTX | Crate, CLI | Stable | **[Guide Rust](https://github.com/PdfLibrarys/minipdf-rs/blob/main/README.md)** | **[XLSX](https://mini-software.github.io/minipdf-web-page/?language=rust&suite=classic&format=xlsx)**<br>**[DOCX](https://mini-software.github.io/minipdf-web-page/?language=rust&suite=classic&format=docx)** |
| Java | XLSX, DOCX, PPTX | Bibliothèque, CLI | Expérimental | **[Sources Java](https://github.com/PdfLibrarys/minipdf-java)** | **[XLSX](https://mini-software.github.io/minipdf-web-page/?language=java&suite=issue&format=xlsx)**<br>**[DOCX](https://mini-software.github.io/minipdf-web-page/?language=java&suite=issue&format=docx)** |
| Python | DOCX | Paquet, CLI | Stable | **[Guide Python](https://github.com/PdfLibrarys/minipdf-python/blob/main/README.md)** | **[XLSX](https://mini-software.github.io/minipdf-web-page/?language=python&suite=issue&format=xlsx)** |
| Node.js | XLSX, DOCX, PPTX | Paquet natif | Stable | **[Guide Node.js](https://github.com/PdfLibrarys/minipdf-node/blob/main/README.md)** | **[XLSX](https://mini-software.github.io/minipdf-web-page/?language=node&suite=issue&format=xlsx)** |
| Go | XLSX, DOCX, PPTX | Paquet, CLI | Expérimental | **[Guide Go](https://github.com/PdfLibrarys/minipdf-go/blob/main/README.md)** | **[XLSX](https://mini-software.github.io/minipdf-web-page/?language=go&suite=issue&format=xlsx)** |

## Démarrage rapide

Expand All @@ -47,18 +40,111 @@ dotnet add package MiniPdf
```csharp
using MiniSoftware;

MiniPdf.ConvertToPdf("workbook.xlsx", "workbook.pdf");
MiniPdf.ConvertToPdf("report.docx", "report.pdf");
MiniPdf.ConvertToPdf("slides.pptx", "slides.pdf");

byte[] pdfBytes = MiniPdf.ConvertToPdf("report.docx");
```

Pour la ligne de commande :

```bash
dotnet tool install --global MiniPdf.Cli
minipdf report.docx -o report.pdf
minipdf workbook.xlsx -o workbook.pdf --compress
minipdf slides.pptx -o slides.pdf
minipdf --help
```

Pour l'utilisation, consultez le [guide .NET](README.nuget.md).

## Usage examples

### Convert streams

```csharp
using System.IO;
using MiniSoftware;

using var input = File.OpenRead("report.docx");
using var output = File.Create("stream-output.pdf");
MiniPdf.ConvertToPdf(input, output);
```

The caller owns the streams and disposes them. Use the overload returning
`byte[]` when an in-memory result is needed.

### Select Excel sheets and control layout

```csharp
using MiniSoftware;

MiniPdf.ConvertToPdf("workbook.xlsx", "summary.pdf", new MiniPdfConversionOptions
{
Sheets = new[] { "Summary" },
Landscape = true,
FitToPage = true,
Compress = true,
});
```

Sheet names, 1-based `SheetIndexes`, orientation, print scale, and fit-to-page
options apply to XLSX input. See the [conversion options](README.nuget.md#conversion-options)
for the complete list.

### Set Word page size and margins

```csharp
using MiniSoftware;

MiniPdf.ConvertToPdf("report.docx", "a4-report.pdf", new MiniPdfConversionOptions
{
PageSize = MiniPdfPageSize.A4,
Margins = new MiniPdfMargins(left: 36, top: 48, right: 36, bottom: 48),
});
```

`PageSize` and `Margins` apply to DOCX input. Dimensions use PDF points:
72 points equal one inch. They do not override XLSX worksheet or PPTX slide sizes.

### Reduce memory for large, simple Excel tables

```csharp
using System.IO;
using MiniSoftware;

using var input = File.OpenRead("workbook.xlsx");
using var output = File.Create("low-memory.pdf");
MiniPdf.ConvertToPdf(input, output, new MiniPdfConversionOptions
{
LowMemory = true,
Compress = true,
});
```

This opt-in XLSX mode uses temporary disk storage. Unsupported features, such
as formulas, merged cells, and drawings, produce an explicit error rather than
silently falling back. Read the [supported features and limitations](README.nuget.md#low-memory-xlsx-conversion-opt-in)
before enabling it. Returning `byte[]` still retains the complete PDF in memory.

### Provide fonts for headless hosts

```csharp
using System.IO;
using MiniSoftware;

MiniPdf.RegisterFont("Arial", File.ReadAllBytes(Path.Combine("Fonts", "arial.ttf")));
MiniPdf.ConvertToPdf("report.docx", "font-report.pdf");
```

Supply licensed `.ttf` or `.ttc` files that contain the required glyphs.
Register fonts once at application startup: registrations are process-wide.
MiniPdf does not distribute these font files.

See the [.NET library guide](README.nuget.md) and
[CLI reference](README.nuget.cli.md) for more examples and options.

## Pourquoi MiniPdf

- **Aucune suite Office requise** : la conversion s'exécute dans l'application ou la CLI.
Expand All @@ -83,16 +169,8 @@ Run the minipdf-contribution skill.
|---|---|
| [Démo en ligne](https://mini-software.github.io/MiniPdf/) | Tester la conversion dans le navigateur |
| [Documentation .NET](README.nuget.md) | Utilisation de la bibliothèque stable et de la CLI |
| [Documentation Rust](https://github.com/PdfLibrarys/minipdf-rs/blob/main/README.md) | Utilisation du crate expérimental et de la CLI |
| [Implémentation Java](https://github.com/PdfLibrarys/minipdf-java) | Sources de la bibliothèque Maven et de la CLI expérimentales |
| [Documentation Python](https://github.com/PdfLibrarys/minipdf-python/blob/main/README.md) | Utilisation du paquet expérimental et de la CLI |
| [Documentation Node.js](https://github.com/PdfLibrarys/minipdf-node/blob/main/README.md) | Utilisation du paquet natif expérimental |
| [Documentation Go](https://github.com/PdfLibrarys/minipdf-go/blob/main/README.md) | Utilisation du paquet expérimental et de la CLI |
| [Benchmark XLSX .NET](https://mini-software.github.io/minipdf-web-page/?language=dotnet&suite=classic&format=xlsx) | Résultats visuels pour les feuilles de calcul |
| [Benchmark DOCX .NET](https://mini-software.github.io/minipdf-web-page/?language=dotnet&suite=classic&format=docx) | Résultats visuels pour les documents |
| [Benchmark XLSX Rust](https://mini-software.github.io/minipdf-web-page/?language=rust&suite=classic&format=xlsx) | Résultats de comparaison visuelle Rust des feuilles de calcul |
| [Benchmark DOCX Rust](https://mini-software.github.io/minipdf-web-page/?language=rust&suite=classic&format=docx) | Résultats de comparaison visuelle Rust des documents |
| [Procédure de benchmark Rust](https://github.com/PdfLibrarys/minipdf-rs) | Génère la couverture des tests et les rapports comparatifs |
| [Gouvernance communautaire](../GOVERNANCE.md) | Décisions, rôles, votes et sélection des mainteneurs |
| [Feuille de route](../ROADMAP.md) | Périmètre du projet, état des implémentations et priorités |
| [Sécurité](../SECURITY.md) | Signalement privé des vulnérabilités et versions prises en charge |
Expand Down
Loading
Loading