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 661 times)

Offline smfadmin (OP)

  • SMF (internal) Site
  • Administrator
  • Sr. Member
  • *****
  • Join Date: Dec 2014
  • Location: Management
  • Posts: 629
  • Reputation Power: 0
  • smfadmin has hidden their reputation power
  • Last Login:Yesterday at 11:31:41 PM
  • Supplied Install Member
PDF Intergrity, Tools and Maintenance
« on: August 12, 2026, 01:28:45 PM »
📎 Click on me to view the attachments
ListAttBBC  |  v6.12  |  2026-09-10  |  Andrew.human & Claude.ai
#FileSizeDownloadsInfoDL
00pdfjs.zip5.8 MB1â„šī¸âŦ‡ī¸
01.htaccess601 B1â„šī¸âŦ‡ī¸

Dopetalk is opting for the single master copy rather than the default "distributed model"

This PDF attachment Orphan Report runs every Monday at 6am, logs output and only outputs when something's new:
CLICK ON ME -- Runs every Monday at 6am, logs output, only woutout when something's new

Installation steps:

# 0. Backup the existing version 4 buildand keep the old one until this is confirmed working

cd /root/pdfjs
mv build build.4.0.379.bak 

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

cd /var/www/html
mkdir pdfjs
mkdir pdfjs_backup

cd /root
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/
cp -r pdfjs-6.2.108-dist/* /var/www/html/pdfjs_backup/

# 2. Point all SMFs at the master copy

rm -rf /var/www/html/Themes/default/pdfjs
rm -rf /var/www/html/smf20/Themes/default/pdfjs
rm -rf /var/www/html/smf21/Themes/default/pdfjs

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

# 3. Confirm the symlinks took

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

# 4. Create .htaccess and include the following statements to prevent MIME errors and to dramatically speed up document load time

cd /var/www/html
nano .htaccess
select the following and Shift+ Insert this:

Code: [Select]
# Prevent MIME errors

Options +FollowSymLinks

AddType application/javascript .js
AddType text/javascript .mjs
AddType application/wasm .wasm
AddType text/css .css
AddType application/json .json

AddCharset utf-8 .mjs .js .json

# Dramatically speed up document load time

<IfModule mod_expires.c>
    ExpiresActive On
    <FilesMatch "\.(html|mjs|js|css)$">
        ExpiresDefault "access plus 1 year"
    </FilesMatch>
</IfModule>

<IfModule mod_headers.c>
    <FilesMatch "\.(html|mjs|js|css)$">
        Header set Cache-Control "public, max-age=31536000, immutable"
    </FilesMatch>
</IfModule>

# 5. issue: chown -R apache:apache /var/www/html

# 6. NOT FOR THIS VERSION ! - Set the default to a scrollable window -- so if you need to revert back to version 4 and don't have a backup then 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`):

A. nano +8451 /var/www/html/pdfjs/web/viewer.mjs and change `-1` → `3` (shown below):

 scrollModeOnLoad
: {
    
value3,
    
kindOptionKind.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.

B. Issue: chown -R apache:apache /var/www/html

« Last Edit: August 20, 2026, 08:27:23 PM 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

Offline Chip

  • Server Admin
  • Hero Member
  • *****
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 7382
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 08:33:18 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/html
rm "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:
 


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