Skip to content

Commit 259406c

Browse files
committed
Merge branch 'release/2.8.5'
2 parents cd708ac + a4dc5a1 commit 259406c

5 files changed

Lines changed: 29 additions & 11 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ using Gotenberg.Sharp.API.Client.Domain.Builders.Faceted;
156156
using Gotenberg.Sharp.API.Client.Domain.Requests.Facets; // For Cookie, etc.
157157
```
158158

159-
### Html To Pdf
159+
### HTML To PDF
160160
*With embedded assets:*
161161

162162
```csharp
@@ -181,8 +181,8 @@ using Gotenberg.Sharp.API.Client.Domain.Requests.Facets; // For Cookie, etc.
181181
}
182182
```
183183

184-
### Url To Pdf
185-
*Url to Pdf with custom page range, header & footer:*
184+
### URL To PDF
185+
*URL to PDF with custom page range, header & footer:*
186186

187187
```csharp
188188
public async Task<Stream> CreateFromUrl(string headerPath, string footerPath)
@@ -222,8 +222,8 @@ public async Task<Stream> DoOfficeMerge(string sourceDirectory)
222222
return await _sharpClient.MergeOfficeDocsAsync(request);
223223
}
224224
```
225-
### Markdown to Pdf
226-
*Markdown to Pdf conversion with embedded assets:*
225+
### Markdown to PDF
226+
*Markdown to PDF conversion with embedded assets:*
227227

228228
```csharp
229229
public async Task<Stream> CreateFromMarkdown()
@@ -288,7 +288,7 @@ public async Task<Stream> CreatePdfWithMetadata()
288288
{ "Author", "John Doe" },
289289
{ "Title", "My Document" },
290290
{ "Subject", "Important Report" },
291-
{ "Keywords", "report, pdf, gotenberg" }
291+
{ "Keywords", "report, PDF, gotenberg" }
292292
});
293293
})
294294
.WithPageProperties(pp => pp.UseChromeDefaults());
@@ -366,8 +366,8 @@ public async Task<Stream> CreateSinglePagePdf()
366366
}
367367

368368
```
369-
### Merge 15 Urls to one pdf
370-
*Builds a 30 page pdf by merging the front two pages of 15 news sites. Takes about a minute to complete*
369+
### Merge 15 URLs to one PDF
370+
*Builds a 30 page PDF by merging the front two pages of 15 news sites. Takes about a minute to complete*
371371

372372
```csharp
373373
public async Task<Stream> CreateWorldNewsSummary()

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)