Skip to main content

DocMaker Web UI

DocMaker Web UI is for converting various document formats to PDF format. Generate PDF documents from files such as Markdown, HTML, and CSS by combining them.

Key Features

  • Generate PDFs by combining Markdown, HTML, and CSS.
  • Add custom headers and footers.
  • User-friendly Gradio web interface.

Installation

Prerequisites

Install via pip

pip install docmake

Manual Installation

git clone https://github.com/morisono/docmaker_webui.git docmake
cd docmake
pip install -r requirements.txt

CLI Usage

usage: 
    [Examples]
        - Generate a PDF:
            docmake -i in_*.[html|pdf] -o out.pdf [options]

            For example:
                docmake -i in_*.html -o out.pdf --scale 0.8 --css ' h1 { color: red }'

        - Encrypt/Decrypto a PDF:
            docmake -i in.[html|pdf] -o out.pdf [options]

            For example:
                docmake -i demo.pdf -o demo.encrypted.pdf --encrypto --autogen
                docmake -i demo.encrypted.pdf -o demo.decrypted.pdf --decrypto

         - Read remote file:
            docmake -i $gist --config config.yaml --verbose --qr 40

    [Units]
        You can use the following units for width, height, and margin options:
        - px (pixels) - Default unit., in (inches)., cm (centimeters)., mm (millimeters).

    [Formats]
        The following paper formats are available for the format option:
        - Letter, Legal, Tabloid, Ledger, A0, A1, A2, A3, A4 (default), A5

    [PDF Metadata]
        Metadata format: "/Key Value" pairs separated by space.
        - /Title, /Author, /Subject, /Author, /Keyword, /Creator, /Producer, /CreateDate,  /ModDate, /Trapped
    

Generate PDF from HTML pages.

options:
  -h, --help            show this help message and exit
  -i INPUT [INPUT ...], --input INPUT [INPUT ...]
                        Input files.
  -o OUTPUT, --output OUTPUT
                        Output file path.
  --scale SCALE         Scale of the printed page | 0.8 for 80 percent.
  --displayHeaderFooter
                        Display header and footer.
  --headerTemplate HEADERTEMPLATE
                        Add header template as [url|path|content].
  --footerTemplate FOOTERTEMPLATE
                        Add footer template as [url|path|content].
  --printBackground     Print background images.
  --landscape           Use landscape paper orientation.
  --pageRanges PAGERANGES
                        Page ranges to print | '1-5,8,11-13'.
  --format FORMAT       Paper format | 'A4'.
  --width WIDTH         Paper width | '10cm'.
  --height HEIGHT       Paper height | '10mm'.
  --margin MARGIN       Margin values (e.g., 'top 10mm right 10mm')
  --css CSS             Add css as [url|path|content]
  --config CONFIG       Path to the config file.
  --emulateMedia {screen,print}
                        Type of emulate media.
  --metadata METADATA   Add metadata in the format '/Key: Value'. Example: '/Title Document'.
  --verbose             Print parameters when verbose.
  --encrypto            Encrypt a PDF file.
  --autogen             Automatically generate password for encryption.
  --decrypto            Decrypt a PDF file.
  --regen               Regenerate and send recovery key for decryption.
  --webui               [WIP] Launch Gradio web UI.

Web UI Usage

This section provides instructions on how to use the web user interface (Web UI) of DocMaker Web UI.

  1. Start the app in the project directory:

    docmake --webui
    
  2. Access it in your web browser at http://127.0.0.1:7860.

  3. Use the web interface to configure input files and options.

  4. Click the "▶" button to generate a PDF.

License

This project is provided under the MIT License. See the LICENSE file for details.

Support

For inquiries regarding support, including questions and bug reports, please use GitHub Issues.

Metadata

Release files for docmake 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docmake 0.1.6
File Size Uploaded
docmake-0.1.6.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docmake 0.1.6
File Interpreter ABI Platform
docmake-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 30.5 kB

Release files / docmake-0.1.6.tar.gz

Download URL docmake-0.1.6.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
606539034b915e81e0a6acbd28e8e464114467b4b8b66f20ee31a6f27df45101
BLAKE2b-256 checksum
How to use checksums
619d24a0a820e1fb35b35e16f1f40abb44ec6a624fdfe3a8faccc90d0b36f6af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.14 Linux/5.15.146.1-microsoft-standard-WSL2

Release files / docmake-0.1.6-py3-none-any.whl

Download URL docmake-0.1.6-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85a39be344f3a7d522e8535af9f60e60b398787f85b1ca4080fbc97dfe69c347
BLAKE2b-256 checksum
How to use checksums
31413c7c334bfbecfc0308c721b5b41e472853e2820f2ee1ab37989936cfcae9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.14 Linux/5.15.146.1-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page