Skip to content

Commit 173ba60

Browse files
committed
Added more Paper Sizes.
1 parent 70063f5 commit 173ba60

File tree

2 files changed

+48
-6
lines changed

2 files changed

+48
-6
lines changed

lib/Domain/Builders/Faceted/PaperSizes.cs

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
1+
// Copyright 2019-2025 Chris Mohan, Jaben Cargman
22
// and GotenbergSharpApiClient Contributors
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,26 +13,66 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
17-
1816
namespace Gotenberg.Sharp.API.Client.Domain.Builders.Faceted;
1917

20-
2118
public enum PaperSizes
2219
{
20+
/// <summary>
21+
/// No specified paper size.
22+
/// </summary>
2323
None = 0,
2424

25+
/// <summary>
26+
/// A3 paper size (297 × 420 mm or 11.7 × 16.5 inches).
27+
/// Commonly used for large documents, drawings, and diagrams.
28+
/// </summary>
2529
A3 = 1,
2630

31+
/// <summary>
32+
/// A4 paper size (210 × 297 mm or 8.3 × 11.7 inches).
33+
/// Standard paper size for letters, documents, and office printing.
34+
/// </summary>
2735
A4 = 2,
2836

37+
/// <summary>
38+
/// A5 paper size (148 × 210 mm or 5.8 × 8.3 inches).
39+
/// Often used for notepads, booklets, and smaller documents.
40+
/// </summary>
2941
A5 = 3,
3042

43+
/// <summary>
44+
/// A6 paper size (105 × 148 mm or 4.1 × 5.8 inches).
45+
/// Commonly used for postcards, flyers, and small booklets.
46+
/// </summary>
3147
A6 = 4,
3248

49+
/// <summary>
50+
/// Letter paper size (8.5 × 11 inches or 216 × 279 mm).
51+
/// Standard size in North America for business and personal documents.
52+
/// </summary>
3353
Letter = 5,
3454

55+
/// <summary>
56+
/// Legal paper size (8.5 × 14 inches or 216 × 356 mm).
57+
/// Common in North America for legal documents.
58+
/// </summary>
3559
Legal = 6,
3660

37-
Tabloid = 7
61+
/// <summary>
62+
/// Tabloid paper size (11 × 17 inches or 279 × 432 mm).
63+
/// Used for newspapers, large-format documents, and posters.
64+
/// </summary>
65+
Tabloid = 7,
66+
67+
/// <summary>
68+
/// ANSI D paper size (22 × 34 inches or 559 × 864 mm).
69+
/// Used for architectural and engineering drawings.
70+
/// </summary>
71+
D = 8,
72+
73+
/// <summary>
74+
/// ANSI E paper size (34 × 44 inches or 864 × 1118 mm).
75+
/// Common for large-scale engineering and architectural plans.
76+
/// </summary>
77+
E = 9
3878
}

lib/Extensions/DimensionHelpers.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ public static class DimensionHelpers
3636
(PaperSizes.A6, (Width: 4.1, Height: 5.8)),
3737
(PaperSizes.Letter, (Width: 8.5, Height: 11.0)),
3838
(PaperSizes.Legal, (Width: 8.5, Height: 14.0)),
39-
(PaperSizes.Tabloid, (Width: 11.0, Height: 17.0))
39+
(PaperSizes.Tabloid, (Width: 11.0, Height: 17.0)),
40+
(PaperSizes.D, (Width: 22.0, Height: 34.0)),
41+
(PaperSizes.E, (Width: 34.0, Height: 44.0))
4042
];
4143

4244
internal static (Dimension Width, Dimension Height) ToSelectedSize(this PaperSizes selectedSize)

0 commit comments

Comments
 (0)