Skip to content

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

Remove Scanner Effect from the frontend (#8146)

Anthony Stirling59dd084e1c35
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/service/ToolKeyRegistry.java b/app/proprietary/src/main/java/stirling/software/proprietary/service/ToolKeyRegistry.java
index 37c02298f2..f828dd4c2d 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/service/ToolKeyRegistry.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/service/ToolKeyRegistry.java
@@ -43,7 +43,6 @@ public class ToolKeyRegistry {
"annotate",
"scannerImageSplit",
"editTableOfContents",
- "scannerEffect",
"autoRename",
"pageLayout",
"scalePages",
diff --git a/frontend/editor/public/locales/en-US/translation.toml b/frontend/editor/public/locales/en-US/translation.toml
index a38246a5f0..7008964460 100644
--- a/frontend/editor/public/locales/en-US/translation.toml
+++ b/frontend/editor/public/locales/en-US/translation.toml
@@ -5486,11 +5486,6 @@ desc = "Change the size/scale of a page and/or its contents."
tags = "resize,adjust,scale,page size,resize page,scale page,change size,adjust size,enlarge,shrink page,fit to page,A4,letter size"
title = "Adjust page size/scale"
-[home.scannerEffect]
-desc = "Create a PDF that looks like it was scanned"
-tags = "scan,simulate,create,fake scan,look scanned,scanner effect,make look scanned,photocopy effect,simulate scanner,realistic scan"
-title = "Scanner Effect"
-
[home.scannerImageSplit]
desc = "Detect and split scanned photos into separate pages"
tags = "detect,split,photos,auto detect,detect photos,split photos,separate photos,split scanned images,multiple photos,auto split,photo detection,image detection,scan separation"
diff --git a/frontend/editor/public/og-metadata.json b/frontend/editor/public/og-metadata.json
index 5537aa0883..d5b01d2e01 100644
--- a/frontend/editor/public/og-metadata.json
+++ b/frontend/editor/public/og-metadata.json
@@ -120,11 +120,6 @@
"title": "Edit PDF Bookmarks - Stirling PDF",
"description": "Add or edit bookmarks and table of contents in PDF documents"
},
- "scannerEffect": {
- "image": "/og_images/scanner-effect.png",
- "title": "Make a PDF Look Scanned - Stirling PDF",
- "description": "Create a PDF that looks like it was scanned"
- },
"autoRename": {
"image": "/og_images/auto-rename-pdf-file.png",
"title": "Auto Rename PDF Files - Stirling PDF",
@@ -798,7 +793,6 @@
"/annotate": "annotate",
"/scanner-image-split": "scannerImageSplit",
"/edit-table-of-contents": "editTableOfContents",
- "/scanner-effect": "scannerEffect",
"/auto-rename": "autoRename",
"/page-layout": "pageLayout",
"/scale-pages": "scalePages",
@@ -868,7 +862,6 @@
"/auto-split-pdf": "split",
"/auto-size-split-pdf": "split",
"/annotations": "annotate",
- "/fake-scan": "scannerEffect",
"/replace-color-pdf": "replaceColor",
"/show-js": "showJS",
"/pdf-organizer": "reorganizePages",
@@ -953,7 +946,6 @@
},
"canonicalByPath": {
"/annotate": "/annotations",
- "/scanner-effect": "/fake-scan",
"/pdf-to-single-page": "/single-large-page",
"/remove-cert-sign": "/remove-certificate-sign",
"/unlock-p-d-f-forms": "/unlock-pdf-forms",
@@ -1120,10 +1112,6 @@
"path": "/img-to-pdf",
"label": "Image to PDF Converter"
},
- {
- "path": "/fake-scan",
- "label": "Make a PDF Look Scanned"
- },
{
"path": "/markdown-to-pdf",
"label": "Markdown to PDF Converter"
diff --git a/frontend/editor/public/og-metadata.saas.json b/frontend/editor/public/og-metadata.saas.json
index e6d1f52dfb..66ce676e3c 100644
--- a/frontend/editor/public/og-metadata.saas.json
+++ b/frontend/editor/public/og-metadata.saas.json
@@ -121,11 +121,6 @@
"title": "Edit PDF Bookmarks - Stirling PDF",
"description": "Add or edit bookmarks and table of contents in PDF documents"
},
- "scannerEffect": {
- "image": "/og_images/scanner-effect.png",
- "title": "Make a PDF Look Scanned - Stirling PDF",
- "description": "Create a PDF that looks like it was scanned"
- },
"autoRename": {
"image": "/og_images/auto-rename-pdf-file.png",
"title": "Auto Rename PDF Files - Stirling PDF",
@@ -806,7 +801,6 @@
"/annotate": "annotate",
"/scanner-image-split": "scannerImageSplit",
"/edit-table-of-contents": "editTableOfContents",
- "/scanner-effect": "scannerEffect",
"/auto-rename": "autoRename",
"/page-layout": "pageLayout",
"/scale-pages": "scalePages",
@@ -876,7 +870,6 @@
"/auto-split-pdf": "split",
"/auto-size-split-pdf": "split",
"/annotations": "annotate",
- "/fake-scan": "scannerEffect",
"/replace-color-pdf": "replaceColor",
"/show-js": "showJS",
"/pdf-organizer": "reorganizePages",
@@ -962,7 +955,6 @@
},
"canonicalByPath": {
"/annotate": "/annotations",
- "/scanner-effect": "/fake-scan",
"/pdf-to-single-page": "/single-large-page",
"/remove-cert-sign": "/remove-certificate-sign",
"/unlock-p-d-f-forms": "/unlock-pdf-forms",
@@ -1129,10 +1121,6 @@
"path": "/img-to-pdf",
"label": "Image to PDF Converter"
},
- {
- "path": "/fake-scan",
- "label": "Make a PDF Look Scanned"
- },
{
"path": "/markdown-to-pdf",
"label": "Markdown to PDF Converter"
diff --git a/frontend/editor/public/og_images/scanner-effect.png b/frontend/editor/public/og_images/scanner-effect.png
deleted file mode 100644
index c6c5581ace..0000000000
Binary files a/frontend/editor/public/og_images/scanner-effect.png and /dev/null differ
diff --git a/frontend/editor/scripts/generate-og-metadata.mjs b/frontend/editor/scripts/generate-og-metadata.mjs
index 0ff62d6306..d87221436a 100644
--- a/frontend/editor/scripts/generate-og-metadata.mjs
+++ b/frontend/editor/scripts/generate-og-metadata.mjs
@@ -189,7 +189,6 @@ const TOOL_SEO_TITLES = {
read: "PDF Viewer",
annotate: "Annotate PDF",
automate: "PDF Workflow Automation",
- scannerEffect: "Make a PDF Look Scanned",
scannerImageSplit: "Split Scanned Photos",
autoRename: "Auto Rename PDF Files",
bookletImposition: "Create a PDF Booklet",
diff --git a/frontend/editor/src/core/data/ogImageMap.json b/frontend/editor/src/core/data/ogImageMap.json
index 04d0275a1e..11868c2fcb 100644
--- a/frontend/editor/src/core/data/ogImageMap.json
+++ b/frontend/editor/src/core/data/ogImageMap.json
@@ -21,7 +21,6 @@
"annotate": "annotate",
"scannerImageSplit": "detect-split-scanned-photos",
"editTableOfContents": "edit-table-of-contents",
- "scannerEffect": "scanner-effect",
"autoRename": "auto-rename-pdf-file",
"pageLayout": "multi-page-layout",
"scalePages": "adjust-page-size-scale",
diff --git a/frontend/editor/src/core/data/urlSeoOverrides.json b/frontend/editor/src/core/data/urlSeoOverrides.json
index 094fcc8e6c..03b9e9a354 100644
--- a/frontend/editor/src/core/data/urlSeoOverrides.json
+++ b/frontend/editor/src/core/data/urlSeoOverrides.json
@@ -367,14 +367,6 @@
"title": "PDF Workflow Automation",
"description": "Build multi-step workflows by chaining together PDF actions. Ideal for recurring tasks."
},
- "/scanner-effect": {
- "title": "Make a PDF Look Scanned",
- "description": "Create a PDF that looks like it was scanned"
- },
- "/fake-scan": {
- "title": "Make a PDF Look Scanned",
- "description": "Create a PDF that looks like it was scanned"
- },
"/scanner-image-split": {
"title": "Split Scanned Photos",
"description": "Detect and split scanned photos into separate pages"
diff --git a/frontend/editor/src/core/data/useTranslatedToolRegistry.tsx b/frontend/editor/src/core/data/useTranslatedToolRegistry.tsx
index d4c18a46cf..350969f940 100644
--- a/frontend/editor/src/core/data/useTranslatedToolRegistry.tsx
+++ b/frontend/editor/src/core/data/useTranslatedToolRegistry.tsx
@@ -1025,23 +1025,6 @@ export function useTranslatedToolCatalog(): TranslatedToolCatalog {
),
synonyms: getSynonyms(t, "replaceColor"),
},
- scannerEffect: {
- icon: <Icon name="scan-line" size="1.5rem" />,
- name: t("home.scannerEffect.title", "Scanner Effect"),
- component: null,
- description: t(
- "home.scannerEffect.desc",
- "Create a PDF that looks like it was scanned",
- ),
- categoryId: ToolCategoryId.ADVANCED_TOOLS,
- subcategoryId: SubcategoryId.ADVANCED_FORMATTING,
- endpoints: ["scanner-effect"],
- synonyms: getSynonyms(t, "scannerEffect"),
- // No frontend implementation yet (component is null), so it has no
- // operationConfig to execute as an automation step.
- supportsAutomate: false,
- automationSettings: null,
- },
// Developer Tools
diff --git a/frontend/editor/src/core/tests/stubbed/all-tool-pages-load.spec.ts b/frontend/editor/src/core/tests/stubbed/all-tool-pages-load.spec.ts
index bb104a32c4..38d19aca86 100644
--- a/frontend/editor/src/core/tests/stubbed/all-tool-pages-load.spec.ts
+++ b/frontend/editor/src/core/tests/stubbed/all-tool-pages-load.spec.ts
@@ -42,7 +42,6 @@ const TOOL_IDS = [
"annotate",
"scannerImageSplit",
"editTableOfContents",
- "scannerEffect",
"autoRename",
"pageLayout",
"scalePages",
diff --git a/frontend/editor/src/core/types/toolId.ts b/frontend/editor/src/core/types/toolId.ts
index 963bed1452..6d210681a1 100644
--- a/frontend/editor/src/core/types/toolId.ts
+++ b/frontend/editor/src/core/types/toolId.ts
@@ -35,7 +35,6 @@ export const CORE_REGULAR_TOOL_IDS = [
"annotate",
"scannerImageSplit",
"editTableOfContents",
- "scannerEffect",
"autoRename",
"pageLayout",
"scalePages",
diff --git a/frontend/editor/src/core/utils/toolSearch.test.ts b/frontend/editor/src/core/utils/toolSearch.test.ts
index 8c1b81a732..12ecaec5ff 100644
--- a/frontend/editor/src/core/utils/toolSearch.test.ts
+++ b/frontend/editor/src/core/utils/toolSearch.test.ts
@@ -35,10 +35,6 @@ const registry: Partial<ToolRegistry> = {
"Change Metadata",
"edit,modify,update,metadata,properties,document properties,author,title,subject,keywords,creator,producer,info,document info,file properties",
),
- scannerEffect: makeEntry(
- "Scanner Effect",
- "scan,simulate,create,fake scan,look scanned,scanner effect,make look scanned,photocopy effect,simulate scanner,realistic scan",
- ),
adjustContrast: makeEntry(
"Adjust Colours/Contrast",
"contrast,brightness,saturation,adjust colors,color correction,enhance,lighten,darken,improve quality,color balance,hue,vibrance",
diff --git a/frontend/editor/src/core/utils/urlMapping.ts b/frontend/editor/src/core/utils/urlMapping.ts
index 3a4d6f61af..67328c8ab2 100644
--- a/frontend/editor/src/core/utils/urlMapping.ts
+++ b/frontend/editor/src/core/utils/urlMapping.ts
@@ -81,7 +81,6 @@ export const URL_TO_TOOL_MAP: Record<string, ToolId> = {
// Image and visual tools
"/extract-images": "extractImages",
"/adjust-contrast": "adjustContrast",
- "/fake-scan": "scannerEffect",
"/replace-color-pdf": "replaceColor",
// Metadata and info
@@ -129,7 +128,6 @@ export const URL_TO_TOOL_MAP: Record<string, ToolId> = {
"/pipeline": "automate",
"/extract-image-scans": "scannerImageSplit",
"/show-javascript": "showJS",
- "/scanner-effect": "scannerEffect",
"/split-by-size-or-count": "split",
"/overlay-pdf": "overlayPdfs",
"/split-pdf-by-sections": "split",
diff --git a/frontend/editor/src/portal/data/ops.ts b/frontend/editor/src/portal/data/ops.ts
index e529eaab06..1d40cd4833 100644
--- a/frontend/editor/src/portal/data/ops.ts
+++ b/frontend/editor/src/portal/data/ops.ts
@@ -800,14 +800,6 @@ export const LIBRARY_OPS: readonly LibraryOp[] = [
category: "Advanced Formatting",
desc: "Edit the table of contents / bookmarks",
},
- {
- id: "scanner-effect",
- label: "Scanner effect",
- icon: "penTool",
- kind: "modify",
- category: "Page Formatting",
- desc: "Apply a scanned-document visual effect",
- },
{
id: "invert-colors",
label: "Invert colors",
diff --git a/frontend/editor/src/proprietary/utils/creditCosts.ts b/frontend/editor/src/proprietary/utils/creditCosts.ts
index b9f51ca380..d37f5cf12e 100644
--- a/frontend/editor/src/proprietary/utils/creditCosts.ts
+++ b/frontend/editor/src/proprietary/utils/creditCosts.ts
@@ -72,7 +72,6 @@ export const TOOL_CREDIT_COSTS: Partial<Record<ToolId, number>> = {
pageLayout: CREDIT_COSTS.MEDIUM,
redact: CREDIT_COSTS.MEDIUM,
removeCertSign: CREDIT_COSTS.MEDIUM,
- scannerEffect: CREDIT_COSTS.MEDIUM,
replaceColor: CREDIT_COSTS.MEDIUM,
annotate: CREDIT_COSTS.MEDIUM,
formFill: CREDIT_COSTS.MEDIUM,