Skip to main content

Quickstart

1. Wrap your app with MarkpdfProvider

App.tsx
MarkpdfProvider creates a shared MarkpdfClient and exposes it to the entire tree via context.

2. Upload a file with useConvertFile

UploadForm.tsx
useConvertFile reports upload progress in real time because it uses XMLHttpRequest internally (fetch does not expose upload progress events).

3. Direct access to the client (without progress hook)

useMarkpdf() gives you the raw MarkpdfClient — all @markpdf/sdk methods (convertFile, convertFromUrl, convertStream, pdfIndex, getJob) are available, with no progress report.

Siguiente paso