# a4view **Repository Path**: codeleilei/a4view ## Basic Information - **Project Name**: a4view - **Description**: html 长内容转 A4 纸分页效果,解决边界内容截断问题 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-07-21 - **Last Updated**: 2023-07-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: A4, pdf, TypeScript, 分页 ## README # a4view If you need a preview of the A4 paging effect, then this plugin is worth a try. ## How use ```base npm install a4view ``` ```js import A4View from "a4view"; new A4View({ target: ".container", }).render(".preview"); ``` # Props ```ts export interface IA4ViewOptions { target: string | HTMLElement; background?: string; pageGap?: number; } export default class A4View { public targetContainer: HTMLElement; public previewContainer: HTMLElement; public background: string; public pageGap: number; constructor(options: IA4ViewOptions); render(preview: string): void; setBackground(color: string): void; setA4Gap(gap: number): void; root(): HTMLElement; } ``` ## Example 1. Clone the repository 2. Go to the `a4view` folder 3. `npm install` 4. `npm run dev` ## License MIT © [coderlei](./license)