|
85 | 85 | PdfFlattenAnnotationsPayload, |
86 | 86 | PdfFlattenFormsPayload, |
87 | 87 | PdfFlattenTransparenciesPayload, |
| 88 | + PdfImportFormDataPayload, |
88 | 89 | PdfInfoPayload, |
89 | 90 | PdfLinearizePayload, |
90 | 91 | PdfMergePayload, |
@@ -2658,6 +2659,33 @@ def convert_to_word( |
2658 | 2659 | timeout=timeout, |
2659 | 2660 | ) |
2660 | 2661 |
|
| 2662 | + def import_form_data( |
| 2663 | + self, |
| 2664 | + file: PdfRestFile | Sequence[PdfRestFile], |
| 2665 | + data_file: PdfRestFile | Sequence[PdfRestFile], |
| 2666 | + *, |
| 2667 | + output: str | None = None, |
| 2668 | + extra_query: Query | None = None, |
| 2669 | + extra_headers: AnyMapping | None = None, |
| 2670 | + extra_body: Body | None = None, |
| 2671 | + timeout: TimeoutTypes | None = None, |
| 2672 | + ) -> PdfRestFileBasedResponse: |
| 2673 | + """Import form data from a data file into an existing PDF with form fields.""" |
| 2674 | + |
| 2675 | + payload: dict[str, Any] = {"files": file, "data_file": data_file} |
| 2676 | + if output is not None: |
| 2677 | + payload["output"] = output |
| 2678 | + |
| 2679 | + return self._post_file_operation( |
| 2680 | + endpoint="/pdf-with-imported-form-data", |
| 2681 | + payload=payload, |
| 2682 | + payload_model=PdfImportFormDataPayload, |
| 2683 | + extra_query=extra_query, |
| 2684 | + extra_headers=extra_headers, |
| 2685 | + extra_body=extra_body, |
| 2686 | + timeout=timeout, |
| 2687 | + ) |
| 2688 | + |
2661 | 2689 | def flatten_pdf_forms( |
2662 | 2690 | self, |
2663 | 2691 | file: PdfRestFile | Sequence[PdfRestFile], |
@@ -3700,6 +3728,33 @@ async def convert_to_word( |
3700 | 3728 | timeout=timeout, |
3701 | 3729 | ) |
3702 | 3730 |
|
| 3731 | + async def import_form_data( |
| 3732 | + self, |
| 3733 | + file: PdfRestFile | Sequence[PdfRestFile], |
| 3734 | + data_file: PdfRestFile | Sequence[PdfRestFile], |
| 3735 | + *, |
| 3736 | + output: str | None = None, |
| 3737 | + extra_query: Query | None = None, |
| 3738 | + extra_headers: AnyMapping | None = None, |
| 3739 | + extra_body: Body | None = None, |
| 3740 | + timeout: TimeoutTypes | None = None, |
| 3741 | + ) -> PdfRestFileBasedResponse: |
| 3742 | + """Asynchronously import form data from a data file into a PDF.""" |
| 3743 | + |
| 3744 | + payload: dict[str, Any] = {"files": file, "data_file": data_file} |
| 3745 | + if output is not None: |
| 3746 | + payload["output"] = output |
| 3747 | + |
| 3748 | + return await self._post_file_operation( |
| 3749 | + endpoint="/pdf-with-imported-form-data", |
| 3750 | + payload=payload, |
| 3751 | + payload_model=PdfImportFormDataPayload, |
| 3752 | + extra_query=extra_query, |
| 3753 | + extra_headers=extra_headers, |
| 3754 | + extra_body=extra_body, |
| 3755 | + timeout=timeout, |
| 3756 | + ) |
| 3757 | + |
3703 | 3758 | async def flatten_pdf_forms( |
3704 | 3759 | self, |
3705 | 3760 | file: PdfRestFile | Sequence[PdfRestFile], |
|
0 commit comments