PDF Tools Website Script · version 1.0.0

Documentation

A ready-made PDF tools website with 56 tools. Plain HTML, CSS and JavaScript: no WordPress, no PHP, no database. Visitors' files are processed in their own browser and are never uploaded.

Author: Bhavin J. Sheth · Works on any web hosting · License: GPLv2 or later

1. What is in the download

website/The website. Upload the contents of this folder to your hosting.
ocr-languages/Optional: 22 more OCR languages (about 40 MB). See OCR languages.
documentation/This guide.
licensing/GPL license and the licenses of the included libraries and fonts.
Home page
The home page: all tools by category, with search.

2. Requirements

3. Upload to your hosting

Shared hosting (cPanel, Hostinger hPanel and similar)

  1. Unzip the download on your computer.
  2. Open your hosting's File Manager and go to public_html (or a folder inside it, such as public_html/pdf).
  3. Upload the files and folders inside website/ (not the folder itself). Tip: zip the contents, upload the zip, then use Extract.
  4. Open your domain in a browser. The home page appears; open any tool and add a file to test it.

Apache servers use the included .htaccess (correct file types for the PDF engine and caching). If the site is at the root of your domain, you can turn on the custom 404 page by removing the # in front of ErrorDocument in that file. Files starting with a dot can be hidden in File Manager; turn on "show hidden files" if you want to see it.

Netlify, Cloudflare Pages or GitHub Pages

Drag the website folder into Netlify's deploy area, or create a Cloudflare Pages project / GitHub repository with the folder's contents. No build command is needed.

4. Settings (config.js)

All settings are in config.js at the top of the website folder. Open it with any text editor (Notepad, VS Code, or your hosting's File Manager editor), change values, save and upload. Keep the quotes and commas.

SettingWhat it does
siteNameYour site's name: header, footer and browser tab.
taglineShort line in the footer.
logoImageOptional logo image path or URL (about 32 px high), e.g. 'assets/logo.png'. Empty shows the colored dots.
contactEmailShown on the Contact and Privacy pages.
footerTextOptional extra footer line, e.g. your company name.
mode'system' (follow the visitor's device), 'light' or 'dark'.
themeToggletrue shows a light/dark switch in the header; the visitor's choice is kept in their browser.
accentYour brand color, e.g. '#2d4bd8'. A lighter shade is used in dark mode, and a darker shade for small text so it stays readable.
light / darkBackground, panels, text and border colors for each mode. Empty = built-in.
font'kit' (included fonts) or 'system' (the device's own font).
textSize90, 100, 110 or 120 – text size inside the tools.
radiusCorner radius in px (0–24).
hiddenToolsTools to hide. See Hiding tools.
ocrLanguagesOCR languages you added. See OCR languages.
adsAd code for the head, above and below each tool, and on the home page. See Adding ads.
footerLinksFooter links (text and address).
config.js
Everything you set is in one file.
Customized site
The same site with a new name, accent color and dark mode.

After uploading a changed config.js, reload the page. If you use a CDN or page cache, clear it.

5. Editing pages and text

Tool page
A tool page: breadcrumb, H1, intro, the tool, then how-to steps and related tools.

6. Hiding tools

Add the tool's folder name to hiddenTools in config.js, e.g. hiddenTools: ['pdf-to-pdfa', 'speech-to-pdf']. The tool disappears from the home page and related-tool lists, and its page shows a short notice. To remove a tool completely, also delete its folder in tools/ and its line in sitemap.xml. Folder names are in the table below.

7. Adding ads

Paste your ad network's code into ads in config.js, between the backticks:

ads: {
  head: `<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-XXXX" crossorigin="anonymous"></script>`,
  top: `...ad unit code...`,
  bottom: `...ad unit code...`,
  home: `...ad unit code...`
}

head is added once per page; top and bottom appear around each tool; home appears below the search. Empty slots take no space. If you add ads, update your Privacy page: ad networks may set cookies and need a consent notice in some countries.

8. OCR languages

PDF OCR to Text, PDF to Word, PDF to Excel and PDF Storyboard read scanned pages with Tesseract OCR. The engine and English are included and served from your own hosting. To add more languages:

  1. Copy the files you need from the download's ocr-languages/ folder (for example hin.traineddata.gz, guj.traineddata.gz) into website/assets/libs/tesseract/lang/ on your hosting.
  2. In config.js, list the codes: ocrLanguages: ['eng', 'hin', 'guj'].

Codes: eng (included) and hin, guj, mar, ben, tam, tel, kan, mal, pan, urd, ori, san, nep, ara, spa, fra, deu, por, ita, rus, chi_sim, jpn. A visitor's browser downloads the engine (about 4 MB) and only the languages they tick, once.

9. SEO: sitemap, titles, content

10. All 56 tools

ToolFolderWhat it does
Organize 6 tools
Merge PDFtools/merge-pdf/Combine PDFs into one and pick the pages to keep from each.
Split PDFtools/split-pdf/Split by page range, every page, equal chunks or odd and even pages.
Rotate PDFtools/rotate-pdf/Turn all, odd, even or chosen pages to fix orientation.
Organize PDFtools/organize-pdf/Reorder, rotate, delete and add pages, even from other PDFs.
Add Page Numberstools/add-page-numbers/Add numbers like "Page 1 of 20" with your choice of position and style.
Reverse PDFtools/reverse-pdf/Reverse page order, or fix the back pages of a double-sided scan.
Convert 24 tools
PDF to Wordtools/pdf-to-word/Editable DOCX with paragraphs, tables and pictures; OCR for scans.
Word to PDFtools/word-to-pdf/Convert Word documents (.docx) to PDF.
PDF to JPG / PNGtools/pdf-to-image/Save pages as JPG, PNG or WebP images at up to 300 dpi.
Image to PDFtools/image-to-pdf/JPG, PNG, WebP, HEIC and more to one PDF or one per image.
PDF to Exceltools/pdf-to-excel/Tables to XLSX or CSV with real numbers and dates; OCR for scans.
Excel to PDFtools/excel-to-pdf/XLSX sheets to PDF with their print setup, formats and charts.
PDF to PPTtools/pdf-to-powerpoint/PPTX slides with editable text over each page picture.
PPT to PDFtools/powerpoint-to-pdf/PPTX to PDF, with speaker notes or handouts if you want.
HTML to PDFtools/html-to-pdf/Turn HTML and CSS code into a PDF or an image.
PDF to HTMLtools/pdf-to-html/One HTML file: a clean web page or an exact copy of each page.
Markdown to PDFtools/markdown-to-pdf/README or notes to a PDF with headings, tables, code and links.
PDF to Markdowntools/pdf-to-markdown/A .md file with headings, lists and tables.
Text to PDFtools/text-to-pdf/Typed or .txt text to PDF, including Gujarati and Hindi.
Extract Imagestools/extract-images/Copy out original JPEGs and other images as PNG, in one ZIP.
JSON to PDFtools/json-to-pdf/JSON as readable code, a table of records or an outline.
PDF to JSONtools/pdf-to-json/Extract PDF text and tables into structured JSON.
CSV to PDFtools/csv-to-pdf/Convert CSV spreadsheets to clean PDF tables.
PDF to XMLtools/pdf-to-xml/Well-formed XML with lines, paragraphs and positions.
XML to PDFtools/xml-to-pdf/XML as readable code, a table of records or an outline.
PDF to ZIPtools/pdf-to-zip/Zip PDFs whole or split, with an optional password.
ZIP to PDFtools/zip-to-pdf/Combine the PDFs, images and text files in a ZIP into one PDF.
Speech to PDFtools/speech-to-pdf/Dictate in English, Gujarati, Hindi and more, then save as PDF.
GIF to PDFtools/gif-to-pdf/Convert animated or static GIF files into PDF pages.
PDF to PDF/Atools/pdf-to-pdfa/Make a PDF/A-1b, 2b or 3b copy for long-term archiving.
Compress & Optimize 5 tools
Compress PDFtools/compress-pdf/Shrink the images inside; text stays sharp and selectable.
PDF Resizetools/resize-pdf/Change page size to A4, Letter, A3 or custom, with fit options.
PDF Enhancertools/enhance-pdf/Whiten scans, fix brightness and contrast, and sharpen text.
PDF to Grayscaletools/pdf-to-grayscale/Turn color pages gray; text stays selectable.
Repair PDFtools/repair-pdf/Rebuild a damaged PDF's structure so it opens again.
Edit & Customize 10 tools
Edit PDFtools/edit-pdf/Change text and images already in the PDF, or add new ones.
Fill PDF Formtools/fill-pdf-form/Type into a PDF form's own boxes, tick boxes and save or flatten it.
Crop PDFtools/crop-pdf/Crop with a drag box, exact sizes or fit to content.
Add Watermarktools/add-watermark/Add a text or logo watermark, once or repeated.
Metadata Editortools/pdf-metadata/Change the title, author, subject and keywords saved in a PDF.
Add Marginstools/add-margins/Add space around pages for binding, notes or clean printing.
Flatten PDFtools/flatten-pdf/Make form answers and comments a fixed part of the page.
PDF Color Invertertools/pdf-color-inverter/Invert PDF colors for dark mode and high-contrast reading.
PDF Color Overlaytools/pdf-color-overlay/Tint pages or add a colored band, with blend modes.
PDF Filter Studiotools/pdf-filter-studio/Brightness, contrast, sepia, sharpen and more, with presets.
Secure & Protect 5 tools
Protect PDFtools/protect-pdf/Add an AES-256 password and limit printing or copying.
Unlock PDFtools/unlock-pdf/Remove a password you know, and printing or copying limits.
Sign PDFtools/sign-pdf/Draw, type or upload a signature, plus dates and stamps.
Redact PDFtools/redact-pdf/Remove private details for good; finds PAN, Aadhaar and phone numbers.
Blur PDFtools/blur-pdf/Blur areas or found details; the text underneath is removed.
Advanced 6 tools
PDF OCR to Texttools/pdf-to-text/Make scans searchable or extract their text, in up to 23 languages.
Compare PDFtools/pdf-compare/Find and mark every added, removed and changed word.
PDF Analyzertools/pdf-analyzer/Analyze structure, fonts, security and document health.
PDF Listenertools/pdf-listener/Hear a PDF read aloud with the voices on your device.
PDF Storyboardtools/pdf-storyboard-generator/Turn PDF pages into storyboard sheets with captions.
Image Storyboard to PDFtools/image-storyboard-to-pdf/Turn images into a storyboard PDF with titles and notes.

11. Privacy

Privacy note on a tool page
Each tool page tells visitors their files stay on their device.

12. Browsers and limits

Phones
The site and every tool adapt to phones.

13. FAQ and troubleshooting

The pages show, but the tools don't start.
Open the site through its web address (https), not as a file on your computer. If it is online, check that all folders were uploaded (especially assets/libs/) and that your server sends .wasm files as application/wasm (the included .htaccess does this on Apache).
My changes to config.js don't show.
Reload the page (Ctrl+F5). If you use Cloudflare or another cache, purge it.
Can I translate the site?
The page texts (titles, intros, steps, About/Privacy/Contact) are plain HTML you can translate. The texts inside the tools are in English in this version.
Can I use it for a client?
Yes, under the license you bought from the marketplace (Regular license: one end product).
Do I need a server for processing?
No. Everything runs in the visitor's browser.

14. Updating

Download the new version from your Downloads page. Keep your edited config.js, sitemap.xml, robots.txt and any pages you changed, upload the rest over the old files, and clear your cache.

15. Support

Support is given through the item's Support tab on the marketplace: questions about the features, help with reported bugs, and help with the included files. Customization and hosting setup are not included. Please include your site's address, which tool, your browser, and a screenshot. Please don't send customer files.

16. Credits and licenses

PDF.js 6.4.299 – Mozilla FoundationApache License 2.0
pdf-lib 1.17.1 – Andrew DillonMIT
SortableJS 1.15.7MIT
Tesseract.js 7.0.0 and tesseract.js-core 7.0.0; language data from tessdata_bestApache License 2.0
Space Grotesk, IBM Plex Mono, Dancing Script, Great Vibes, Marck Script, Sacramento fonts (via Fontsource)SIL Open Font License 1.1

The script's own code is licensed under the GPL version 2 or later.

17. Changelog

1.0.0