Skip to content

Instantly share code, notes, and snippets.

@SuperCowProducts
Last active April 6, 2026 13:42
Show Gist options
  • Select an option

  • Save SuperCowProducts/c548e6cb79ffd88840c01ec641584a41 to your computer and use it in GitHub Desktop.

Select an option

Save SuperCowProducts/c548e6cb79ffd88840c01ec641584a41 to your computer and use it in GitHub Desktop.
Turn the built-in static HTML help site into a PDF
# A copy I made 6th May 2026: https://codeberg.org/jipmelon/t/raw/branch/main/Cisco_Packet_Tracer_help.pdf
ar xf CiscoPacketTracer_900_Ubuntu_64bit.deb
tar xf data.tar.xz
cd opt/pt/
box64 packettracer.AppImage --appimage-extract # use `./packettracer.AppImage --appimage-extract` if on x86
cd squashfs-root/opt/pt/help/default
pw() { pandoc --pdf-engine=weasyprint "$1" -o "${1/.*}.pdf"; }
hl=$(echo menu.htm && xidel menu.htm -e '//@href' | grep -P '\.htm$' | sed 's/http\:\/\/tutorials\.ptnetacad\.net\/tutorials80\.htm//')
sed -i.bak -E 's/Skip to main content//g' menu.htm
for i in $hl; do pw "$i"; done # this will take a while
pl=$(echo $hl | sed s/htm/pdf/g)
pdfunite $pl Cisco_Packet_Tracer_help.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment