Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e160dd8
Add PDF logical Markdown export
PrzemyslawKlys May 29, 2026
2fc3f87
Add PDF logical Markdown export
PrzemyslawKlys May 29, 2026
4a9f612
Merge remote-tracking branch 'origin/master' into codex/officeimo-pdf…
PrzemyslawKlys May 29, 2026
ce9788f
Merge remote-tracking branch 'origin/master' into codex/officeimo-pdf…
PrzemyslawKlys May 31, 2026
3f1788a
Advance first-party PDF roadmap
PrzemyslawKlys May 31, 2026
297c6ad
Merge remote-tracking branch 'origin/codex/officeimo-pdf-roadmap-stru…
PrzemyslawKlys May 31, 2026
851b23c
Address PDF logical Markdown review feedback
PrzemyslawKlys May 31, 2026
fdd59f3
Improve native PDF export fidelity
PrzemyslawKlys May 31, 2026
7803871
Fix PDF roadmap PR feedback
PrzemyslawKlys Jun 1, 2026
6f90a9a
Merge remote-tracking branch 'origin/master' into codex/officeimo-pdf…
PrzemyslawKlys Jun 1, 2026
1ec7c36
Address PDF export CI and review feedback
PrzemyslawKlys Jun 1, 2026
73cf18c
Address remaining PDF export review feedback
PrzemyslawKlys Jun 1, 2026
460bf5d
Address PDF exporter review edge cases
PrzemyslawKlys Jun 1, 2026
1980e28
Rename Word PDF page setup options
PrzemyslawKlys Jun 1, 2026
cccf7ae
Address PDF export review feedback
PrzemyslawKlys Jun 1, 2026
6c41288
Address additional PDF export review feedback
PrzemyslawKlys Jun 1, 2026
0e8a287
Address remaining PDF export review feedback
PrzemyslawKlys Jun 1, 2026
a124ea8
Align PDF package build and docs metadata
PrzemyslawKlys Jun 1, 2026
596a501
Address PDF form and data bar review feedback
PrzemyslawKlys Jun 1, 2026
a8786bb
Fix Excel PDF website release placement
PrzemyslawKlys Jun 1, 2026
b99ba6b
Address PDF export review follow-ups
PrzemyslawKlys Jun 1, 2026
4762efa
Address PDF export review follow-ups
PrzemyslawKlys Jun 1, 2026
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
1 change: 1 addition & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ paths:
- OfficeIMO.Epub
- OfficeIMO.Excel
- OfficeIMO.Excel.GoogleSheets
- OfficeIMO.Excel.Pdf
- OfficeIMO.GoogleWorkspace
- OfficeIMO.Markdown
- OfficeIMO.Markdown.Html
Expand Down
1 change: 1 addition & 0 deletions Build/project.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"OfficeIMO.Drawing": "1.0.X",
"OfficeIMO.Epub": "0.0.X",
"OfficeIMO.Excel": "0.6.X",
"OfficeIMO.Excel.Pdf": "1.0.X",
"OfficeIMO.Markdown": "0.6.X",
"OfficeIMO.Markdown.Html": "0.1.X",
"OfficeIMO.MarkdownRenderer": "0.2.X",
Expand Down
2 changes: 1 addition & 1 deletion Docs/officeimo.excel.roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Improve collaboration metadata without making it heavy.
Keep rendering scoped until the implementation path is proven.

- Run a feasibility spike for report-grade PDF, HTML, and image output using existing OfficeIMO primitives where possible.
- Start with sheets produced by OfficeIMO report APIs: tables, simple styles, merged cells, images, headers/footers, page setup, and chart placeholders or generated chart images.
- Start with sheets produced by OfficeIMO report APIs: tables, simple styles, merged cells, images, headers/footers, page setup, and chart placeholders or generated chart images. Initial `OfficeIMO.Excel.Pdf` export now covers worksheet table and image export with print areas, orientation, margins, hidden workbook worksheet filtering, hidden rows and columns, repeated print-title rows, simple header/footer text zones with page/date/time/workbook tokens, supported images, and simple line-level font/size/color formatting when representable by one PDF header/footer line style, worksheet merged-cell spans, external cell hyperlinks, exact exported-cell internal workbook-link destinations with sheet-level fallback, supported worksheet drawing images, explicit worksheet column widths, explicit worksheet row heights, manual worksheet print scale, fit-to-width table sizing, common number formats, and basic explicit cell font/fill/conditional-color-scale/data-bar/icon-set/alignment/border styling through the first-party `OfficeIMO.Pdf` engine.
- Add export APIs only after the scoped renderer is reliable enough for report workflows.

## Product Principles
Expand Down
89 changes: 45 additions & 44 deletions Docs/officeimo.pdf.roadmap.md

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions Docs/officeimo.pdf.support-matrix.md

Large diffs are not rendered by default.

19 changes: 8 additions & 11 deletions OfficeIMO.Examples/Converters/Pdf/Pdf.CustomFonts.cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
using OfficeIMO.Word;
using OfficeIMO.Word.Pdf;
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;

namespace OfficeIMO.Examples.Word {
internal static partial class Pdf {
public static void Example_PdfCustomFonts(string folderPath, bool openWord) {
Console.WriteLine("[*] Creating PDF with custom fonts");
Console.WriteLine("[*] Creating PDF with a selected host font family");
string docPath = Path.Combine(folderPath, "PdfCustomFonts.docx");
string pdfPath = Path.Combine(folderPath, "PdfCustomFonts.pdf");
string fontPath = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Fonts), "arial.ttf")
string fontFamily = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
? "Arial"
: RuntimeInformation.IsOSPlatform(OSPlatform.OSX)
? "/System/Library/Fonts/Supplemental/Arial.ttf"
: "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf";
? "Arial"
: "DejaVu Sans";

using (WordDocument document = WordDocument.Create(docPath)) {
document.AddParagraph("File font paragraph").FontFamily = "FileFont";
document.AddParagraph("Stream font paragraph").FontFamily = "StreamFont";
document.AddParagraph("PDF paragraph using the selected host font family.");
document.Save();
using var fontStream = File.OpenRead(fontPath);

document.SaveAsPdf(pdfPath, new PdfSaveOptions {
FontFilePaths = new Dictionary<string, string> { { "FileFont", fontPath } },
FontStreams = new Dictionary<string, Stream> { { "StreamFont", fontStream } }
FontFamily = fontFamily
});
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
using OfficeIMO.Word;
using OfficeIMO.Word.Pdf;
using QuestPDF.Infrastructure;
using System;
using System.IO;

namespace OfficeIMO.Examples.Word {
internal static partial class Pdf {
public static void Example_SaveAsPdfWithLicense(string folderPath, bool openWord) {
Console.WriteLine("[*] Creating document and exporting to PDF with explicit QuestPDF license");
string docPath = Path.Combine(folderPath, "PdfWithLicense.docx");
string pdfPath = Path.Combine(folderPath, "PdfWithLicense.pdf");

QuestPDF.Settings.License = null;
public static void Example_SaveAsPdfWithFirstPartyOptions(string folderPath, bool openWord) {
Console.WriteLine("[*] Creating document and exporting to PDF with first-party OfficeIMO options");
string docPath = Path.Combine(folderPath, "PdfWithFirstPartyOptions.docx");
string pdfPath = Path.Combine(folderPath, "PdfWithFirstPartyOptions.pdf");

using (WordDocument document = WordDocument.Create(docPath)) {
document.AddParagraph("Hello World");
document.Save();

document.SaveAsPdf(pdfPath, new PdfSaveOptions {
QuestPdfLicenseType = LicenseType.Community
PageSize = OfficeIMO.Pdf.PageSizes.Letter,
Margins = OfficeIMO.Pdf.PageMargins.Narrow
});
}

Expand Down
15 changes: 7 additions & 8 deletions OfficeIMO.Examples/Converters/Pdf/Pdf.SaveAsPdf.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using OfficeIMO.Examples.Utils;
using OfficeIMO.Word.Pdf;
using OfficeIMO.Word;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
using System;
using System.IO;
using W = DocumentFormat.OpenXml.Wordprocessing;
Expand Down Expand Up @@ -57,12 +55,13 @@ public static void Example_SaveAsPdf(string folderPath, bool openWord) {

document.Save();
document.SaveAsPdf(pdfPath, new PdfSaveOptions {
PageSize = PageSizes.A4,
PageSize = OfficeIMO.Pdf.PageSizes.A4,
Orientation = PdfPageOrientation.Landscape,
Margin = 2,
MarginUnit = Unit.Centimetre,
MarginBottom = 1,
MarginBottomUnit = Unit.Centimetre
Margins = OfficeIMO.Pdf.PageMargins.FromCentimeters(
left: 2,
top: 2,
right: 2,
bottom: 1)
});
}
}
Expand All @@ -78,7 +77,7 @@ public static void Example_SaveAsPdfInMemory(string folderPath, bool openWord) {

using (MemoryStream pdfStream = new MemoryStream()) {
document.SaveAsPdf(pdfStream, new PdfSaveOptions {
PageSize = new PageSize(300, 500)
PageSize = new OfficeIMO.Pdf.PageSize(300, 500)
});
File.WriteAllBytes(pdfPath, pdfStream.ToArray());
}
Expand Down
14 changes: 7 additions & 7 deletions OfficeIMO.Examples/Converters/Pdf/Pdf01_SaveAsPdf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ public static void Example(string folderPath, bool openWord) {
string outputPath = Path.Combine(folderPath, "SaveAsPdf.pdf");
doc.SaveAsPdf(outputPath, new PdfSaveOptions {
Orientation = PdfPageOrientation.Portrait,
Margin = 2,
MarginUnit = QuestPDF.Infrastructure.Unit.Centimetre,
MarginTop = 3,
MarginTopUnit = QuestPDF.Infrastructure.Unit.Centimetre,
MarginLeft = 1,
MarginLeftUnit = QuestPDF.Infrastructure.Unit.Centimetre
PageSize = OfficeIMO.Pdf.PageSizes.A4,
Margins = OfficeIMO.Pdf.PageMargins.FromCentimeters(
left: 1,
top: 3,
right: 2,
bottom: 2)
});

Console.WriteLine($"✓ Created: {outputPath}");
Expand All @@ -66,4 +66,4 @@ public static void Example(string folderPath, bool openWord) {
}
}
}
}
}
2 changes: 1 addition & 1 deletion OfficeIMO.Examples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ static void Main(string[] args) {
// Word.Pdf.Example_SaveAsPdfRelative(folderPath, false);
// Word.Pdf.Example_SaveAsPdfWithHyperlinks(folderPath, false);
// Word.Pdf.Example_SaveAsPdfWithMetadata(folderPath, false);
// Word.Pdf.Example_SaveAsPdfWithLicense(folderPath, false);
// Word.Pdf.Example_SaveAsPdfWithFirstPartyOptions(folderPath, false);
// Word.Pdf.Example_SaveLists(folderPath, false);
// Word.Pdf.Example_TableStyles(folderPath, false);
// Word.Pdf.Example_PdfCustomFonts(folderPath, false);
Expand Down
Loading
Loading