5252 "PdfSignatureCredentials" ,
5353 "PdfSignatureDisplay" ,
5454 "PdfSignatureLocation" ,
55+ "PdfSignaturePoint" ,
5556 "PdfTextColor" ,
5657 "PdfXType" ,
5758 "PngColorModel" ,
6465 "WatermarkVerticalAlignment" ,
6566)
6667
67- #: Supported query keys for :meth:`pdfrest.PdfRestClient.query_pdf_info` and
68- #: :meth:`pdfrest.AsyncPdfRestClient.query_pdf_info`.
68+ #: Supported query keys for
69+ #: [PdfRestClient.query_pdf_info][pdfrest.PdfRestClient.query_pdf_info] and
70+ #: [AsyncPdfRestClient.query_pdf_info][pdfrest.AsyncPdfRestClient.query_pdf_info].
6971PdfInfoQuery = Literal [
7072 "tagged" ,
7173 "image_only" ,
104106 tuple [PdfInfoQuery , ...], get_args (PdfInfoQuery )
105107)
106108
107- #: Redaction match mode used by :class:` PdfRedactionInstruction` .
109+ #: Redaction match mode used by [ PdfRedactionInstruction][] .
108110PdfRedactionType = Literal ["literal" , "regex" , "preset" ]
109111
110112#: Built-in redaction presets accepted by pdfRest.
@@ -169,6 +171,13 @@ class PdfAddTextObject(TypedDict, total=False):
169171
170172
171173class PdfCustomPageSize (TypedDict ):
174+ """Custom page dimensions for page-size aware conversions.
175+
176+ Attributes:
177+ custom_height: Page height in points.
178+ custom_width: Page width in points.
179+ """
180+
172181 custom_height : Required [float ]
173182 custom_width : Required [float ]
174183
@@ -196,17 +205,43 @@ class PdfMergeSource(TypedDict, total=False):
196205
197206
198207class PdfSignaturePoint (TypedDict ):
208+ """Coordinate point used for signature placement in PDF points.
209+
210+ Attributes:
211+ x: Horizontal position in points.
212+ y: Vertical position in points.
213+ """
214+
199215 x : float
200216 y : float
201217
202218
203219class PdfSignatureLocation (TypedDict ):
220+ """Bounding box and page where a signature field should be rendered.
221+
222+ Attributes:
223+ bottom_left: Bottom-left [PdfSignaturePoint][pdfrest.types.PdfSignaturePoint] of the signature rectangle.
224+ top_right: Top-right [PdfSignaturePoint][pdfrest.types.PdfSignaturePoint] of the signature rectangle.
225+ page: One-based page index or ``"all"``.
226+ """
227+
204228 bottom_left : Required [PdfSignaturePoint ]
205229 top_right : Required [PdfSignaturePoint ]
206230 page : Required [str | int ]
207231
208232
209233class PdfSignatureDisplay (TypedDict , total = False ):
234+ """Optional text fields included in visible signature appearances.
235+
236+ Attributes:
237+ include_distinguished_name: Whether to include signer DN text.
238+ include_datetime: Whether to include signing date/time text.
239+ contact: Contact text shown in the visible signature.
240+ location: Location text shown in the visible signature.
241+ name: Signer name text shown in the visible signature.
242+ reason: Signing reason text shown in the visible signature.
243+ """
244+
210245 include_distinguished_name : bool
211246 include_datetime : bool
212247 contact : str
@@ -216,6 +251,16 @@ class PdfSignatureDisplay(TypedDict, total=False):
216251
217252
218253class PdfNewSignatureConfiguration (TypedDict , total = False ):
254+ """Configuration for creating and signing a new signature field.
255+
256+ Attributes:
257+ type: Must be ``"new"``.
258+ location: Placement rectangle and page as [PdfSignatureLocation][pdfrest.types.PdfSignatureLocation].
259+ name: Optional name for the signature field.
260+ logo_opacity: Optional logo opacity in the range ``(0, 1]``.
261+ display: Optional visible-signature settings as [PdfSignatureDisplay][pdfrest.types.PdfSignatureDisplay].
262+ """
263+
219264 type : Required [Literal ["new" ]]
220265 location : Required [PdfSignatureLocation ]
221266 name : str
@@ -224,28 +269,58 @@ class PdfNewSignatureConfiguration(TypedDict, total=False):
224269
225270
226271class PdfExistingSignatureConfiguration (TypedDict , total = False ):
272+ """Configuration for signing an existing signature field.
273+
274+ Attributes:
275+ type: Must be ``"existing"``.
276+ location: Optional placement override as [PdfSignatureLocation][pdfrest.types.PdfSignatureLocation].
277+ name: Optional existing signature field name.
278+ logo_opacity: Optional logo opacity in the range ``(0, 1]``.
279+ display: Optional visible-signature settings as [PdfSignatureDisplay][pdfrest.types.PdfSignatureDisplay].
280+ """
281+
227282 type : Required [Literal ["existing" ]]
228283 location : PdfSignatureLocation
229284 name : str
230285 logo_opacity : float
231286 display : PdfSignatureDisplay
232287
233288
289+ #: Signature placement configuration accepted by
290+ #: [PdfRestClient.sign_pdf][pdfrest.PdfRestClient.sign_pdf] and
291+ #: [AsyncPdfRestClient.sign_pdf][pdfrest.AsyncPdfRestClient.sign_pdf].
234292PdfSignatureConfiguration = (
235293 PdfNewSignatureConfiguration | PdfExistingSignatureConfiguration
236294)
237295
238296
239297class PdfPfxCredentials (TypedDict ):
298+ """Credentials bundle using a PFX/P12 file plus passphrase file.
299+
300+ Attributes:
301+ pfx: Uploaded credentials archive as a [PdfRestFile][pdfrest.models.PdfRestFile].
302+ passphrase: Uploaded text passphrase as a [PdfRestFile][pdfrest.models.PdfRestFile].
303+ """
304+
240305 pfx : Required [PdfRestFile ]
241306 passphrase : Required [PdfRestFile ]
242307
243308
244309class PdfPemCredentials (TypedDict ):
310+ """Credentials bundle using certificate and private key uploads.
311+
312+ Attributes:
313+ certificate: Uploaded certificate as a [PdfRestFile][pdfrest.models.PdfRestFile].
314+ private_key: Uploaded private key as a [PdfRestFile][pdfrest.models.PdfRestFile].
315+ """
316+
245317 certificate : Required [PdfRestFile ]
246318 private_key : Required [PdfRestFile ]
247319
248320
321+ #: Credentials accepted by
322+ #: [PdfRestClient.sign_pdf][pdfrest.PdfRestClient.sign_pdf] and
323+ #: [AsyncPdfRestClient.sign_pdf][pdfrest.AsyncPdfRestClient.sign_pdf].
249324PdfSignatureCredentials = PdfPfxCredentials | PdfPemCredentials
250325
251326#: PDF/A conformance targets accepted by ``convert_to_pdfa``.
0 commit comments