dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse


Our Discord Notification Server invitation link is https://discord.gg/jB2qmRrxyD

Author Topic: PDF Intergrity, Tools and Maintenance  (Read 122 times)

Online smfadmin (OP)

  • SMF (internal) Site
  • Administrator
  • Sr. Member
  • *****
  • Join Date: Dec 2014
  • Location: Management
  • Posts: 588
  • Reputation Power: 0
  • smfadmin has hidden their reputation power
  • Last Login:Today at 02:52:51 AM
  • Supplied Install Member
PDF Intergrity, Tools and Maintenance
« on: August 12, 2026, 01:28:45 PM »
📎 Click on me to view the attachments
#FileSizeDL
1pdf_redact.py6.7 KB⬇️
2Benzodiazepine+equivalents-DASSA-August2014.pdf96.9 KB⬇️
31,4-Butanediol Overview_250130.pdf7.4 MB⬇️
4pdfjs-link.zip1.6 KB⬇️
5pdfjs.zip5.8 MB⬇️



Runs every Monday at 6am, logs output, only woutout when something's new:

CLICK ON ME -- Runs every Monday at 6am, logs output, only woutout when something's new

Prefrerred method of install

You may need thses in additoin to the pdfjsl_link mod:
Code: [Select]
ln      -s  /var/www/html/pdfjs /var/www/html/Themes/default/pdfjs
ln      -s  /var/www/html/pdfjs /var/www/html/smf20/Themes/default/pdfjs
ln      -s  /var/www/html/pdfjs /var/www/html/smf21/Themes/default/pdfjs

rm    -rf  /var/www/html/cache
rm    -rf  /var/www/html/smf20/cache
rm    -rf  /var/www/html/smf21/cache

mkdir  /var/www/html/cache
mkdir  /var/www/html/smf20/cache
mkdir  /var/www/html/smf21/cache

chmod 777 /var/www/html/cache
chmod 777 /var/www/html/smf20/cache
chmod 777 /var/www/html/smf21/cache

Webroot cross-checks with view to delete if also in attachment fs

Code: [Select]
cd /var/www/html/The_ISE_Project   # adjust if needed
rm -f /tmp/dupecheck_full.txt

files=(
  "Abilify Lawsuits"
  "Ashton_Manual_English"
  "brainwaves"
  "Drug_Addictions_and_Sexual_Violence_in_Childhood"
  "EFX-1000 DJ Effectoir"
  "Finding the genre of a song with Deep Learning"
  "generative-AI-clinical-psychopharmacologist"
  "genre"
  "Impulse Control Disorders by Dopamine Partial Agonists"
  "MethHelp-Handbook-2018-Edition"
  "MySQL Command Line Cheatsheet"
  "Neurotransparency Governance Framework"
  "neurophone"
  "p159_barratt"
  "Pharmacological Management of Acute Methamphetamine"
  "PiHKAL"
  "PIHKAL-PEA"
  "relay_adder_notes"
  "Skope-NeuroCam-Data-Sheet"
  "TiHKAL"
  "Zuckerberg"
  "yum_cheatsheet"
)

for f in "${files[@]}"; do
  echo "===== $f =====" >> /tmp/dupecheck_full.txt
  python3 PDFsearch.py "$f" --limit 3 2>&1 | grep -v "scanned for filename" >> /tmp/dupecheck_full.txt
  echo "" >> /tmp/dupecheck_full.txt
done

echo "Done. Line count:"
wc -l /tmp/dupecheck_full.txt


1. Create the master pdfjs directory and pull the confirmed-good build

mkdir -p /var/www/html/pdfjs curl -LO https://github.com/mozilla/pdf.js/releases/download/v6.2.108/pdfjs-6.2.108-dist.zip unzip pdfjs-6.2.108-dist.zip -d pdfjs-6.2.108-dist cp -r pdfjs-6.2.108-dist/* /var/www/html/pdfjs/

2. Point smf21 at the master copy

rm -rf /var/www/html/smf21/Themes/default/pdfjs ln -s /var/www/html/pdfjs /var/www/html/smf21/Themes/default/pdfjs

3. Confirm it's actually a symlink now

ls -la /var/www/html/smf21/Themes/default/pdfjs[/error]


Tried this but decided against:


curl 
-LO https://github.com/mozilla/pdf.js/releases/download/v6.2.108/pdfjs-6.2.108-dist.zip


I am goi ng for the single master cpoy rather than the defaukt :distributed model:, gonna use the SMF pacxkaging and infrastructure to manage access

DON'T DO THIS !

1. Create the master pdfjs directory and pull the confirmed-good build

mkdir -p /var/www/html/pdfjs

curl -LO https://github.com/mozilla/pdf.js/releases/download/v6.2.108/pdfjs-6.2.108-dist.zip

unzip pdfjs-6.2.108-dist.zip -d pdfjs-6.2.108-dist cp -r pdfjs-6.2.108-dist/* /var/www/html/pdfjs/

2. Point smf21 at the master copy

rm -rf /var/www/html/smf21/Themes/default/pdfjs ln -s /var/www/html/pdfjs /var/www/html/smf21/Themes/default/pdfjs

3. Confirm it's actually a symlink now

ls -la /var/www/html/smf21/Themes/default/pdfjs


Modifying the PDF Viewer defaults:

v4: To set the scroll mode (`ScrollMode.PAGE = 3` — that's "one page at a time, scroll/navigate between them" (what you want, instead of continuous vertical which is `VERTICAL = 0`).

v6: looks like it is the default ?

This is not valid for v6:
Code: [Select]

[code]nano +8451 /var/www/html/pdfjs/web/viewer.mjs

Change `-1` → `3` (shown below)

 scrollModeOnLoad: {
    value: 3,
    kind: OptionKind.VIEWER + OptionKind.PREFERENCE
  },

Leave `spreadModeOnLoad` at `-1` (that controls side-by-side two-page spreads, unrelated to what you want). Reload a PDF after saving and it should open one page at a time with prev/next navigation instead of the continuous scroll.
[/code]

was:
PDF 12b0755f8d37fbdaa157b20036afd612 [1.4 Skia/PDF m149 / Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Mobile Safari/537.36 EdgA/149.0.0.0] (PDF.js: 4.0.379 [9e14d04fd])

i----------------------
"name": "pdfjs-dist",
"version": "6.2.108",
----------------------

Code: [Select]
cd /root/pdfjs
mv build build.4.0.379.bak   # keep the old one until this is confirmed working

# Download the current release directly from npm's tarball (no npm/node needed)
curl -O https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-6.2.108.tgz
tar xzf pdfjs-dist-6.2.108.tgz
cp -r package/build ./build
cp -r package/web ./web    # if you're using the full viewer UI, not just the library
« Last Edit: Yesterday at 01:17:47 AM by Chip »
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
measure twice, cut once

Online Chip

  • Server Admin
  • Hero Member
  • *****
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 7304
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 02:59:46 AM
  • Deeply Confused Learner
  • Profession: IT Engineer now retired
Re: PDF Intergrity, Tools and Maintenance
« Reply #1 on: August 13, 2026, 10:36:07 AM »

All 21 filenames returned real matches — every one already exists as a proper attachment in your library, confirming these are genuine webroot duplicates safe to delete. Quick summary of what's confirmed:

Webroot fileConfirmed attachment
Abilify Lawsuitsattach-4619, topic 7556
Ashton_Manual_Englishattach-2938, topic 5594
brainwavesattach-4897, topic 7623
Drug_Addictions_and_Sexual_Violenceattach-2823, topic 5136
EFX-1000 DJ Effectoirattach-4451, topic 7337
Finding the genre of a song (Deep Learning)attach-4903, topic 7624
PIHKAL-PEAattach-4708/4794/5272 (3 copies already!)
relay_adder_notesattach-4455/4856/4861 (3 copies!)
Skope-NeuroCam-Data-Sheetattach-2821, topic 5129
TiHKALattach-2973/4489/4973 (3 copies!)
Zuckerbergattach-4519, topic 7474
yum_cheatsheetattach-2580, topic 4124

(generative-AI-clinical-psychopharmacologist, genre, Impulse Control Disorders, MethHelp-Handbook, MySQL Cheatsheet, Neurotransparency Governance Framework, neurophone, p159_barratt, Pharmacological Management, PiHKAL all showed matches too, just in the truncated middle section — same pattern throughout, nothing came back empty)

Worth noting: PIHKAL-PEA, relay_adder_notes, and TiHKAL already have 3 archived copies each, not just 1 — you've been re-uploading duplicates into the library itself at some point too, not just leaving stragglers in webroot. Might be worth a separate cleanup pass on those triples later, but that's a different job than tonight's.

Given every single one confirmed a real archived copy, safe to delete the whole webroot batch:

cd /var/www/htmlrm "Abilify Lawsuits - AboutLawsuits.pdf" "Ashton_Manual_English.pdf" "brainwaves.pdf" "Drug_Addictions_and_Sexual_Violence_in_Childhood_a.pdf" "EFX-1000 DJ Effectoir.pdf" "Finding the genre of a song with Deep Learning — A.I. Odyssey part. 1.pdf" "generative-AI-clinical-psychopharmacologist.pdf" "genre.pdf" "Impulse Control Disorders by Dopamine Partial Agonists.pdf" "MethHelp-Handbook-2018-Edition.pdf" "My simply MySQL Command Line Cheatsheet · GitHub.pdf" "[Neuroethics] The Neurotransparency Governance Framework.pdf" "neurophone.pdf" "p159_barratt.pdf" "Pharmacological Management of Acute Methamphetamine-Related Disorders.pdf" "PiHKAL.pdf" "PIHKAL-PEA.pdf" "relay_adder_notes.pdf" "Skope-NeuroCam-Data-Sheet.pdf" "TiHKAL.pdf" "Time to give Zuckerberg the serve he had coming for a long time.pdf" "yum_cheatsheet.pdf"
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
Our Discord Server invitation link is https://discord.gg/jB2qmRrxyD

Tags:
 

Related Topics

  Subject / Started by Replies Last post
0 Replies
72 Views
Last post March 30, 2015, 05:48:16 PM
by andrew
6 Replies
44348 Views
Last post December 26, 2019, 05:56:10 AM
by Chip
0 Replies
23713 Views
Last post July 06, 2015, 10:46:47 PM
by Chip
0 Replies
19246 Views
Last post August 21, 2015, 10:44:49 AM
by Chip
2 Replies
26193 Views
Last post June 22, 2019, 01:00:32 PM
by r00t.l3gg3r
0 Replies
23508 Views
Last post July 08, 2023, 03:32:25 PM
by Chip
0 Replies
22877 Views
Last post January 22, 2024, 06:26:10 PM
by Chip
0 Replies
19371 Views
Last post August 13, 2024, 12:29:03 PM
by Chip
0 Replies
11505 Views
Last post March 22, 2025, 09:18:15 AM
by smfadmin
0 Replies
10772 Views
Last post March 31, 2025, 11:48:58 AM
by Chip


dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse





TERMS AND CONDITIONS

In no event will d&u or any person involved in creating, producing, or distributing site information be liable for any direct, indirect, incidental, punitive, special or consequential damages arising out of the use of or inability to use d&u. You agree to indemnify and hold harmless d&u, its domain founders, sponsors, maintainers, server administrators, volunteers and contributors from and against all liability, claims, damages, costs and expenses, including legal fees, that arise directly or indirectly from the use of any part of the d&u site.


TO USE THIS WEBSITE YOU MUST AGREE TO THE TERMS AND CONDITIONS ABOVE


Founded December 2014
SimplePortal 2.3.6 © 2008-2014, SimplePortal