OfficeIMO.OpenDocument.Odg.Pdf 3.5.1

Prefix Reserved
dotnet add package OfficeIMO.OpenDocument.Odg.Pdf --version 3.5.1
                    
NuGet\Install-Package OfficeIMO.OpenDocument.Odg.Pdf -Version 3.5.1
                    
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="OfficeIMO.OpenDocument.Odg.Pdf" Version="3.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.OpenDocument.Odg.Pdf" Version="3.5.1" />
                    
Directory.Packages.props
<PackageReference Include="OfficeIMO.OpenDocument.Odg.Pdf" />
                    
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 OfficeIMO.OpenDocument.Odg.Pdf --version 3.5.1
                    
#r "nuget: OfficeIMO.OpenDocument.Odg.Pdf, 3.5.1"
                    
#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 OfficeIMO.OpenDocument.Odg.Pdf@3.5.1
                    
#: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=OfficeIMO.OpenDocument.Odg.Pdf&version=3.5.1
                    
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.OpenDocument.Odg.Pdf&version=3.5.1
                    
Install as a Cake Tool

OfficeIMO.OpenDocument.Odg.Pdf

OfficeIMO.OpenDocument.Odg.Pdf converts ODG and FODG drawings to PDF through the Draw scene projection, the shared Drawing model, and the first-party PDF writer.

using OfficeIMO.OpenDocument;
using OfficeIMO.OpenDocument.Odg.Pdf;

OdgDocument drawing = OdgDocument.Load("diagram.odg");
// For flat XML, use OdgDocument.LoadFlatXml("diagram.fodg").
var conversion = drawing.ToPdfDocumentResult();
conversion.Save("diagram.pdf").RequireSuccess();

foreach (var diagnostic in conversion.FidelityDiagnostics)
    Console.WriteLine($"{diagnostic.Location}: {diagnostic.LossKind}: {diagnostic.Message}");

Each source page produces one PDF page, including blank pages, with its original dimensions and order. Supported text, including image captions, remains searchable. Dynamic page-number/count fields use the current drawing page context; fixed numbers and date/time fields default to reported display snapshots. OdgToPdfOptions.DateTimeFields opts into the shared saved-value formatter or dynamic refresh from a supplied timestamp. See the Draw field profile for formatting and native qualification limits. Image crop and mirror settings affect the pixels; captions retain the original frame's text area. PDF output uses print-visible layers by default; set OdgToPdfOptions.ForPrint = false for the screen-visible view. The converter leaves the source document and its associated destination unchanged. It uses no external application at runtime.

ToPdfBytes, path and caller-owned stream SaveAsPdf overloads, asynchronous save methods, and structured SaveAsPdfResult methods use the same engine. Cancellation is checked between pages and shapes and during PDF saving. Loading uses OdfLoadOptions; OdgToPdfOptions.MaximumPages bounds conversion to 1,000 pages by default. An empty drawing is rejected.

Fidelity and acceptance

SourceConversionReports contains an OdfConversionReport with feature locations such as page:2:Network/shape:Router. PDF-stage warnings remain in Report and are refreshed after serialization. FidelityDiagnostics and HasLoss include both stages. Use RequireNoLoss() after serialization when save-time font or layout warnings also matter.

The default LossPolicy is ReportOnly. ThrowOnSkippedOrUnsupported accepts documented approximations but rejects omitted source features before saving; ThrowOnAnyLoss also rejects approximations. Source projection failures do not publish a PDF through the save methods. Structured save failures retain the rejected source report in ConversionReports, FidelityDiagnostics and HasLoss.

Fixed text-box frames and rectangle labels support the Draw shrinking profile. Source clipping checks use the final PdfOptions fonts, including named faces, embedded standard fonts and fallback selection, before applying strict loss policy. For fixed frames and line/connector captions, a text-clipped mapping identifies omitted content or clipped text paint caused by frame bounds, paragraph margins, padding, tabs or shared layout limits; adjust the frame, margins, padding, line spacing or font size. Shrinking remains an approximation with a six-point largest-font floor.

The text-box sizing profile resolves absolute instance minima and grows horizontal top-aligned boxes in width, height or both axes, using the final PDF font selection. Width grows before height, which is measured with the selected wrapping option at the resolved width. Horizontal ink and decoration insets are reserved before alignment; capped no-wrap text retains its paragraph and text-area anchor. Matching-unit maxima cap the enabled axis; a cap that clips text fails strict conversion. Text and frame paint use the same resolved dimensions while source XML retains its saved geometry. Unspecified growth axes, relative or inconsistent constraints and fitting combined with growth remain unsupported. A grown box can extend beyond its page; growth does not change page dimensions or promise that all text is visible on-page.

The built-in Helvetica, Times and Courier faces measure vertical ink from Adobe's metrics for the caption's encoded glyphs. These fonts are unembedded unless configured otherwise. A PDF reader can substitute different glyph shapes that extend beyond those bounds, so strict conversion does not guarantee unclipped paint in every reader. Supply licensed embedded font data through PdfOptions when the output needs predictable font selection. Unavailable glyph bounds and some supplied-font measurements use conservative envelopes; a tight frame can be rejected even when its preview appears to fit. Exact native typography remains outside this qualification.

Conversion uses the supported Draw scene profile. Supported master artwork is painted beneath page content, following the same style and visibility contract as ToDrawing. Literal enhanced paths and full ellipses follow the enhanced geometry profile. Backgrounds outside the solid, native gradient and stretched bitmap profile, enhanced geometry outside that profile, embedded objects, advanced styles and effects, source metadata and hyperlink targets outside the supported URI profile are not reproduced. Basic geometry is still classified as an approximation. Native font metrics, arbitrary typography and complete document fidelity are not established by page or text checks. Windows .NET Framework runtime and broader platform qualification remain separate acceptance work.

The odg-pdf route in OfficeIMO.Workflows accepts both .odg and .fodg and returns source and PDF evidence with the output. Its preview and batch consumers use the same converter.

Generated capability summary

This table is generated from the package-neutral OfficeIMO operation catalog. The detailed source contracts remain authoritative for feature-level behavior and limitations.

Operation Supported Partial Preserved Rejected Unsupported Not applicable
Convert 0 1 0 0 0 0

The complete rows for OfficeIMO.OpenDocument.Odg.Pdf are published in the generated operation contract.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on OfficeIMO.OpenDocument.Odg.Pdf:

Package Downloads
OfficeIMO.Workflows

Typed local document workflows that compose first-party OfficeIMO conversion, PDF, and provenance capabilities.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.5.1 159 10/16/2026
3.4.5 543 10/10/2026