Skip to content

Commit ee93213

Browse files
committed
Add singlePage page Property
1 parent 05c1fe7 commit ee93213

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

lib/Domain/Builders/Faceted/PagePropertyBuilder.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ public PagePropertyBuilder SetMargins(Margins margins)
4242

4343
return this;
4444
}
45+
46+
public PagePropertyBuilder SetSinglePage(bool singlePage = true)
47+
{
48+
this._pageProperties.SinglePage = singlePage;
49+
return this;
50+
}
4551

4652
public PagePropertyBuilder SetPaperSize(PaperSizes sizes)
4753
{

lib/Domain/Requests/Facets/PageProperties.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ public PageProperties()
137137
[MultiFormHeader(Constants.Gotenberg.Chromium.Shared.PageProperties.GenerateDocumentOutline)]
138138
public bool GenerateDocumentOutline { get; set; }
139139

140+
/// <summary>
141+
/// Get or set a value indicating whether the PDF should be generated as a single page. (Will override the paper size)
142+
/// </summary>
143+
[MultiFormHeader(Constants.Gotenberg.Chromium.Shared.PageProperties.SinglePage)]
144+
public bool SinglePage { get; set; }
145+
140146
#endregion
141147

142148
#region public methods

lib/Infrastructure/Constants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ public static class PageProperties
250250
public const string Scale = "scale";
251251

252252
public const string PageRanges = CrossCutting.PageRanges;
253+
254+
public const string SinglePage = "singlePage";
253255
}
254256

255257
public static class HtmlConvert

0 commit comments

Comments
 (0)