Skip to content

__CAPGO_KEEP_2__

GitHub

Capgo의 AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. 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.

If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:

터미널 창
bun add @capgo/capacitor-pdf-generator
bunx cap sync
import { PdfGenerator } from '@capgo/capacitor-pdf-generator';

제공된 URL에서 PDF를 생성합니다.

import { PdfGenerator } from '@capgo/capacitor-pdf-generator';
await PdfGenerator.fromURL({} as PdfGeneratorFromUrlOptions);

__CAPGO_KEEP_0__을 HTML 문자열에서 PDF로 생성합니다.

import { PdfGenerator } from '@capgo/capacitor-pdf-generator';
await PdfGenerator.fromData({} as PdfGeneratorFromDataOptions);

PdfGeneratorFromUrlOptions

URL 옵션으로 PDF 생성기
export interface PdfGeneratorFromUrlOptions extends PdfGeneratorCommonOptions {
url: string;
}

PdfGeneratorResult

PDF 생성 결과
export type PdfGeneratorResult =
| {
type: 'base64';
base64: string;
}
| {
type: 'share';
completed: boolean;
};

PdfGeneratorFromDataOptions

데이터 옵션으로 PDF 생성기
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;
}

소스 오브 트루스

소스 오브 트루스 섹션

This page is generated from the plugin’s src/definitions.ts업스트림에서 pubic API이 변경되면 다시 싱크를 실행하세요.

Getting Started에서 계속

Getting Started에서 계속하기

Capacitor를 사용하고 계신가요? Getting Started Capacitor를 사용하여 저장소 및 파일 처리를 계획하고 싶으시다면 __CAPGO_KEEP_0__와 __CAPGO_KEEP_1__을 연결하세요. capgo/capacitor-pdf-generator를 사용하여 Native Capability capgo/capacitor-pdf-generator를 사용하여 Native Capability capgo/capacitor-data-storage-sqlite를 사용하여 Implementation Detail capgo/capacitor-data-storage-sqlite를 사용하여 Implementation Detail Using @capgo/capacitor-data-storage-sqlite 자연스러운 기능을 사용하기 위해 @capgo/capacitor-data-storage-sqlite를 사용하세요. @capgo/capacitor-file implementation detail을 위해 @capgo/capacitor-file을 사용하세요. 자연스러운 기능을 사용하기 위해 @capgo/capacitor-file을 사용하세요. 자연스러운 기능을 사용하기 위해 @capgo/capacitor-file을 사용하세요.