File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,6 +87,17 @@ public MergeOfficeBuilder UseNativePdfFormat(PdfFormats format)
8787 this . Request . UseNativePdfFormat = true ;
8888 this . Request . Format = format ;
8989
90+ return this ;
91+ }
92+
93+ /// <summary>
94+ /// This tells gotenberg to enable Universal Access for the resulting PDF.
95+ /// </summary>
96+ [ PublicAPI ]
97+ public MergeOfficeBuilder EnablePdfUa ( )
98+ {
99+ this . Request . EnablePdfUa = true ;
100+
90101 return this ;
91102 }
92103}
Original file line number Diff line number Diff line change @@ -59,7 +59,12 @@ protected override string ApiPath
5959 /// Note: the documentation says you can't use both together but that regards request headers.
6060 /// When true and Format is not set, the client falls back to PDF/A-1a.
6161 /// </summary>
62- public bool UseNativePdfFormat { get ; set ; }
62+ public bool UseNativePdfFormat { get ; set ; }
63+
64+ /// <summary>
65+ /// This tells gotenberg to enable Universal Access for the resulting PDF.
66+ /// </summary>
67+ public bool EnablePdfUa { get ; set ; }
6368
6469 protected override IEnumerable < HttpContent > ToHttpContent ( )
6570 {
Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ internal static IEnumerable<HttpContent> PropertiesToHttpContent(this MergeOffic
4040 request . ExportFormFields . Value ,
4141 Constants . Gotenberg . LibreOffice . Routes . Convert . ExportFormFields ) ;
4242
43+ if ( request . EnablePdfUa )
44+ yield return BuildRequestBase . CreateFormDataItem (
45+ "true" ,
46+ Constants . Gotenberg . LibreOffice . Routes . Convert . PdfUa ) ;
47+
4348 if ( ! request . UseNativePdfFormat && request . Format == default ) yield break ;
4449
4550 if ( ! request . UseNativePdfFormat && request . Format != default )
Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ public static class Convert
107107 public const string PdfFormat = CrossCutting . PdfFormat ;
108108
109109 public const string Merge = "merge" ;
110+
111+ public const string PdfUa = "pdfua" ;
110112 }
111113 }
112114 }
You can’t perform that action at this time.
0 commit comments