|
82 | 82 | GifPdfRestPayload, |
83 | 83 | JpegPdfRestPayload, |
84 | 84 | OcrPdfPayload, |
| 85 | + PdfBlankPayload, |
85 | 86 | PdfCompressPayload, |
86 | 87 | PdfDecryptPayload, |
87 | 88 | PdfEncryptPayload, |
|
123 | 124 | PdfAType, |
124 | 125 | PdfInfoQuery, |
125 | 126 | PdfMergeInput, |
| 127 | + PdfPageOrientation, |
126 | 128 | PdfPageSelection, |
| 129 | + PdfPageSize, |
127 | 130 | PdfRedactionInstruction, |
128 | 131 | PdfRestriction, |
129 | 132 | PdfRGBColor, |
@@ -2973,6 +2976,45 @@ def compress_pdf( |
2973 | 2976 | timeout=timeout, |
2974 | 2977 | ) |
2975 | 2978 |
|
| 2979 | + def blank_pdf( |
| 2980 | + self, |
| 2981 | + *, |
| 2982 | + page_size: PdfPageSize, |
| 2983 | + page_count: int, |
| 2984 | + page_orientation: PdfPageOrientation | None = None, |
| 2985 | + custom_height: float | None = None, |
| 2986 | + custom_width: float | None = None, |
| 2987 | + output: str | None = None, |
| 2988 | + extra_query: Query | None = None, |
| 2989 | + extra_headers: AnyMapping | None = None, |
| 2990 | + extra_body: Body | None = None, |
| 2991 | + timeout: TimeoutTypes | None = None, |
| 2992 | + ) -> PdfRestFileBasedResponse: |
| 2993 | + """Create a blank PDF with the specified size, count, and orientation.""" |
| 2994 | + |
| 2995 | + payload: dict[str, Any] = { |
| 2996 | + "page_size": page_size, |
| 2997 | + "page_count": page_count, |
| 2998 | + } |
| 2999 | + if page_orientation is not None: |
| 3000 | + payload["page_orientation"] = page_orientation |
| 3001 | + if custom_height is not None: |
| 3002 | + payload["custom_height"] = custom_height |
| 3003 | + if custom_width is not None: |
| 3004 | + payload["custom_width"] = custom_width |
| 3005 | + if output is not None: |
| 3006 | + payload["output"] = output |
| 3007 | + |
| 3008 | + return self._post_file_operation( |
| 3009 | + endpoint="/blank-pdf", |
| 3010 | + payload=payload, |
| 3011 | + payload_model=PdfBlankPayload, |
| 3012 | + extra_query=extra_query, |
| 3013 | + extra_headers=extra_headers, |
| 3014 | + extra_body=extra_body, |
| 3015 | + timeout=timeout, |
| 3016 | + ) |
| 3017 | + |
2976 | 3018 | def flatten_transparencies( |
2977 | 3019 | self, |
2978 | 3020 | file: PdfRestFile | Sequence[PdfRestFile], |
@@ -4260,6 +4302,45 @@ async def compress_pdf( |
4260 | 4302 | timeout=timeout, |
4261 | 4303 | ) |
4262 | 4304 |
|
| 4305 | + async def blank_pdf( |
| 4306 | + self, |
| 4307 | + *, |
| 4308 | + page_size: PdfPageSize, |
| 4309 | + page_count: int, |
| 4310 | + page_orientation: PdfPageOrientation | None = None, |
| 4311 | + custom_height: float | None = None, |
| 4312 | + custom_width: float | None = None, |
| 4313 | + output: str | None = None, |
| 4314 | + extra_query: Query | None = None, |
| 4315 | + extra_headers: AnyMapping | None = None, |
| 4316 | + extra_body: Body | None = None, |
| 4317 | + timeout: TimeoutTypes | None = None, |
| 4318 | + ) -> PdfRestFileBasedResponse: |
| 4319 | + """Asynchronously create a blank PDF with the specified size.""" |
| 4320 | + |
| 4321 | + payload: dict[str, Any] = { |
| 4322 | + "page_size": page_size, |
| 4323 | + "page_count": page_count, |
| 4324 | + } |
| 4325 | + if page_orientation is not None: |
| 4326 | + payload["page_orientation"] = page_orientation |
| 4327 | + if custom_height is not None: |
| 4328 | + payload["custom_height"] = custom_height |
| 4329 | + if custom_width is not None: |
| 4330 | + payload["custom_width"] = custom_width |
| 4331 | + if output is not None: |
| 4332 | + payload["output"] = output |
| 4333 | + |
| 4334 | + return await self._post_file_operation( |
| 4335 | + endpoint="/blank-pdf", |
| 4336 | + payload=payload, |
| 4337 | + payload_model=PdfBlankPayload, |
| 4338 | + extra_query=extra_query, |
| 4339 | + extra_headers=extra_headers, |
| 4340 | + extra_body=extra_body, |
| 4341 | + timeout=timeout, |
| 4342 | + ) |
| 4343 | + |
4263 | 4344 | async def flatten_transparencies( |
4264 | 4345 | self, |
4265 | 4346 | file: PdfRestFile | Sequence[PdfRestFile], |
|
0 commit comments