Skip to content

Commit a4dc5a1

Browse files
committed
Added GenerateTaggedPdf
1 parent 9975b4f commit a4dc5a1

4 files changed

Lines changed: 21 additions & 3 deletions

File tree

src/Gotenberg.Sharp.Api.Client/Domain/Builders/Faceted/HtmlConversionBehaviorBuilder.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,4 +230,14 @@ public HtmlConversionBehaviorBuilder SetPdfUa(bool enablePdfUa = true)
230230

231231
return this;
232232
}
233+
234+
/// <summary>
235+
/// This tells gotenberg to enable embeds logical structure tags for accessibility during generation.
236+
/// </summary>
237+
public HtmlConversionBehaviorBuilder SetGenerateTaggedPdf(bool generateTaggedPdf = true)
238+
{
239+
_htmlConversionBehaviors.GenerateTaggedPdf = generateTaggedPdf;
240+
241+
return this;
242+
}
233243
}

src/Gotenberg.Sharp.Api.Client/Domain/Requests/Facets/HtmlConversionBehaviors.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
1+
// Copyright 2019-2026 Chris Mohan, Jaben Cargman
22
// and GotenbergSharpApiClient Contributors
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -96,8 +96,14 @@ public class HtmlConversionBehaviors : FacetBase
9696
public ConversionPdfFormats? PdfFormat { get; set; }
9797

9898
/// <summary>
99-
/// This tells gotenberg to enable Universal Access for the resulting PDF.
99+
/// This tells gotenberg to enable Universal Access for the resulting PDF.
100100
/// </summary>
101101
[MultiFormHeader(Constants.Gotenberg.Chromium.Shared.HtmlConvert.PdfUa)]
102102
public bool? EnablePdfUa { get; set; }
103+
104+
/// <summary>
105+
/// Chromium feature. Embeds logical structure tags for accessibility during generation.
106+
/// </summary>
107+
[MultiFormHeader(Constants.Gotenberg.Chromium.Shared.HtmlConvert.GenerateTaggedPdf)]
108+
public bool GenerateTaggedPdf { get; set; } = false;
103109
}

src/Gotenberg.Sharp.Api.Client/Domain/Requests/Facets/PageProperties.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public PageProperties()
142142
/// </summary>
143143
[MultiFormHeader(Constants.Gotenberg.Chromium.Shared.PageProperties.SinglePage)]
144144
public bool SinglePage { get; set; }
145-
145+
146146
#endregion
147147

148148
#region public methods

src/Gotenberg.Sharp.Api.Client/Infrastructure/Constants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ public static class HtmlConvert
278278

279279
public const string SkipNetworkIdleEvent = "skipNetworkIdleEvent";
280280

281+
public const string GenerateTaggedPdf = "generateTaggedPdf";
282+
281283
//pdf format
282284
public const string PdfFormat = CrossCutting.PdfFormat;
283285

0 commit comments

Comments
 (0)