Skip to content

Commit 1613c83

Browse files
committed
Merge branch 'release/2.8.1'
2 parents 8633d3e + 8f3efce commit 1613c83

95 files changed

Lines changed: 1267 additions & 310 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,60 @@ jobs:
88
strategy:
99
matrix:
1010
dotnet-version: [8.x]
11-
11+
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0
1717

18+
- name: Start Gotenberg with Basic Auth
19+
run: |
20+
docker run -d \
21+
--name gotenberg \
22+
-p 3000:3000 \
23+
-e GOTENBERG_API_BASIC_AUTH_USERNAME=testuser \
24+
-e GOTENBERG_API_BASIC_AUTH_PASSWORD=testpass \
25+
gotenberg/gotenberg:8 \
26+
gotenberg \
27+
--api-enable-basic-auth \
28+
--api-timeout=1800s \
29+
--log-level=debug
30+
31+
# Wait for Gotenberg to be ready
32+
timeout 30 bash -c 'until curl -f http://localhost:3000/health; do sleep 1; done'
33+
1834
- name: Setup Dotnet
1935
uses: actions/setup-dotnet@v4
2036
with:
2137
dotnet-version: ${{ matrix.dotnet-version }}
2238

2339
- name: Install GitVersion
24-
uses: gittools/actions/gitversion/setup@v1.1.1
40+
uses: gittools/actions/gitversion/setup@v4.1.0
2541
with:
26-
versionSpec: '5.x'
27-
42+
versionSpec: '6.x'
43+
2844
- name: GitVersion
2945
id: gitversion
30-
uses: gittools/actions/gitversion/execute@v1.1.1
46+
uses: gittools/actions/gitversion/execute@v4.1.0
3147
with:
32-
useConfigFile: true
33-
48+
configFilePath: GitVersion.yml
49+
50+
- name: Restore dependencies
51+
run: dotnet restore
52+
53+
- name: Build
54+
run: dotnet build --no-restore -c Release
55+
56+
- name: Run tests
57+
run: dotnet test --no-build -c Release --verbosity normal
58+
env:
59+
GOTENBERG_URL: http://localhost:3000
60+
GOTENBERG_USERNAME: testuser
61+
GOTENBERG_PASSWORD: testpass
62+
3463
- name: Pack
35-
run: dotnet pack -c Release -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
64+
run: dotnet pack -c Release -p:PackageVersion=${{ steps.gitversion.outputs.FullSemVer }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
3665

3766
- name: Publish
3867
if: github.event_name != 'pull_request' && (github.ref_name == 'master')

CHANGES.MD

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Release History
2+
3+
## v2.8.1
4+
- Added strongly-typed cookie support for Gotenberg API
5+
- Added basic authentication support
6+
- Added SinglePage page property
7+
- Fixed margins bug to use proper parameters for each side
8+
- Project restructure (moved /lib to /src)
9+
10+
## v2.8
11+
- Improving handling of PDF formatting and added flatten support
12+
13+
## v2.7
14+
- Fixes issue with "Inches"
15+
16+
## v2.6
17+
- Updated office Extensions
18+
- Added document metadata support
19+
- Add Dimension.FromUnit() support for dimensional values
20+
21+
## v2.5
22+
- Renamed "Dimentions" to "PageProperties"
23+
- Added support for 'GenerateDocumentOutline' and 'OmitBackground'
24+
25+
## v2.4
26+
- Updated dependencies
27+
- Removed Annotations
28+
- Add support for PDF/UA form field
29+
- Thank you for the PR @lennartb-!
30+
31+
## v2.3
32+
- Added Convert Page 'ExportFormFields' flag support (Gotenberg v8.3+ Only)
33+
- Added .NET 8 target
34+
35+
## v2.2
36+
- Added 'SkipNetworkIdle' flag support (Gotenberg v8+ Only)
37+
- Thank you for the PR @guillaumeduhr!
38+
- Upgraded nugets to latest
39+
- Added .NET 7.0 support
40+
41+
## v2.1
42+
- Added Trace Support
43+
- Fixed extra webhook header support
44+
45+
## v2.0
46+
- Upgraded to support Gotenberg v7 -- this version no longer works with Gotenberg v6

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mode: Mainline
1+
mode: ContinuousDelivery
22
branches: {}
33
ignore:
44
sha: []

GotenbergSharpApiClient.sln

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.32112.339
55
MinimumVisualStudioVersion = 15.0.26124.0
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gotenberg.Sharp.Api.Client", "lib\Gotenberg.Sharp.Api.Client.csproj", "{75F783A4-9392-412F-9DFE-00EE89527C10}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gotenberg.Sharp.Api.Client", "src\Gotenberg.Sharp.Api.Client\Gotenberg.Sharp.Api.Client.csproj", "{75F783A4-9392-412F-9DFE-00EE89527C10}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FE638D0D-6A76-4BF4-AF06-D8AAB9726723}"
99
ProjectSection(SolutionItems) = preProject
1010
.editorconfig = .editorconfig
1111
EndProjectSection
1212
EndProject
13+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GotenbergSharpClient.Tests", "test\GotenbergSharpClient.Tests\GotenbergSharpClient.Tests.csproj", "{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}"
14+
EndProject
1315
Global
1416
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1517
Debug|Any CPU = Debug|Any CPU
@@ -32,6 +34,18 @@ Global
3234
{75F783A4-9392-412F-9DFE-00EE89527C10}.Release|x64.Build.0 = Release|Any CPU
3335
{75F783A4-9392-412F-9DFE-00EE89527C10}.Release|x86.ActiveCfg = Release|Any CPU
3436
{75F783A4-9392-412F-9DFE-00EE89527C10}.Release|x86.Build.0 = Release|Any CPU
37+
{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}.Debug|x64.ActiveCfg = Debug|Any CPU
40+
{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}.Debug|x64.Build.0 = Debug|Any CPU
41+
{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}.Debug|x86.ActiveCfg = Debug|Any CPU
42+
{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}.Debug|x86.Build.0 = Debug|Any CPU
43+
{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
44+
{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}.Release|Any CPU.Build.0 = Release|Any CPU
45+
{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}.Release|x64.ActiveCfg = Release|Any CPU
46+
{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}.Release|x64.Build.0 = Release|Any CPU
47+
{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}.Release|x86.ActiveCfg = Release|Any CPU
48+
{EEAF9CA2-7962-176A-E851-BF81D8DE31F0}.Release|x86.Build.0 = Release|Any CPU
3549
EndGlobalSection
3650
GlobalSection(SolutionProperties) = preSolution
3751
HideSolutionNode = FALSE

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
.NET C# Client for interacting with the [Gotenberg](https://gotenberg.dev/) v7 & v8 micro-service's API. [Gotenberg](https://github.com/gotenberg/gotenberg) is a [Docker-powered stateless API](https://hub.docker.com/r/gotenberg/gotenberg/) for converting & merging HTML, Markdown and Office documents to PDF. The client supports a configurable [Polly](http://www.thepollyproject.org/) **retry policy** with exponential backoff for handling transient exceptions.
1010

1111
# Getting Started
12+
13+
## Using Docker Run
1214
*Pull the image from dockerhub.com*
1315
```powershell
1416
> docker pull gotenberg/gotenberg:latest
@@ -18,6 +20,17 @@
1820
docker run --name gotenbee8x --rm -p 3000:3000 gotenberg/gotenberg:latest gotenberg --api-timeout=1800s --log-level=debug
1921
```
2022

23+
## Using Docker Compose (with Basic Auth)
24+
For local development with basic authentication enabled, use the provided docker-compose file:
25+
26+
```powershell
27+
docker-compose -f docker/docker-compose-basic-auth.yml up -d
28+
```
29+
30+
Pre-configured with test credentials:
31+
- **Username:** `testuser`
32+
- **Password:** `testpass`
33+
2134
# .NET Core Project Setup
2235
*Install nuget package into your project*
2336
```powershell
@@ -40,6 +53,24 @@ PM> Install-Package Gotenberg.Sharp.Api.Client
4053
}
4154
```
4255

56+
### Optional: Basic Authentication
57+
**Gotenberg v8+** - If your Gotenberg instance is configured with basic authentication (using `--api-enable-basic-auth`), you can provide credentials in the settings:
58+
59+
```json
60+
"GotenbergSharpClient": {
61+
"ServiceUrl": "http://localhost:3000",
62+
"HealthCheckUrl": "http://localhost:3000/health",
63+
"BasicAuthUsername": "your-username",
64+
"BasicAuthPassword": "your-password",
65+
"RetryPolicy": {
66+
"Enabled": true,
67+
"RetryCount": 4,
68+
"BackoffPower": 1.5,
69+
"LoggingEnabled": true
70+
}
71+
}
72+
```
73+
4374
## Configure Services In Startup.cs
4475
```csharp
4576
public void ConfigureServices(IServiceCollection services)

appveyor.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: '3.8'
2+
3+
services:
4+
gotenberg:
5+
image: gotenberg/gotenberg:8
6+
ports:
7+
- "3000:3000"
8+
environment:
9+
- GOTENBERG_API_BASIC_AUTH_USERNAME=testuser
10+
- GOTENBERG_API_BASIC_AUTH_PASSWORD=testpass
11+
command:
12+
- "gotenberg"
13+
- "--api-enable-basic-auth"
14+
- "--api-timeout=1800s"
15+
- "--log-level=debug"
16+
restart: unless-stopped

lib/Domain/Requests/Facets/FacetBase.cs

Lines changed: 0 additions & 83 deletions
This file was deleted.

lib/Domain/Builders/BaseBuilder.cs renamed to src/Gotenberg.Sharp.Api.Client/Domain/Builders/BaseBuilder.cs

File renamed without changes.

lib/Domain/Builders/BaseChromiumBuilder.cs renamed to src/Gotenberg.Sharp.Api.Client/Domain/Builders/BaseChromiumBuilder.cs

File renamed without changes.

0 commit comments

Comments
 (0)