You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project was created to enable PDF creation on .NETStandard. This because multiple libraries did not suit my purpose of working on .NET Core & .NET Framework the same way. Some alternatives supported settings the different boxes (Media, Crop, Bleed & Trim) but did not fully supported images on all platforms. Others supported images but not the different boxes, and again others did not work at all on .NET Core.
8
+
This project was created to enable PDF creation on .NETStandard 2.1, .NET 6 & .NET 7. This because multiple libraries did not suit my purpose of working on .NET Core & .NET Framework the same way. Some alternatives supported settings the different boxes (Media, Crop, Bleed & Trim) but did not fully supported images on all platforms. Others supported images but not the different boxes, and again others did not work at all on .NET Core.
9
9
10
10
Because of those reasons this libary was created.
11
11
@@ -15,16 +15,30 @@ This project is licensed under MIT license.
15
15
## Specifications used
16
16
This library was created using the specifications lay out in ["PDF 32000-1:2008, Document management – Portable document format – Part 1: PDF 1.7"](https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf).
17
17
18
-
The full specifications are not implemented. This library currently only supports placements of images, drawing of vector shapes (CMYK, RGB & gray scale), and setting the different boxes.
18
+
The full specifications are not implemented.
19
+
This library currently only supports:
20
+
- Images
21
+
-*No transparency support at the moment*
22
+
- Text
23
+
-*Only the 14 standard fonts are available*
24
+
-*See "9.6.2.2 Standard Type 1 Fonts (Standard 14 Fonts)" in the specifications.*
25
+
- Shapes
26
+
- Setting page boxes (Media, Crop, Bleed, Trim & Art)
27
+
- Color model limited to:
28
+
- DeviceGray
29
+
- DeviceRGB
30
+
- DeviceCMYK
31
+
- Separations/Spotcolor (with a linearized type 2 method to portay the tint)
19
32
20
33
## Remarks
21
34
Unlike most PDF libraries this library does not create the entire PDF model in memory before writing the PDF to a (file)stream. Most libaries support editing capabilities, because this libary only supports creating files, it was not necessary to keep the PDF model in memory. This results in less memory usage.
22
35
23
36
To place the images this library makes use of [SixLabors/ImageSharp](https://github.com/SixLabors/ImageSharp). All images that are placed in the PDF will be saved internally as a JPG file. This means that this library currently does **NOT** support transparency.
24
37
25
38
### Output pdfs
26
-
The PDF files created in this library are PDF 1.7 compliant.
39
+
The PDF files created in this library are not fully PDF 1.7 compliant, because the standard 14 fonts are partially written to the Font Dictionary, The **FirstChar**, **LastChar**. **Widths** and **FontDescriptor** values are omitted, which is was acceptable prior to PDF 1.5. This special treatment of the 14 standard fonts was deprecated in PDF 1.5. The PDF's that are generated will work in conforming readers because as the specification states: *"For backwards capability, conforming readers shall still provide the special treatment identified for the standard 14 fonts."*.
27
40
41
+
This shortcoming shall be remedied when broader font support is implemented.
28
42
29
43
### Sample program images
30
44
The sample project called *Synercoding.FileFormats.Pdf.ConsoleTester* uses multiple images. Those images were taken from [Pexels.com](https://www.pexels.com/royalty-free-images/) and are licensed under the [Pexels License](https://www.pexels.com/photo-license/).
@@ -35,21 +49,18 @@ The sample project called *Synercoding.FileFormats.Pdf.ConsoleTester* uses multi
0 commit comments