File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -879,7 +879,8 @@ public async Task<byte[]> PdfDataAsync(PdfOptions options)
879879 marginBottom ,
880880 marginLeft ,
881881 marginRight ,
882- pageRanges = options . PageRanges
882+ pageRanges = options . PageRanges ,
883+ preferCSSPageSize = options . PreferCSSPageSize
883884 } ) . ConfigureAwait ( false ) ;
884885
885886 var buffer = Convert . FromBase64String ( result . GetValue ( "data" ) . Value < string > ( ) ) ;
Original file line number Diff line number Diff line change @@ -71,5 +71,11 @@ public class PdfOptions
7171 /// Paper margins, defaults to none
7272 /// </summary>
7373 public MarginOptions MarginOptions { get ; set ; } = new MarginOptions ( ) ;
74+
75+ /// <summary>
76+ /// Give any CSS <c>@page</c> size declared in the page priority over what is declared in <c>width</c> and <c>height</c> or <c>format</c> options.
77+ /// Defaults to <c>false</c>, which will scale the content to fit the paper size.
78+ /// </summary>
79+ public bool PreferCSSPageSize { get ; set ; }
7480 }
7581}
You can’t perform that action at this time.
0 commit comments