Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
83ec240
started work in scaling pdf with percentage
AdrianEPPlus Sep 22, 2026
76ec058
Merge branch 'develop9' into feature/pdf_scaling
AdrianEPPlus Sep 22, 2026
246d6c6
Progress
AdrianEPPlus Sep 22, 2026
b1593ac
Scaling header and footer
AdrianEPPlus Sep 23, 2026
4e1303d
Added fit to page test.
AdrianEPPlus Sep 24, 2026
b65aa60
scaling progress
AdrianEPPlus Oct 1, 2026
40117fe
Added more tests for scaling
AdrianEPPlus Oct 5, 2026
9036253
Merge branch 'develop9' into feature/pdf_scaling
AdrianEPPlus Oct 5, 2026
9fdbd4d
Fixed layout order and renamed PdfCatalog to EPPlusToPdfWriter
AdrianEPPlus Oct 7, 2026
e02c710
Merge branch 'develop9' into fix/_pdf_minior_issues
AdrianEPPlus Oct 7, 2026
a9e363d
removed debug comments
AdrianEPPlus Oct 7, 2026
912d439
removed more comments from pdf.
AdrianEPPlus Oct 7, 2026
5dd4d79
Added additional info to info object.
AdrianEPPlus Oct 8, 2026
a930c16
Merge branch 'develop9' into feature/pdf_info_object_update
swmal Oct 8, 2026
7a7a324
Merge branch 'develop9' into feature/pdf_info_object_update
swmal Oct 8, 2026
d7cac71
fixed null error when reading File from package.
AdrianEPPlus Oct 8, 2026
cc62230
header footer scaling.
AdrianEPPlus Oct 12, 2026
2ed20f9
align with page margins progress
AdrianEPPlus Oct 12, 2026
34386a3
Align with page margins done
AdrianEPPlus Oct 12, 2026
84e91a5
Merge branch 'develop9' into fix/pdf_hf_fixes
AdrianEPPlus Oct 13, 2026
fa91931
removed commented code.
AdrianEPPlus Oct 13, 2026
0244d3c
Added shrink to fit & better check clipping for spilling text.
AdrianEPPlus Oct 13, 2026
b00cdbb
Fixed fill selection for total row in tables.
AdrianEPPlus Oct 13, 2026
7b41847
Added draft feature to pdf.
AdrianEPPlus Oct 14, 2026
30eeb35
Added feature for black and white PDF export.
AdrianEPPlus Oct 14, 2026
4f659ce
Added black and white support for jpegs
AdrianEPPlus Oct 16, 2026
cb472d2
removed comments
AdrianEPPlus Oct 19, 2026
98fc8b3
Fixed content not centering properly when scaling the document.
AdrianEPPlus Oct 20, 2026
bdcbd2a
Merge branch 'develop9' into feature/pdf_draft
AdrianEPPlus Oct 20, 2026
cc68ece
Merge branch 'feature/pdf_draft' into feature/pdf_blackwhite
AdrianEPPlus Oct 20, 2026
5790245
Merge branch 'feature/pdf_blackwhite' into fix/pdf_centering
AdrianEPPlus Oct 20, 2026
1de36d7
Merge branch 'develop9' into fix/pdf_centering
AdrianEPPlus Oct 20, 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 src/EPPlus/Export/PdfExport/Data/PageData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ internal struct Page
public double HeadingHeight;
public double UsedWidth;
public double UsedHeight;
public bool IsCommentsPage;
}

internal struct Pages
Expand Down
11 changes: 7 additions & 4 deletions src/EPPlus/Export/PdfExport/Layout/PdfLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,9 @@ internal static List<Pages> GetPages(PdfPageSettings[] sheetSettings, PdfWorkshe
pages.IsCommentsPage = true;
pages.Settings = pageSettings;
pages.SheetIndex = si;
pages.IsCommentsPage = true;
for (int k = 0; k < pages.Page.Length; k++)
pages.Page[k].IsCommentsPage = true;
PagesCollection.Add(pages);
}
}
Expand Down Expand Up @@ -2175,8 +2178,8 @@ private static void EmitBandFrameV(List<GridLine> target, PdfRange range, double
internal static double GetOriginX(PdfPageSettings pageSettings, Page page)
{
if (!pageSettings.CenterOnPageHorizontally) return pageSettings.ContentBounds.Left;

var offset = (pageSettings.ContentBounds.Width - page.UsedWidth) / 2d;
var contentWidth = page.IsCommentsPage ? pageSettings.ContentBounds.Width : pageSettings.EffectiveContentWidth;
var offset = (contentWidth - page.UsedWidth) / 2d;
return pageSettings.ContentBounds.Left + Math.Max(0d, offset);
}

Expand All @@ -2186,8 +2189,8 @@ internal static double GetOriginX(PdfPageSettings pageSettings, Page page)
internal static double GetOriginY(PdfPageSettings pageSettings, Page page)
{
if (!pageSettings.CenterOnPageVertically) return pageSettings.ContentBounds.Top;

var offset = (pageSettings.ContentBounds.Height - page.UsedHeight) / 2d;
var contentHeight = page.IsCommentsPage ? pageSettings.ContentBounds.Height : pageSettings.EffectiveContentHeight;
var offset = (contentHeight - page.UsedHeight) / 2d;
return pageSettings.ContentBounds.Top - Math.Max(0d, offset);
}

Expand Down
Loading