PantherPDF Cloud Editor React component
PantherPDF is a report editor and PDF generator service for creating customized PDF reports.
This package is a thin wrapper around a cloud based editor for simplified integration into React apps. There is also a Vue and Angular wrapper.
Underlying editor is open source and available here.
Installation
npm install --save @pantherpdf/cloud-editor-react
reportSecret
:
Example using Report data is stored on PantherPDF database.
import CloudEditor from '@pantherpdf/cloud-editor-react';
export function EditorPage()
{
return (
<CloudEditor
reportSecret="..."
style={{ width: '100%', height: '95vh', border: 'none' }}
/>
);
}
value
:
Example using Report data is stored on customer's database.
import { useState } from 'react';
import CloudEditor, { ReportCloudData } from '@pantherpdf/cloud-editor-react';
export function EditorPage()
{
const [report, setReport] = useState<ReportCloudData>(null);
return (
<CloudEditor
editorKey="..."
value={report}
onChange={setReport}
style={{ width: '100%', height: '95vh', border: 'none' }}
/>
);
}
Props
Parameter | Description |
---|---|
reportSecret |
Access token for a report. |
editorKey |
Access token for editor. |
lang |
Editor language. Possible values: en (default, uses metric units) and en-us which uses imperial units. |
value |
ReportCloudData from customer's database. |
onChange |
Callback when value changes. |
License
MIT