PDF Generator __CAPGO_KEEP_0__ リポジトリ
インストール手順とフルマークダウンガイドを含む設定プロンプトをコピーしてください。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-pdf-generator`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/pdf-generator/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
「インストール」というタイトルのセクションCapgoのAIアシストセットアップを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを使用してください。
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のプロンプトを使用してください。
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-pdf-generator` plugin in my project.手動設定を選択する場合は、以下のコマンドを実行してプラグインをインストールし、下記のプラットフォーム固有の手順に従ってください。
bun add @capgo/capacitor-pdf-generatorbunx cap syncインポート
「インポート」のセクションimport { PdfGenerator } from '@capgo/capacitor-pdf-generator';API オーバービュー
「API オーバービュー」のセクションfromURL
URL から指定された URL から PDF を生成します。
import { PdfGenerator } from '@capgo/capacitor-pdf-generator';
await PdfGenerator.fromURL({} as PdfGeneratorFromUrlOptions);fromData
Section titled “fromData”raw HTMLからPDFを生成します。
import { PdfGenerator } from '@capgo/capacitor-pdf-generator';
await PdfGenerator.fromData({} as PdfGeneratorFromDataOptions);PdfGeneratorFromUrlOptions
Section titled “PdfGeneratorFromUrlOptions”export interface PdfGeneratorFromUrlOptions extends PdfGeneratorCommonOptions { url: string;}PdfGeneratorResult
Section titled “PdfGeneratorResult”export type PdfGeneratorResult = | { type: 'base64'; base64: string; } | { type: 'share'; completed: boolean; };PdfGeneratorFromDataOptions
Section titled “PdfGeneratorFromDataOptions”export interface PdfGeneratorFromDataOptions extends PdfGeneratorCommonOptions { /** * HTML document to render. */ data: string; /** * Base URL to use when resolving relative resources inside the HTML string. * When omitted, `about:blank` is used. */ baseUrl?: string;}プラグインの src/definitions.tsAPIの公開部分がアップストリームで変更された場合に、再度Syncを実行してください。
Getting Startedから続けてください
Getting Startedから続けてくださいCapacitorを使用している場合 Getting Startedを使用して、ストレージとファイルハンドリングの計画を立ててください。Capacitorを__CAPGO_KEEP_0__と__CAPGO_KEEP_1__で接続してください。 Capacitorを使用して、__CAPGO_KEEP_0__と__CAPGO_KEEP_1__でnative capabilityを使用してください。 Capacitorを使用して、capgoとcapacitorでimplementation detailを使用してください。 Capacitorを使用して、capgoとcapacitorでnative capabilityを使用してください。 Capacitorを使用して、capgoとcapacitorでimplementation detailを使用してください。 Capacitorを使用して、capgoとcapacitorでnative capabilityを使用してください。 Using @capgo/capacitor-data-storage-sqlite for the native capability in Using @capgo/capacitor-data-storage-sqlite @capgo/capacitor-file for the implementation detail in @capgo/capacitor-file, and Using @capgo/capacitor-file for the native capability in Using @capgo/capacitor-file