Metadata-Version: 2.4
Name: docugraph_pdf2html
Version: 1.0.4
Summary: Package that provides methods to access DocuGraph PDF-TO-HTML APIs
Author-email: Husin Dieh <husin@handisplay.com.my>
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.32.3
Dynamic: license-file

# docugraph_pdf2html

An API client Python package that can be used to access the REST API of DocuGraph PDF-TO-HTML.

## Features

- Convert PDF to HTML

## Installation

**Requirements:** Python 3.10 or higher

### Windows

```powershell
# Create and activate a virtual environment (recommended)
py -m venv .venv
.venv\Scripts\activate

# Install the package
py -m pip install docugraph-pdf2html
```

> If PowerShell blocks activation, run:
> `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`

### MacOS

```bash
# Create and activate a virtual environment (recommended)
python3 -m venv .venv
source .venv/bin/activate

# Install the package
pip install docugraph-pdf2html
```

### Linux

```bash
# Debian/Ubuntu may need these first
sudo apt install python3-venv python3-pip

# Create and activate a virtual environment (recommended)
python3 -m venv .venv
source .venv/bin/activate

# Install the package
pip install docugraph-pdf2html
```

## Quick Start

```python
import docugraph_api as api

from pathlib import Path

api_service = api.initiateApi(api_key = <YOUR_API_KEY>, service_type = api.ApiService.PDF_TO_HTML)

api_service.invoke_api(input_path = <YOUR_SOURCE_PATH>, output_path_without_ext = output_path_without_ext)

if api_service.output:
    output_path = api_service.output

    if Path(output_path).exists():
        print(f"[INFO] Success!  Output created in {output_path}")
    else:
        print(f"[INFO] Failed!  There's no output.")
else:
    print("[INFO] There's no output.")
    print(f"[INFO] Reason: {api_service.message}")
```

## Documentation

- TBA

## License

- TBA

## Contact

- TBA
