Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Update tool models to fix main (#7725)

James Brunton658aa54c2044
diff --git a/engine/src/stirling/models/tool_models.py b/engine/src/stirling/models/tool_models.py
index 6650942b6f..dff977a7f7 100644
--- a/engine/src/stirling/models/tool_models.py
+++ b/engine/src/stirling/models/tool_models.py
@@ -725,6 +725,9 @@ class OcrPdfParams(ApiModel):
)
ocr_type: OcrType = Field(..., description="Specify the OCR type, e.g., 'skip-text', 'force-ocr', or 'Normal'")
remove_images_after: bool | None = Field(None, description="Remove images from the output PDF if set to true")
+ rotate_pages: bool | None = Field(
+ None, description="Auto-correct page orientation (90/180/270) using Tesseract OSD if set to true"
+ )
sidecar: bool | None = Field(None, description="Include OCR text in a sidecar text file if set to true")
diff --git a/frontend/editor/src/core/types/toolApiTypes.ts b/frontend/editor/src/core/types/toolApiTypes.ts
index 55938d231e..d980029624 100644
--- a/frontend/editor/src/core/types/toolApiTypes.ts
+++ b/frontend/editor/src/core/types/toolApiTypes.ts
@@ -1022,6 +1022,10 @@ export interface ProcessPdfWithOcrRequest {
* Remove images from the output PDF if set to true
*/
removeImagesAfter?: boolean;
+ /**
+ * Auto-correct page orientation (90/180/270) using Tesseract OSD if set to true
+ */
+ rotatePages?: boolean;
/**
* Include OCR text in a sidecar text file if set to true
*/