
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@capgo/capacitor-pdf-generator
Advanced tools
Generate PDF files from HTML strings or URLs on iOS and Android.
Generate PDF files from HTML strings or remote URLs.
Port of the Cordova pdf-generator plugin for Capacitor with a modernized native implementation.
The most complete doc is available here: https://capgo.app/docs/plugins/pdf-generator/
| Plugin version | Capacitor compatibility | Maintained |
|---|---|---|
| v8.*.* | v8.*.* | ✅ |
| v7.*.* | v7.*.* | On demand |
| v6.*.* | v6.*.* | ❌ |
| v5.*.* | v5.*.* | ❌ |
Note: The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.
npm install @capgo/capacitor-pdf-generator
npx cap sync
import { PdfGenerator } from '@capgo/capacitor-pdf-generator';
const result = await PdfGenerator.fromData({
data: '<html><body><h1>Hello Capgo</h1></body></html>',
documentSize: 'A4',
orientation: 'portrait',
type: 'base64',
fileName: 'example.pdf',
});
if (result.type === 'base64') {
console.log(result.base64);
}
fromURL(options: PdfGeneratorFromUrlOptions) => Promise<PdfGeneratorResult>
Generates a PDF from the provided URL.
| Param | Type |
|---|---|
options | PdfGeneratorFromUrlOptions |
Returns: Promise<PdfGeneratorResult>
fromData(options: PdfGeneratorFromDataOptions) => Promise<PdfGeneratorResult>
Generates a PDF from a raw HTML string.
| Param | Type |
|---|---|
options | PdfGeneratorFromDataOptions |
Returns: Promise<PdfGeneratorResult>
getPluginVersion() => Promise<{ version: string; }>
Get the native Capacitor plugin version
Returns: Promise<{ version: string; }>
| Prop | Type |
|---|---|
url | string |
| Prop | Type | Description |
|---|---|---|
data | string | HTML document to render. |
baseUrl | string | Base URL to use when resolving relative resources inside the HTML string. When omitted, about:blank is used. |
{ type: 'base64'; base64: string; } | { type: 'share'; completed: boolean; }
FAQs
Generate PDF files from HTML strings or URLs on iOS and Android.
We found that @capgo/capacitor-pdf-generator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.