@officex/core
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

@officex/core

URL to PDF, JSON, TXT, PNG converter for Node.js.

🛠️ Installation

npm i @officex/core
yarn add @officex/core

💻 Usage

import { convert, getBrowser, IConverterConfig } from "@officex/core";

const DEFAULT_CONFIG: IConverterConfig = {
  url: "https://google.com",
  outputFile: "google.pdf",
  size: "Letter",
  extension: "PDF",
  mobileViewport: false,
  flushToDisk: false,
};

async function convertWebpage(config: IConverterConfig = DEFAULT_CONFIG) {
  try {
    return await convert(await getBrowser(), config);
  } catch (error) {
    console.error(error);
  }
}

📑 License

The project is licensed under the GNU General Public License v3.0.

Package Sidebar

Install

npm i @officex/core

Weekly Downloads

1

Version

1.1.1

License

LGPL-3.0-only

Unpacked Size

379 kB

Total Files

21

Last publish

Collaborators

  • i-atlas