Skip to content

Commit 04a24fc

Browse files
docs: Add API guide and update site navigation
- Added `api-guide.md` to provide an organized overview of `PdfRestClient` and `AsyncPdfRestClient` methods, grouped by workflow and functionality. - Updated `index.md` to include a link to the new API guide. - Modified `mkdocs.yml` to reflect the updated navigation structure. Assisted-by: Codex
1 parent 341a2b7 commit 04a24fc

3 files changed

Lines changed: 166 additions & 0 deletions

File tree

docs/api-guide.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# API guide
2+
3+
This guide organizes `PdfRestClient` and `AsyncPdfRestClient` methods by
4+
workflow, so you can quickly find the right call for a user task.
5+
6+
Notes:
7+
8+
- Every sync method has an async counterpart with the same name.
9+
- Sync client: [PdfRestClient][pdfrest.PdfRestClient]
10+
- Async client: [AsyncPdfRestClient][pdfrest.AsyncPdfRestClient]
11+
12+
## Start here: common flow
13+
14+
1. Upload file(s): [files.create_from_paths][pdfrest.PdfRestFilesClient.create_from_paths]
15+
2. Call one processing method from a category below.
16+
3. Download outputs: [files.read_bytes][pdfrest.PdfRestFilesClient.read_bytes] or
17+
[files.write_bytes][pdfrest.PdfRestFilesClient.write_bytes]
18+
4. (Optional) clean up: [files.delete][pdfrest.PdfRestFilesClient.delete]
19+
20+
## Service and file operations
21+
22+
Use these methods to check service status and manage uploaded resources.
23+
24+
- Health check:
25+
[up][pdfrest.PdfRestClient.up]
26+
- File helper:
27+
[files][pdfrest.PdfRestClient.files]
28+
- File upload and fetch:
29+
[files.create][pdfrest.PdfRestFilesClient.create],
30+
[files.create_from_paths][pdfrest.PdfRestFilesClient.create_from_paths],
31+
[files.create_from_urls][pdfrest.PdfRestFilesClient.create_from_urls],
32+
[files.get][pdfrest.PdfRestFilesClient.get]
33+
- File read/write:
34+
[files.read_bytes][pdfrest.PdfRestFilesClient.read_bytes],
35+
[files.read_text][pdfrest.PdfRestFilesClient.read_text],
36+
[files.read_json][pdfrest.PdfRestFilesClient.read_json],
37+
[files.write_bytes][pdfrest.PdfRestFilesClient.write_bytes],
38+
[files.stream][pdfrest.PdfRestFilesClient.stream]
39+
- File delete:
40+
[files.delete][pdfrest.PdfRestFilesClient.delete]
41+
42+
## Inspect, extract, summarize, and translate
43+
44+
Use this group when users need metadata or text intelligence.
45+
46+
- Metadata and document properties:
47+
[query_pdf_info][pdfrest.PdfRestClient.query_pdf_info]
48+
- OCR and text extraction:
49+
[ocr_pdf][pdfrest.PdfRestClient.ocr_pdf],
50+
[extract_pdf_text][pdfrest.PdfRestClient.extract_pdf_text],
51+
[extract_pdf_text_to_file][pdfrest.PdfRestClient.extract_pdf_text_to_file]
52+
- Image extraction:
53+
[extract_images][pdfrest.PdfRestClient.extract_images]
54+
- Summaries:
55+
[summarize_text][pdfrest.PdfRestClient.summarize_text],
56+
[summarize_text_to_file][pdfrest.PdfRestClient.summarize_text_to_file]
57+
- Translation:
58+
[translate_pdf_text][pdfrest.PdfRestClient.translate_pdf_text],
59+
[translate_pdf_text_to_file][pdfrest.PdfRestClient.translate_pdf_text_to_file]
60+
- Markdown output:
61+
[convert_to_markdown][pdfrest.PdfRestClient.convert_to_markdown]
62+
63+
## Compose, split, merge, and package
64+
65+
Use this group for document assembly and distribution.
66+
67+
- Create or partition documents:
68+
[blank_pdf][pdfrest.PdfRestClient.blank_pdf],
69+
[split_pdf][pdfrest.PdfRestClient.split_pdf]
70+
- Combine documents:
71+
[merge_pdfs][pdfrest.PdfRestClient.merge_pdfs]
72+
- Package/unpackage output sets:
73+
[zip_files][pdfrest.PdfRestClient.zip_files],
74+
[unzip_file][pdfrest.PdfRestClient.unzip_file]
75+
- Embed attachments:
76+
[add_attachment_to_pdf][pdfrest.PdfRestClient.add_attachment_to_pdf]
77+
78+
## Markup, branding, and redaction
79+
80+
Use this group to add visible content or remove sensitive content.
81+
82+
- Add overlays:
83+
[add_text_to_pdf][pdfrest.PdfRestClient.add_text_to_pdf],
84+
[add_image_to_pdf][pdfrest.PdfRestClient.add_image_to_pdf]
85+
- Watermarking:
86+
[watermark_pdf_with_text][pdfrest.PdfRestClient.watermark_pdf_with_text],
87+
[watermark_pdf_with_image][pdfrest.PdfRestClient.watermark_pdf_with_image]
88+
- Redaction workflow:
89+
[preview_redactions][pdfrest.PdfRestClient.preview_redactions] first,
90+
then [apply_redactions][pdfrest.PdfRestClient.apply_redactions]
91+
92+
## Security, signing, and compliance
93+
94+
Use this group for password protection, permissions, signatures, and standards.
95+
96+
- Permissions password:
97+
[add_permissions_password][pdfrest.PdfRestClient.add_permissions_password],
98+
[change_permissions_password][pdfrest.PdfRestClient.change_permissions_password],
99+
[remove_permissions_password][pdfrest.PdfRestClient.remove_permissions_password]
100+
- Open password:
101+
[add_open_password][pdfrest.PdfRestClient.add_open_password],
102+
[change_open_password][pdfrest.PdfRestClient.change_open_password],
103+
[remove_open_password][pdfrest.PdfRestClient.remove_open_password]
104+
- Digital signatures:
105+
[sign_pdf][pdfrest.PdfRestClient.sign_pdf]
106+
- Archival/print conformance:
107+
[convert_to_pdfa][pdfrest.PdfRestClient.convert_to_pdfa],
108+
[convert_to_pdfx][pdfrest.PdfRestClient.convert_to_pdfx]
109+
110+
## PDF cleanup and rendering normalization
111+
112+
Use this group to improve compatibility, performance, or file size.
113+
114+
- Size and optimization:
115+
[compress_pdf][pdfrest.PdfRestClient.compress_pdf],
116+
[linearize_pdf][pdfrest.PdfRestClient.linearize_pdf]
117+
- Flattening:
118+
[flatten_pdf_forms][pdfrest.PdfRestClient.flatten_pdf_forms],
119+
[flatten_annotations][pdfrest.PdfRestClient.flatten_annotations],
120+
[flatten_layers][pdfrest.PdfRestClient.flatten_layers],
121+
[flatten_transparencies][pdfrest.PdfRestClient.flatten_transparencies]
122+
- Raster and color normalization:
123+
[rasterize_pdf][pdfrest.PdfRestClient.rasterize_pdf],
124+
[convert_colors][pdfrest.PdfRestClient.convert_colors]
125+
126+
## Convert into or out of PDF
127+
128+
Use this group when the user starts with non-PDF content or needs downstream
129+
formats.
130+
131+
- Into PDF:
132+
[convert_office_to_pdf][pdfrest.PdfRestClient.convert_office_to_pdf],
133+
[convert_postscript_to_pdf][pdfrest.PdfRestClient.convert_postscript_to_pdf],
134+
[convert_email_to_pdf][pdfrest.PdfRestClient.convert_email_to_pdf],
135+
[convert_image_to_pdf][pdfrest.PdfRestClient.convert_image_to_pdf],
136+
[convert_html_to_pdf][pdfrest.PdfRestClient.convert_html_to_pdf],
137+
[convert_url_to_pdf][pdfrest.PdfRestClient.convert_url_to_pdf]
138+
- Out of PDF:
139+
[convert_to_word][pdfrest.PdfRestClient.convert_to_word],
140+
[convert_to_excel][pdfrest.PdfRestClient.convert_to_excel],
141+
[convert_to_powerpoint][pdfrest.PdfRestClient.convert_to_powerpoint],
142+
[convert_xfa_to_acroforms][pdfrest.PdfRestClient.convert_xfa_to_acroforms]
143+
- PDF to image:
144+
[convert_to_png][pdfrest.PdfRestClient.convert_to_png],
145+
[convert_to_bmp][pdfrest.PdfRestClient.convert_to_bmp],
146+
[convert_to_gif][pdfrest.PdfRestClient.convert_to_gif],
147+
[convert_to_jpeg][pdfrest.PdfRestClient.convert_to_jpeg],
148+
[convert_to_tiff][pdfrest.PdfRestClient.convert_to_tiff]
149+
150+
## Forms data workflows
151+
152+
Use this group when users need to transfer form field values in/out of PDFs.
153+
154+
- Import external form data into a PDF:
155+
[import_form_data][pdfrest.PdfRestClient.import_form_data]
156+
- Export form data from a PDF:
157+
[export_form_data][pdfrest.PdfRestClient.export_form_data]
158+
159+
## Async equivalents
160+
161+
For any sync method listed above, use the same method name on
162+
[AsyncPdfRestClient][pdfrest.AsyncPdfRestClient] when your app is async. For
163+
file helpers, use
164+
[AsyncPdfRestFilesClient][pdfrest.AsyncPdfRestFilesClient].

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Useful references:
1919
- [Getting started guide](getting-started.md)
2020
- [Client configuration guide](client-configuration.md)
2121
- [Using files guide](using-files.md)
22+
- [API guide](api-guide.md)
2223

2324
## How this Python API relates to pdfRest
2425

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ nav:
4040
- Getting Started: getting-started.md
4141
- Client Configuration: client-configuration.md
4242
- Using Files: using-files.md
43+
- API Guide: api-guide.md
4344
- API Reference: api-reference.md

0 commit comments

Comments
 (0)