Booklet and server sign (#4371)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: a <a>
Co-authored-by: ConnorYoh <40631091+ConnorYoh@users.noreply.github.com>
Co-authored-by: Reece Browne <74901996+reecebrowne@users.noreply.github.com>
This commit is contained in:
Anthony Stirling
2025-09-23 11:24:48 +01:00
committed by GitHub
parent c76edebf0f
commit 46a4a978fc
36 changed files with 2447 additions and 61 deletions

View File

@@ -0,0 +1,57 @@
import { useTranslation } from 'react-i18next';
import { TooltipContent } from '../../types/tips';
export const useBookletImpositionTips = (): TooltipContent => {
const { t } = useTranslation();
return {
header: {
title: t("bookletImposition.tooltip.header.title", "Booklet Creation Guide")
},
tips: [
{
title: t("bookletImposition.tooltip.description.title", "What is Booklet Imposition?"),
description: t("bookletImposition.tooltip.description.text", "Creates professional booklets by arranging pages in the correct printing order. Your PDF pages are placed 2-up on landscape sheets so when folded and bound, they read in proper sequence like a real book.")
},
{
title: t("bookletImposition.tooltip.example.title", "Example: 8-Page Booklet"),
description: t("bookletImposition.tooltip.example.text", "Your 8-page document becomes 2 sheets:"),
bullets: [
t("bookletImposition.tooltip.example.bullet1", "Sheet 1 Front: Pages 8, 1 | Back: Pages 2, 7"),
t("bookletImposition.tooltip.example.bullet2", "Sheet 2 Front: Pages 6, 3 | Back: Pages 4, 5"),
t("bookletImposition.tooltip.example.bullet3", "When folded & stacked: Reads 1→2→3→4→5→6→7→8")
]
},
{
title: t("bookletImposition.tooltip.printing.title", "How to Print & Assemble"),
description: t("bookletImposition.tooltip.printing.text", "Follow these steps for perfect booklets:"),
bullets: [
t("bookletImposition.tooltip.printing.bullet1", "Print double-sided with 'Flip on long edge'"),
t("bookletImposition.tooltip.printing.bullet2", "Stack sheets in order, fold in half"),
t("bookletImposition.tooltip.printing.bullet3", "Staple or bind along the folded spine"),
t("bookletImposition.tooltip.printing.bullet4", "For short-edge printers: Enable 'Flip on short edge' option")
]
},
{
title: t("bookletImposition.tooltip.manualDuplex.title", "Manual Duplex (Single-sided Printers)"),
description: t("bookletImposition.tooltip.manualDuplex.text", "For printers without automatic duplex:"),
bullets: [
t("bookletImposition.tooltip.manualDuplex.bullet1", "Turn OFF 'Double-sided printing'"),
t("bookletImposition.tooltip.manualDuplex.bullet2", "Select '1st Pass' → Print → Stack face-down"),
t("bookletImposition.tooltip.manualDuplex.bullet3", "Select '2nd Pass' → Load stack → Print backs"),
t("bookletImposition.tooltip.manualDuplex.bullet4", "Fold and assemble as normal")
]
},
{
title: t("bookletImposition.tooltip.advanced.title", "Advanced Options"),
description: t("bookletImposition.tooltip.advanced.text", "Fine-tune your booklet:"),
bullets: [
t("bookletImposition.tooltip.advanced.bullet1", "Right-to-Left Binding: For Arabic, Hebrew, or RTL languages"),
t("bookletImposition.tooltip.advanced.bullet2", "Borders: Shows cut lines for trimming"),
t("bookletImposition.tooltip.advanced.bullet3", "Gutter Margin: Adds space for binding/stapling"),
t("bookletImposition.tooltip.advanced.bullet4", "Short-edge Flip: Only for automatic duplex printers")
]
}
]
};
};

View File

@@ -0,0 +1,45 @@
import { useTranslation } from 'react-i18next';
import { TooltipContent } from '../../types/tips';
export const useCertSignTooltips = (): TooltipContent => {
const { t } = useTranslation();
return {
header: {
title: t("certSign.tooltip.header.title", "About Managing Signatures")
},
tips: [
{
title: t("certSign.tooltip.overview.title", "What can this tool do?"),
description: t("certSign.tooltip.overview.text", "This tool lets you check if your PDFs are digitally signed and add new digital signatures. Digital signatures prove who created or approved a document and show if it has been changed since signing."),
bullets: [
t("certSign.tooltip.overview.bullet1", "Check existing signatures and their validity"),
t("certSign.tooltip.overview.bullet2", "View detailed information about signers and certificates"),
t("certSign.tooltip.overview.bullet3", "Add new digital signatures to secure your documents"),
t("certSign.tooltip.overview.bullet4", "Multiple files supported with easy navigation")
]
},
{
title: t("certSign.tooltip.validation.title", "Checking Signatures"),
description: t("certSign.tooltip.validation.text", "When you check signatures, the tool tells you if they're valid, who signed the document, when it was signed, and whether the document has been changed since signing."),
bullets: [
t("certSign.tooltip.validation.bullet1", "Shows if signatures are valid or invalid"),
t("certSign.tooltip.validation.bullet2", "Displays signer information and signing date"),
t("certSign.tooltip.validation.bullet3", "Checks if the document was modified after signing"),
t("certSign.tooltip.validation.bullet4", "Can use custom certificates for verification")
]
},
{
title: t("certSign.tooltip.signing.title", "Adding Signatures"),
description: t("certSign.tooltip.signing.text", "To sign a PDF, you need a digital certificate (like PEM, PKCS12, or JKS). You can choose to make the signature visible on the document or keep it invisible for security only."),
bullets: [
t("certSign.tooltip.signing.bullet1", "Supports PEM, PKCS12, JKS, and server certificate formats"),
t("certSign.tooltip.signing.bullet2", "Option to show or hide signature on the PDF"),
t("certSign.tooltip.signing.bullet3", "Add reason, location, and signer name"),
t("certSign.tooltip.signing.bullet4", "Choose which page to place visible signatures"),
t("certSign.tooltip.signing.bullet5", "Use server certificate for simple 'Sign with Stirling-PDF' option")
]
}
]
};
};

View File

@@ -0,0 +1,32 @@
import { useTranslation } from 'react-i18next';
import { TooltipContent } from '../../types/tips';
export const useCertificateTypeTips = (): TooltipContent => {
const { t } = useTranslation();
return {
header: {
title: t("certSign.certType.tooltip.header.title", "About Certificate Types")
},
tips: [
{
title: t("certSign.certType.tooltip.what.title", "What's a certificate?"),
description: t("certSign.certType.tooltip.what.text", "It's a secure ID for your signature that proves you signed. Unless you're required to sign via certificate, we recommend using another secure method like Type, Draw, or Upload.")
},
{
title: t("certSign.certType.tooltip.which.title", "Which option should I use?"),
description: t("certSign.certType.tooltip.which.text", "Choose the format that matches your certificate file:"),
bullets: [
t("certSign.certType.tooltip.which.bullet1", "PKCS12 (.p12) one combined file (most common)"),
t("certSign.certType.tooltip.which.bullet2", "PFX (.pfx) Microsoft's version of PKCS12"),
t("certSign.certType.tooltip.which.bullet3", "PEM separate private-key and certificate .pem files"),
t("certSign.certType.tooltip.which.bullet4", "JKS Java .jks keystore for dev / CI-CD workflows")
]
},
{
title: t("certSign.certType.tooltip.convert.title", "Key not listed?"),
description: t("certSign.certType.tooltip.convert.text", "Convert your file to a Java keystore (.jks) with keytool, then pick JKS.")
}
]
};
};

View File

@@ -0,0 +1,36 @@
import { useTranslation } from 'react-i18next';
import { TooltipContent } from '../../types/tips';
export const useSignModeTips = (): TooltipContent => {
const { t } = useTranslation();
return {
header: {
title: t("certSign.signMode.tooltip.header.title", "About PDF Signatures")
},
tips: [
{
title: t("certSign.signMode.tooltip.overview.title", "How signatures work"),
description: t("certSign.signMode.tooltip.overview.text", "Both modes seal the document (any edits are flagged as tampering) and record who/when/how for auditing. Viewer trust depends on the certificate chain.")
},
{
title: t("certSign.signMode.tooltip.manual.title", "Manual - Bring your certificate"),
description: t("certSign.signMode.tooltip.manual.text", "Use your own certificate files for brand-aligned identity. Can display <b>Trusted</b> when your CA/chain is recognized."),
bullets: [
t("certSign.signMode.tooltip.manual.use", "Use for: customer-facing, legal, compliance.")
]
},
{
title: t("certSign.signMode.tooltip.auto.title", "Auto - Zero-setup, instant system seal"),
description: t("certSign.signMode.tooltip.auto.text", "Signs with a server <b>self-signed</b> certificate. Same <b>tamper-evident seal</b> and <b>audit trail</b>; typically shows <b>Unverified</b> in viewers."),
bullets: [
t("certSign.signMode.tooltip.auto.use", "Use when: you need speed and consistent internal identity across reviews and records.")
]
},
{
title: t("certSign.signMode.tooltip.rule.title", "Rule of thumb"),
description: t("certSign.signMode.tooltip.rule.text", "Need recipient <b>Trusted</b> status? <b>Manual</b>. Need a fast, tamper-evident seal and audit trail with no setup? <b>Auto</b>.")
}
]
};
};

View File

@@ -0,0 +1,33 @@
import { useTranslation } from 'react-i18next';
import { TooltipContent } from '../../types/tips';
export const useSignatureAppearanceTips = (): TooltipContent => {
const { t } = useTranslation();
return {
header: {
title: t("certSign.appearance.tooltip.header.title", "About Signature Appearance")
},
tips: [
{
title: t("certSign.appearance.tooltip.invisible.title", "Invisible Signatures"),
description: t("certSign.appearance.tooltip.invisible.text", "The signature is added to the PDF for security but won't be visible when viewing the document. Perfect for legal requirements without changing the document's appearance."),
bullets: [
t("certSign.appearance.tooltip.invisible.bullet1", "Provides security without visual changes"),
t("certSign.appearance.tooltip.invisible.bullet2", "Meets legal requirements for digital signing"),
t("certSign.appearance.tooltip.invisible.bullet3", "Doesn't affect document layout or design")
]
},
{
title: t("certSign.appearance.tooltip.visible.title", "Visible Signatures"),
description: t("certSign.appearance.tooltip.visible.text", "Shows a signature block on the PDF with your name, date, and optional details. Useful when you want readers to clearly see the document is signed."),
bullets: [
t("certSign.appearance.tooltip.visible.bullet1", "Shows signer name and date on the document"),
t("certSign.appearance.tooltip.visible.bullet2", "Can include reason and location for signing"),
t("certSign.appearance.tooltip.visible.bullet3", "Choose which page to place the signature"),
t("certSign.appearance.tooltip.visible.bullet4", "Optional logo can be included")
]
}
]
};
};