File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments