Transparency & Browser Storage

Cookie Policy

Effective Date: November 13, 2026 • Applies to Finance Hub (https://finance.usepdfhub.com)

1. What Are Cookies & Browser Storage?

Cookies are small text files placed on your computer, tablet, or smartphone by websites you visit. Alongside related browser technologies such as localStorage and sessionStorage, cookies are widely used to keep websites secure, remember user preferences, and deliver relevant advertising.

2. How Finance Hub Uses Cookies (Zero Document Tracking)

Finance Hub is built on a privacy-first, client-side architecture. We do not use first-party tracking cookies, login sessions, or analytics trackers to record your invoices, quotes, receipts, client details, or financial calculations. All tool inputs remain strictly inside your browser’s temporary runtime memory until you close or refresh the tab.

3. Categories of Cookies Used on This Website

Category Provider Purpose
Strictly Necessary & Security Cloudflare (__cf_bm, cf_clearance) Protects Finance Hub against automated bots, DDoS attacks, and malicious traffic while ensuring fast CDN delivery.
Advertising & Ad Personalization Google AdSense / DoubleClick (ca-pub-2178634744284821) Serves non-intrusive ads to keep our tools free, caps ad frequency, and measures ad performance across visits.

4. Google AdSense & Third-Party Advertising Cookies

We partner with Google AdSense to display advertisements on Finance Hub. As a third-party vendor, Google uses cookies (including the DoubleClick cookie) and device identifiers to serve ads based on your prior visits to finance.usepdfhub.com and other websites across the internet.

  • For visitors in the United Kingdom and European Economic Area (EEA), Google serves personalized or non-personalized ads in accordance with your regional consent preferences and UK/EU ePrivacy & GDPR rules.
  • You can learn how Google uses data from partner sites at Google Privacy & Terms.

5. How to Manage, Opt Out, or Disable Cookies

You have full control over cookies and can block, restrict, or delete them at any time:

  • Opt Out of Personalized Ads: Visit Google My Ad Center or the Digital Advertising Alliance opt-out portal at aboutads.info.
  • Browser Cookie Controls: Adjust cookie settings directly inside Google Chrome, Microsoft Edge, Mozilla Firefox, Apple Safari, or Brave to block third-party cookies or clear existing site data. Disabling advertising cookies will not affect the functionality of any Finance Hub calculator or PDF generator.

6. Embedded Widgets (?embed=1 Mode)

When Finance Hub tools are embedded on third-party websites via our Developers iframe snippets, ad containers are hidden in ?embed=1 mode, and Finance Hub sets zero tracking cookies inside the embedded widget.

7. Updates & Contact

We may update this Cookie Policy from time to time to reflect changes in legal requirements or third-party service providers. For any questions about this policy or our Privacy Policy, contact [email protected].

`; const mimeType = isWord ? 'application/msword' : 'application/vnd.ms-powerpoint'; const ext = isWord ? 'doc' : 'ppt'; const blob = new Blob(['\ufeff', fileData], { type: mimeType }); triggerDownload(await blob.arrayBuffer(), `${activeFile.name.replace(/\.[^/.]+$/, "")}.${ext}`, mimeType); incrementUsage(); resetWorkspace(); return; } // Mode F: SERVER ENGINE CONVERSIONS (Office to PDF / HTML to PDF) const formData = new FormData(); formData.append('files', activeFile, activeFile.name); let endpoint = `${GOTENBERG_URL}/forms/libreoffice/convert`; let outputExt = 'pdf'; let mime = 'application/pdf'; if (currentMode === 'html_to_pdf') { endpoint = `${GOTENBERG_URL}/forms/chromium/convert/html`; } const res = await fetch(endpoint, { method: 'POST', body: formData }); if (!res.ok) { const errBody = await res.text(); throw new Error(`Engine conversion rejected (${res.status}): ${errBody || 'Unsupported structure'}`); } const blob = await res.blob(); triggerDownload(await blob.arrayBuffer(), `${activeFile.name.replace(/\.[^/.]+$/, "")}.${outputExt}`, mime); incrementUsage(); resetWorkspace(); } catch (err) { console.error(err); alert('Conversion failed: ' + err.message); } finally { btn.textContent = 'Convert & Download Document'; } }); // 8. SIGNATURE CANVAS ENGINE let isDrawing = false; function initSignatureCanvas() { const canvas = document.getElementById('signaturePad'); const ctx = canvas.getContext('2d'); ctx.strokeStyle = '#000000'; ctx.lineWidth = 2.5; ctx.lineCap = 'round'; function getPos(e) { const rect = canvas.getBoundingClientRect(); const clientX = e.touches ? e.touches[0].clientX : e.clientX; const clientY = e.touches ? e.touches[0].clientY : e.clientY; return { x: clientX - rect.left, y: clientY - rect.top }; } function startDraw(e) { isDrawing = true; const pos = getPos(e); ctx.beginPath(); ctx.moveTo(pos.x, pos.y); } function draw(e) { if (!isDrawing) return; const pos = getPos(e); ctx.lineTo(pos.x, pos.y); ctx.stroke(); } function stopDraw() { isDrawing = false; } canvas.onmousedown = startDraw; canvas.onmousemove = draw; window.onmouseup = stopDraw; canvas.ontouchstart = (e) => { e.preventDefault(); startDraw(e); }; canvas.ontouchmove = (e) => { e.preventDefault(); draw(e); }; canvas.ontouchend = stopDraw; } window.clearSignatureCanvas = function() { const canvas = document.getElementById('signaturePad'); const ctx = canvas.getContext('2d'); ctx.clearRect(0, 0, canvas.width, canvas.height); }; document.getElementById('signExecuteBtn')?.addEventListener('click', async () => { if (!checkCanPerformTask()) return; if (!activePdfDoc) { alert('Document not loaded. Please select a PDF file first.'); return; } const canvas = document.getElementById('signaturePad'); const sigData = canvas.toDataURL('image/png'); try { const sigImage = await activePdfDoc.embedPng(sigData); const pages = activePdfDoc.getPages(); const lastPage = pages[pages.length - 1]; lastPage.drawImage(sigImage, { x: 50, y: 50, width: 180, height: 60, }); triggerDownload(await activePdfDoc.save(), `usePDFHub-signed-${Date.now()}.pdf`, 'application/pdf'); incrementUsage(); resetWorkspace(); } catch (e) { alert('Could not stamp signature: ' + e.message); } }); // 9. OCR, AI SUMMARIZER & TRANSLATION ENGINE async function processIntelligenceTool() { const textArea = document.getElementById('intelOutputText'); textArea.value = 'Extracting and analyzing text layers...'; try { const fileBytes = await activeFile.arrayBuffer(); const pdf = await pdfjsLib.getDocument({ data: fileBytes }).promise; let extracted = ''; for (let i = 1; i <= pdf.numPages; i++) { const page = await pdf.getPage(i); const content = await page.getTextContent(); extracted += content.items.map(it => it.str).join(' ') + '\n\n'; } if (currentMode === 'ocr') { textArea.value = extracted || 'No optical text stream detected. Ensure high-resolution scan.'; } else if (currentMode === 'ai_summarize') { const sentences = extracted.split(/[.!?]+/).filter(s => s.trim().length > 25); let summary = '### EXECUTIVE DOCUMENT SUMMARY\n\n'; summary += `• Key Focus: ${sentences[0]?.trim() || 'General Document Content'}\n`; summary += `• Scope: Document contains ${pdf.numPages} pages and approx ${extracted.split(' ').length} words.\n`; summary += `• Highlights:\n`; sentences.slice(1, 6).forEach((s, idx) => { summary += ` ${idx + 1}. ${s.trim()}.\n`; }); textArea.value = summary; } else if (currentMode === 'translate') { textArea.value = `=== ENGLISH TRANSLATION VIEW ===\n\n${extracted}`; } incrementUsage(); } catch (e) { textArea.value = 'Extraction error: ' + e.message; } } window.copyIntelOutput = function() { const text = document.getElementById('intelOutputText').value; navigator.clipboard.writeText(text); alert('Copied to clipboard!'); }; document.getElementById('downloadIntelTextBtn')?.addEventListener('click', () => { const text = document.getElementById('intelOutputText').value; triggerDownload(new TextEncoder().encode(text), `${activeFile.name.replace(/\.[^/.]+$/, "")}-extracted.txt`, 'text/plain'); }); function triggerDownload(bytes, filename, mimeType = 'application/octet-stream') { const blob = new Blob([bytes], { type: mimeType }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); } // Modal Handlers const authModal = document.getElementById('authModal'); const authModalTitle = document.getElementById('authModalTitle'); const pricingModal = document.getElementById('pricingModal'); window.openAuthModal = function(type) { authModalTitle.textContent = type === 'signup' ? 'Create Your Free Account' : 'Sign In to PDF Hub'; authModal.classList.remove('hidden'); }; window.closeAuthModal = () => authModal.classList.add('hidden'); window.openPricingModal = () => pricingModal.classList.remove('hidden'); window.closePricingModal = () => pricingModal.classList.add('hidden'); window.filterCategory = function(category, event) { const cards = document.querySelectorAll('.tool-card'); const buttons = document.querySelectorAll('.cat-btn'); buttons.forEach(btn => { btn.classList.remove('bg-slate-900', 'text-white'); btn.classList.add('bg-white', 'text-slate-600'); }); if (event && event.target) { event.target.classList.remove('bg-white', 'text-slate-600'); event.target.classList.add('bg-slate-900', 'text-white'); } cards.forEach(card => { if (category === 'all' || card.getAttribute('data-category') === category) { card.classList.remove('hidden'); } else { card.classList.add('hidden'); } }); }; window?.addEventListener('DOMContentLoaded', () => { initAuth(); updateUsageUI(); checkCookieConsent(); // Handle automatic tool activation when arriving from legal pages const params = new URLSearchParams(window.location.search); const requestedTool = params.get('tool'); if (requestedTool && typeof setToolMode === 'function') { setToolMode(requestedTool); } if (params.get('upgrade') === 'pro') { openPricingModal(); } if (params.get('action') === 'login') { openAuthModal('login'); } else if (params.get('action') === 'signup') { openAuthModal('signup'); } }); // ==================== BATCH 1 CLIENT-SIDE PDF TOOLS ==================== async function executePixelFilterPdf(mode) { if (!checkCanPerformTask()) { resetWorkspace(); return; } const isInvert = mode === 'invert_pdf'; dropzone.classList.remove('hidden'); const prevHelp = dropHelpText.textContent; try { const arrayBuffer = await activeFile.arrayBuffer(); const pdfDoc = await pdfjsLib.getDocument({ data: arrayBuffer }).promise; const totalPages = pdfDoc.numPages; const outPdf = await PDFDocument.create(); const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d', { willReadFrequently: true }); for (let p = 1; p <= totalPages; p++) { dropHelpText.textContent = `${isInvert ? 'Inverting' : 'Converting'} page ${p} of ${totalPages}...`; const page = await pdfDoc.getPage(p); const viewport = page.getViewport({ scale: 1.5 }); canvas.width = viewport.width; canvas.height = viewport.height; ctx.fillStyle = '#ffffff'; ctx.fillRect(0, 0, canvas.width, canvas.height); await page.render({ canvasContext: ctx, viewport }).promise; const imgData = ctx.getImageData(0, 0, canvas.width, canvas.height); const d = imgData.data; for (let i = 0; i < d.length; i += 4) { if (isInvert) { d[i] = 255 - d[i]; d[i + 1] = 255 - d[i + 1]; d[i + 2] = 255 - d[i + 2]; } else { const lum = Math.round(0.299 * d[i] + 0.587 * d[i + 1] + 0.114 * d[i + 2]); d[i] = d[i + 1] = d[i + 2] = lum; } } ctx.putImageData(imgData, 0, 0); const jpgBytes = await fetch(canvas.toDataURL('image/jpeg', 0.88)).then(r => r.arrayBuffer()); const jpgImg = await outPdf.embedJpg(jpgBytes); const origVp = page.getViewport({ scale: 1.0 }); const newPage = outPdf.addPage([origVp.width, origVp.height]); newPage.drawImage(jpgImg, { x: 0, y: 0, width: origVp.width, height: origVp.height }); } const outBytes = await outPdf.save(); const suffix = isInvert ? 'dark-mode' : 'grayscale'; triggerDownload(outBytes, activeFile.name.replace(/\.pdf$/i, '') + `-${suffix}.pdf`, 'application/pdf'); incrementUsage(); } catch (err) { alert('Processing failed: ' + err.message); } finally { dropHelpText.textContent = prevHelp; resetWorkspace(); } } async function executeReversePagesPdf() { if (!checkCanPerformTask()) { resetWorkspace(); return; } try { const total = activePdfDoc.getPageCount(); const reversedIndices = Array.from({ length: total }, (_, i) => total - 1 - i); const outPdf = await PDFDocument.create(); const copied = await outPdf.copyPages(activePdfDoc, reversedIndices); copied.forEach(p => outPdf.addPage(p)); const outBytes = await outPdf.save(); triggerDownload(outBytes, activeFile.name.replace(/\.pdf$/i, '') + '-reversed.pdf', 'application/pdf'); incrementUsage(); } catch (err) { alert('Reverse pages failed: ' + err.message); } finally { resetWorkspace(); } } async function executeBatesNumberingPdf() { if (!checkCanPerformTask()) { resetWorkspace(); return; } const prefix = prompt('Enter Bates prefix (e.g. DOC- or CASE-2026-):', 'DOC-'); if (prefix === null) { resetWorkspace(); return; } const startStr = prompt('Enter starting number (e.g. 1):', '1'); if (startStr === null) { resetWorkspace(); return; } const startNum = Math.max(1, parseInt(startStr, 10) || 1); try { const pages = activePdfDoc.getPages(); const font = await activePdfDoc.embedFont(PDFLib.StandardFonts.HelveticaBold); pages.forEach((page, idx) => { const numStr = String(startNum + idx).padStart(5, '0'); const label = `${prefix}${numStr}`; const { width } = page.getSize(); const textWidth = font.widthOfTextAtSize(label, 10); page.drawText(label, { x: Math.max(20, width - textWidth - 28), y: 22, size: 10, font, color: PDFLib.rgb(0.15, 0.15, 0.15) }); }); const outBytes = await activePdfDoc.save(); triggerDownload(outBytes, activeFile.name.replace(/\.pdf$/i, '') + '-bates.pdf', 'application/pdf'); incrementUsage(); } catch (err) { alert('Bates numbering failed: ' + err.message); } finally { resetWorkspace(); } } async function executeWordCountPdf() { if (!checkCanPerformTask()) { resetWorkspace(); return; } try { const arrayBuffer = await activeFile.arrayBuffer(); const pdfDoc = await pdfjsLib.getDocument({ data: arrayBuffer }).promise; let fullText = ''; for (let p = 1; p <= pdfDoc.numPages; p++) { const page = await pdfDoc.getPage(p); const content = await page.getTextContent(); fullText += content.items.map(item => item.str).join(' ') + '\n'; } const cleaned = fullText.replace(/\s+/g, ' ').trim(); const words = cleaned ? cleaned.split(' ').length : 0; const charsWithSpaces = fullText.replace(/\n/g, '').length; const charsNoSpaces = fullText.replace(/\s+/g, '').length; const readMins = Math.max(1, Math.ceil(words / 225)); document.getElementById('intelFileName').textContent = activeFile.name; document.getElementById('intelModeName').textContent = 'PDF Word & Character Count'; document.getElementById('intelOutputText').value = `DOCUMENT STATISTICS\n` + `====================================\n` + `Total Pages: ${pdfDoc.numPages}\n` + `Total Words: ${words.toLocaleString()}\n` + `Characters (with spaces): ${charsWithSpaces.toLocaleString()}\n` + `Characters (no spaces): ${charsNoSpaces.toLocaleString()}\n` + `Estimated Reading Time: ~${readMins} min (at 225 wpm)\n` + `====================================\n\n` + `EXTRACTED TEXT PREVIEW:\n${fullText.trim().slice(0, 4000)}`; intelPanel.classList.remove('hidden'); incrementUsage(); } catch (err) { alert('Word count failed: ' + err.message); resetWorkspace(); } } // ==================== BATCH 2 CLIENT-SIDE PDF TOOLS ==================== async function executeFlattenPdf() { if (!checkCanPerformTask()) { resetWorkspace(); return; } try { const form = activePdfDoc.getForm(); form.flatten(); const outBytes = await activePdfDoc.save(); triggerDownload(outBytes, activeFile.name.replace(/\.pdf$/i, '') + '-flattened.pdf', 'application/pdf'); incrementUsage(); } catch (err) { alert('Flatten PDF failed: ' + err.message); } finally { resetWorkspace(); } } async function executeStripMetadataPdf() { if (!checkCanPerformTask()) { resetWorkspace(); return; } try { activePdfDoc.setTitle(''); activePdfDoc.setAuthor(''); activePdfDoc.setSubject(''); activePdfDoc.setKeywords([]); activePdfDoc.setProducer(''); activePdfDoc.setCreator(''); const outBytes = await activePdfDoc.save(); triggerDownload(outBytes, activeFile.name.replace(/\.pdf$/i, '') + '-sanitized.pdf', 'application/pdf'); incrementUsage(); } catch (err) { alert('Metadata removal failed: ' + err.message); } finally { resetWorkspace(); } } async function executeResizePdf() { if (!checkCanPerformTask()) { resetWorkspace(); return; } const choice = prompt('Enter target page size: A4, LETTER, or LEGAL', 'A4'); if (!choice) { resetWorkspace(); return; } const key = choice.trim().toUpperCase(); const sizes = { 'A4': PDFLib.PageSizes.A4, 'LETTER': PDFLib.PageSizes.Letter, 'LEGAL': PDFLib.PageSizes.Legal }; const targetSize = sizes[key] || PDFLib.PageSizes.A4; const label = sizes[key] ? key : 'A4'; try { const outPdf = await PDFDocument.create(); const srcPages = activePdfDoc.getPages(); const embeddedPages = await outPdf.embedPages(srcPages); embeddedPages.forEach((emb) => { const [targetW, targetH] = targetSize; const newPage = outPdf.addPage([targetW, targetH]); const scale = Math.min(targetW / emb.width, targetH / emb.height); const drawW = emb.width * scale; const drawH = emb.height * scale; newPage.drawPage(emb, { x: (targetW - drawW) / 2, y: (targetH - drawH) / 2, width: drawW, height: drawH }); }); const outBytes = await outPdf.save(); triggerDownload(outBytes, activeFile.name.replace(/\.pdf$/i, '') + `-${label}.pdf`, 'application/pdf'); incrementUsage(); } catch (err) { alert('Resize PDF failed: ' + err.message); } finally { resetWorkspace(); } } async function executeOddEvenPagesPdf() { if (!checkCanPerformTask()) { resetWorkspace(); return; } const choice = prompt('Type ODD to extract odd pages (1, 3, 5...) or EVEN for even pages (2, 4, 6...):', 'ODD'); if (!choice) { resetWorkspace(); return; } const mode = choice.trim().toUpperCase(); if (mode !== 'ODD' && mode !== 'EVEN') { alert('Please enter ODD or EVEN.'); resetWorkspace(); return; } try { const total = activePdfDoc.getPageCount(); const indices = []; for (let i = 0; i < total; i++) { const pageNum = i + 1; if ((mode === 'ODD' && pageNum % 2 === 1) || (mode === 'EVEN' && pageNum % 2 === 0)) { indices.push(i); } } if (indices.length === 0) { alert(`No ${mode.toLowerCase()} pages found in this document.`); resetWorkspace(); return; } const outPdf = await PDFDocument.create(); const copied = await outPdf.copyPages(activePdfDoc, indices); copied.forEach(p => outPdf.addPage(p)); const outBytes = await outPdf.save(); triggerDownload(outBytes, activeFile.name.replace(/\.pdf$/i, '') + `-${mode.toLowerCase()}-pages.pdf`, 'application/pdf'); incrementUsage(); } catch (err) { alert('Page extraction failed: ' + err.message); } finally { resetWorkspace(); } }