ko-pdf-down 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,2 +1,75 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
1
|
+
# PDF Download Library with Korean Support
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
A comprehensive library for generating PDF downloads with built-in Korean language support. The library leverages **html2canvas** for HTML-to-image conversion and integrates seamlessly with PDF generation. Features the **Nanum Gothic** font for optimal Korean text rendering.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Korean Language Support**: Optimized Korean character rendering using Nanum Gothic font
|
|
10
|
+
- **HTML to PDF Conversion**: Reliable HTML element conversion via **html2canvas**
|
|
11
|
+
- **Customizable UI Components**: Flexible button components with various styling options
|
|
12
|
+
- **Storybook Integration**: Built-in component testing and visualization
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install pdf-korean-download
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
Import the library:
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
import PdfDownloadButton from 'pdf-korean-download';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Example implementation:
|
|
29
|
+
|
|
30
|
+
```javascript
|
|
31
|
+
import React from 'react';
|
|
32
|
+
import PdfDownloadButton from 'pdf-korean-download';
|
|
33
|
+
|
|
34
|
+
const App = () => {
|
|
35
|
+
const content = '<h1>안녕하세요! 한글 PDF 테스트입니다.</h1>';
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<PdfDownloadButton
|
|
39
|
+
text="PDF 다운로드"
|
|
40
|
+
fileName="example.pdf"
|
|
41
|
+
content={content}
|
|
42
|
+
style={{
|
|
43
|
+
fontSize: 12,
|
|
44
|
+
lineHeight: 1.5,
|
|
45
|
+
margin: 20
|
|
46
|
+
}}
|
|
47
|
+
variant="primary"
|
|
48
|
+
size="md"
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default App;
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Storybook Integration
|
|
57
|
+
|
|
58
|
+
Run Storybook for component testing:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm run storybook
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Dependencies
|
|
65
|
+
|
|
66
|
+
- **html2canvas**: HTML-to-image conversion
|
|
67
|
+
- **jspdf**: PDF generation
|
|
68
|
+
|
|
69
|
+
## Contributing
|
|
70
|
+
|
|
71
|
+
We welcome contributions! Please submit pull requests or report issues through our GitHub repository.
|
|
72
|
+
|
|
73
|
+
## Author
|
|
74
|
+
|
|
75
|
+
Developed by 9bfish8 (Godeungeo)
|