SkillAgentSearch skills...

Pdf2htmlEXOptimize

A python tool to reduce pdf2htmlEX output file size.

Install / Use

/learn @yu-liang-kono/Pdf2htmlEXOptimize
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

pdf2htmlEXOptimize

Introduction

pdf2htmlEXOptimize is a python tool set aiming to reduce pdf2htmlEX output file size. The output woff files of pdf2htmlEX are usually bloated and cost lots of space and bandwidth. pdf2htmlEXOptimize is a post-processing tool set trying to minimize the file size.

Prerequsite

htmlify.py

  • usage: python htmlify.py pdf-file output-dir
  • It generates html by pdf2htmlEX using the following options
    • --embed-css=0
    • --embed-font=0
    • --embed-image=0
    • --embed-javascript=0
    • --embed-outline=0
    • --split-pages=1
    • --process-outline=0
    • --external-hint-tool=ttfautohint (If ttfautohint is installed.)
    • --bg-format=jpg
    • --css-filename=main.css
  • The output html is index.html.

optimize_woff.py

  • usage: python optimize_woff.py pdf2htmlEX-output-dir
  • It merges woff files with the same name and modify main.css accordingly.

Related Skills

View on GitHub
GitHub Stars10
CategoryDevelopment
Updated1y ago
Forks1

Languages

Python

Security Score

75/100

Audited on Sep 5, 2024

No findings