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
Copy file name to clipboardexpand all lines: CHANGELOG.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -18,16 +18,16 @@ This can also be enabled programmatically with `warnings.simplefilter('default',
18
18
19
19
## [2.8.3] - Not released yet
20
20
### Added
21
-
* added tutorial "tuto7" (in [English](https://py-pdf.github.io/fpdf2/Tutorial.html#tuto-7-creating-pdfa-documents) and [German](https://py-pdf.github.io/fpdf2/Tutorial-de.html#tuto-7-ein-pdfa-dokument-erstellen)) with documentation to create PDF/A files with fpdf2
22
-
* support for [Output Intents](https://py-pdf.github.io/fpdf2/Images.html#output-intents) on document level
21
+
* added tutorial "tuto7" (in [English](https://py-pdf.github.io/fpdf2/Tutorial.html#tuto-7-creating-pdfa-documents) and [German](https://py-pdf.github.io/fpdf2/Tutorial-de.html#tuto-7-ein-pdfa-dokument-erstellen)) with documentation to create PDF/A files with fpdf2 - thanks to @lka
22
+
* support for [Output Intents](https://py-pdf.github.io/fpdf2/Images.html#output-intents) on document level - thanks to @lka
23
23
* support for [shading patterns (gradients)](https://py-pdf.github.io/fpdf2/Patterns.html) - thanks to @andersonhc - [PR #1334](https://github.com/py-pdf/fpdf2/pull/1334)
24
24
* support for [setting a minimal row height in tables](https://py-pdf.github.io/fpdf2/Tables.html#setting-row-height)
25
25
* support for [`v_align` at the row level in tables](https://py-pdf.github.io/fpdf2/Tables.html#setting-vertical-alignment-of-text-in-cells)
26
26
* new optional `reset_page_indices` parameter for [`insert_toc_placeholder()`](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.insert_toc_placeholder)
27
27
* support for <s>strikethrough text</s>
28
28
* new [ViewerPreferences.print_scaling](https://py-pdf.github.io/fpdf2/fpdf/prefs.html#fpdf.prefs.ViewerPreferences.print_scaling)
29
29
* documentation on [verifying provenance of `fpdf2` releases](https://py-pdf.github.io/fpdf2/#verifying-provenance)
30
-
* documentation on [`fpdf2` internals](https://py-pdf.github.io/fpdf2/Internals.html)### Added
30
+
* documentation on [`fpdf2` internals](https://py-pdf.github.io/fpdf2/Internals.html)
31
31
* added Slovenian translation of the tutorial: [Vodič](https://py-pdf.github.io/fpdf2/Tutorial-sl.html) - thanks to @DeepBlackHole
32
32
* support for adding TrueType fonts that are missing the `.notdef` glyph - [issue #1161](https://github.com/py-pdf/fpdf2/issues/1161) - thanks to @spacegaori
33
33
* improved SVG image speed by 50% to 70% - thanks to @petri-lipponen-movesense - [PR #1350](https://github.com/py-pdf/fpdf2/pull/1350)
-[`set_xmp_metadata()`](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.set_xmp_metadata), that requires you to craft the necessary XML string
19
19
20
20
For a more user-friendly API to set metadata,
21
21
we recommend using [`pikepdf`](https://github.com/pikepdf/pikepdf/) that will set both XMP & `DocumentInformation` metadata:
Copy file name to clipboardexpand all lines: docs/Tutorial-de.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -236,6 +236,6 @@ pdf.create_pdf_with_metadata(
236
236
237
237
Dabei benutzen wir pikepdf um die nötigen Metadata zu erzeugen und den Typen auf PDF/A-3B zu setzen.
238
238
239
-
In der Funktion `create_pdf_with_metadata` setzen wir 'language' und 'subject' ausserhalb der Metadata bevor wir pikepdf aufrufen um, die Konformität zu erreichen.
239
+
In der Funktion `create_pdf_with_metadata` setzen wir `language` und `subject` ausserhalb der Metadata bevor wir pikepdf aufrufen um, die Konformität zu erreichen.
240
240
241
241
Bitte benutzen Sie ein Programm, wie z.B. [VeraPDF](https://verapdf.org/), um die Konformität des erstellten PDF zu sicherzustellen.
After adding first page, using the embedded font, writing some text, we'll create the pdf:
270
-
```python
271
-
pdf.create_pdf_with_metadata(
272
-
filename="tuto7.pdf",
273
-
language="en-US",
274
-
title="Tutorial7",
275
-
subject="Example for PDFA",
276
-
creator=["John Dow", "Jane Dow"],
277
-
description="this is my description of this file",
278
-
keywords="Example Tutorial7"
279
-
)
280
-
```
281
-
282
-
Here we use [pikepdf](https://pypi.org/project/pikepdf/) to create the necessary metadata and set the type to PDF/A-3B.
269
+
After adding some pages, using the embedded fonts, and writing some text,
270
+
we create the pdf by calling `create_pdf_with_metadata()`,
271
+
that uses [pikepdf](https://pypi.org/project/pikepdf/)
272
+
to create the necessary metadata and set the type to PDF/A-3B.
283
273
284
-
In the function `create_pdf_with_metadata` we need to set 'language' and 'subject' outside the metadata before we use `pikepdf` to achieve conformance.
274
+
For information on PDF metadata, check the dedicated documentation page: [Metadata](Metadata.md).
285
275
286
276
Note that instead of using a function, you could also subclass `FPDF.output()` to ensure that all your documents are PDF-A compliant, as done in [test/pdf-a/test_pdf_a.py](https://github.com/py-pdf/fpdf2/blob/master/test/pdf-a/test_pdf_a.py).
0 commit comments