this post was submitted on 04 Nov 2023
66 points (92.3% liked)

Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ

54565 readers
472 users here now

⚓ Dedicated to the discussion of digital piracy, including ethical problems and legal advancements.

Rules • Full Version

1. Posts must be related to the discussion of digital piracy

2. Don't request invites, trade, sell, or self-promote

3. Don't request or link to specific pirated titles, including DMs

4. Don't submit low-quality posts, be entitled, or harass others



Loot, Pillage, & Plunder

📜 c/Piracy Wiki (Community Edition):


💰 Please help cover server costs.

Ko-Fi Liberapay
Ko-fi Liberapay

founded 1 year ago
MODERATORS
 

Ok so I want to download this embedded PDF/document in order to physically print it. The website allows me to view it as much as I want, but is asking me to fork over 25 + tax USD so i can download the document.

Obviously, i don't want to do that, so I try to download the embedded document via inspect element. But, the weird thing is it not actually loading a pdf, but like really small pictures of each page:

So, my question is basically how can I download this document in order to print it?

PdF link: https://www.sbcaplanroom.com/jobs/2477/plans/goleta-sanitary-district-biosolids-and-energy-phase-1-project/?preview=200647

you are viewing a single comment's thread
view the rest of the comments
[–] andrew_bidlaw@sh.itjust.works 22 points 1 year ago* (last edited 1 year ago) (3 children)

FOR LINUX, COMPLETE AND WORKING

  1. Install xdotool, AutoKey
  2. In Firefox get Save Screenshot: https://addons.mozilla.org/en-US/firefox/addon/savescreenshot/ Then, in Firefox Shortcuts add Ctrl+1 as a hotkey to capture visible page.
  3. Create a script for Autokey in Python, mine is:
import time
import os   
import subprocess

pages = dialog.input_dialog(title='', message='Number of pages:', default='5').data

time.sleep(1)
for k in range(1,int(pages)):
    subprocess.run(["xdotool", "key", "ctrl+1"]) # Plugin's hotkey
    time.sleep(2)
    subprocess.run(["xdotool", "click", "1"]) # Mouseclick
    time.sleep(2)

subprocess.run(["xdotool", "key", "ctrl+1"]) # to screenshot the last one
  1. In the bottom of a program, set a hotkey to launch it (I set it to Home).
  2. Open OP's page and via Inspect Element find the link to embed. It's https://www.sbcaplanroom.com/preview/2477/12610/200647
  3. Press F11, make the whole picture fit.
  4. Place mouse pointer over next page button, so it clicks each time.
  5. Lauch my Autokey script via Home button.
  6. Enter number of pages.
  7. See how it does it.
  8. Open screenshots directory in XnView, select them. Locate it's BatchConvert tool, in Actions tab select a crop action and adjust it to pages' margins. ACHTUNG The last one should be done differently, you can open it in XnV and crop this one alone.
  9. Use any tool to stitch them back together into a PDF. I've used PDF Arranger: https://github.com/pdfarranger/pdfarranger But some user down there said it crashed on 600-something pages document.

Result: https://files.catbox.moe/iivoga.pdf

[–] ftbd@feddit.de 4 points 1 year ago (1 children)

Compatible with any system? AFAIK autohotkey is windows-only

[–] andrew_bidlaw@sh.itjust.works 3 points 1 year ago* (last edited 1 year ago)

Damn, you are right.

I've found this Q-A thread about alternatives for Linux: https://unix.stackexchange.com/a/533392 I'd need to look into it.

Good god XnV and plugins aren't.

Upd: AutoKey works. Scripts are on Python.

[–] iHUNTcriminals@lemm.ee 2 points 1 year ago

They say the op has magic powers!

[–] konalt@lemmy.world 1 points 1 year ago (1 children)

Got any suggestions for image-to-pdf tools? The ones i've tried online all break after 300 pages or so

[–] andrew_bidlaw@sh.itjust.works 2 points 1 year ago (1 children)

PDF Arranger: https://github.com/pdfarranger/pdfarranger

On the top there's a button to import - Select images you want to add - Save as.

[–] konalt@lemmy.world 3 points 1 year ago (1 children)
[–] andrew_bidlaw@sh.itjust.works 1 points 1 year ago (1 children)
[–] konalt@lemmy.world 3 points 1 year ago (1 children)

I waited about 20 minutes and it eventually crashed. No luck.

[–] andrew_bidlaw@sh.itjust.works 2 points 1 year ago* (last edited 1 year ago) (1 children)

Dammit. Are you on Windows? I can drop some pirated Acrobat for you to try.

600 seems like an overkill, maybe you can try to add a 100 at a time?

[–] konalt@lemmy.world 2 points 1 year ago (1 children)

Somehow I never thought of using Acrobat. Seems to be working, thanks for reminding me!

[–] andrew_bidlaw@sh.itjust.works 1 points 1 year ago

Np. Hope it goes well.