@things-factory/integration-headless 7.0.40 → 7.0.41

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.
Files changed (39) hide show
  1. package/dist-server/engine/connector/headless-connector.d.ts +1 -0
  2. package/dist-server/engine/connector/headless-connector.js +3 -0
  3. package/dist-server/engine/connector/headless-connector.js.map +1 -1
  4. package/dist-server/engine/task/headless-pdf-capture-board.js +1 -1
  5. package/dist-server/engine/task/headless-pdf-capture-board.js.map +1 -1
  6. package/dist-server/engine/task/headless-pdf-save.js +34 -19
  7. package/dist-server/engine/task/headless-pdf-save.js.map +1 -1
  8. package/dist-server/tsconfig.tsbuildinfo +1 -1
  9. package/helps/integration/connector/headless-connector.ja.md +71 -0
  10. package/helps/integration/connector/headless-connector.ko.md +72 -0
  11. package/helps/integration/connector/headless-connector.md +71 -0
  12. package/helps/integration/connector/headless-connector.ms.md +73 -0
  13. package/helps/integration/connector/headless-connector.zh.md +71 -0
  14. package/helps/integration/task/headless-pdf-capture-board.ja.md +51 -0
  15. package/helps/integration/task/headless-pdf-capture-board.ko.md +51 -0
  16. package/helps/integration/task/headless-pdf-capture-board.md +51 -0
  17. package/helps/integration/task/headless-pdf-capture-board.ms.md +53 -0
  18. package/helps/integration/task/headless-pdf-capture-board.zh.md +51 -0
  19. package/helps/integration/task/headless-pdf-capture.ja.md +45 -0
  20. package/helps/integration/task/headless-pdf-capture.ko.md +45 -0
  21. package/helps/integration/task/headless-pdf-capture.md +45 -0
  22. package/helps/integration/task/headless-pdf-capture.ms.md +47 -0
  23. package/helps/integration/task/headless-pdf-capture.zh.md +45 -0
  24. package/helps/integration/task/headless-pdf-open.ja.md +55 -0
  25. package/helps/integration/task/headless-pdf-open.ko.md +55 -0
  26. package/helps/integration/task/headless-pdf-open.md +55 -0
  27. package/helps/integration/task/headless-pdf-open.ms.md +57 -0
  28. package/helps/integration/task/headless-pdf-open.zh.md +55 -0
  29. package/helps/integration/task/headless-pdf-save.ja.md +23 -0
  30. package/helps/integration/task/headless-pdf-save.ko.md +25 -0
  31. package/helps/integration/task/headless-pdf-save.md +23 -0
  32. package/helps/integration/task/headless-pdf-save.ms.md +23 -0
  33. package/helps/integration/task/headless-pdf-save.zh.md +23 -0
  34. package/package.json +5 -4
  35. package/server/engine/connector/headless-connector.ts +4 -0
  36. package/server/engine/task/headless-pdf-capture-board.ts +1 -1
  37. package/server/engine/task/headless-pdf-save.ts +41 -18
  38. package/translations/en.json +1 -0
  39. package/translations/ko.json +1 -0
@@ -0,0 +1,45 @@
1
+ ### ヘッドレスPDFキャプチャタスク (Headless PDF Capture Task)
2
+
3
+ **ヘッドレスPDFキャプチャタスク**は、HTMLコンテンツをレンダリングしてPDFの本文ページを生成するタスクです。このタスクは、`headless-pdf-open`タスクで作成されたPDFドキュメントに新しいページを追加し、ヘッダー、フッター、ウォーターマークなどの設定を含めることができます。
4
+
5
+ #### パラメータ説明
6
+
7
+ - **accessor**: PDF生成に必要なデータにアクセスするためのパスを指定します。このパスは、データ構造から必要な情報を抽出するために使用されます。
8
+
9
+ - **htmlContent**: PDFドキュメントの本文としてレンダリングするHTMLコンテンツを指定します。HTMLを使用してページの内容を定義できます。
10
+
11
+ - **format**: PDFページのサイズを指定します。`A4`、`A3`、`Letter`、`Legal`などから選択できます。
12
+
13
+ - **width**: ページの幅を指定します。例: `"8.5in"`、`"21cm"`、`"600px"`。指定しない場合、`format`に従って自動的に設定されます。
14
+
15
+ - **height**: ページの高さを指定します。例: `"11in"`、`"29.7cm"`、`"800px"`。指定しない場合、`format`に従って自動的に設定されます。
16
+
17
+ - **marginTop**: ページの上部の余白を指定します。例: `"0.5in"`、`"1cm"`、`"100px"`。
18
+
19
+ - **marginBottom**: ページの下部の余白を指定します。例: `"0.5in"`、`"1cm"`、`"100px"`。
20
+
21
+ - **marginLeft**: ページの左側の余白を指定します。例: `"0.5in"`、`"1cm"`、`"100px"`。
22
+
23
+ - **marginRight**: ページの右側の余白を指定します。例: `"0.5in"`、`"1cm"`、`"100px"`。
24
+
25
+ - **scale**: ページコンテンツのスケールを調整します。デフォルト値は`1`で、値が大きいほどコンテンツが拡大されます。
26
+
27
+ - **printBackground**: `true`に設定すると、HTMLページの背景画像や色が含まれます。デフォルト値は`true`です。
28
+
29
+ - **landscape**: `true`に設定すると、PDFが横向きに生成されます。デフォルト値は`false`です。
30
+
31
+ - **preferCSSPageSize**: `true`に設定すると、CSSで定義されたページサイズが優先されます。デフォルト値は`false`です。
32
+
33
+ #### 主な機能
34
+
35
+ - **HTMLコンテンツのレンダリング**: HTMLテンプレートをレンダリングしてPDFページを生成します。HTMLを使用して複雑なレイアウトやスタイルを適用できます。
36
+ - **ヘッダーとフッターの設定**: 各ページに動的にヘッダーとフッターを挿入できます。ヘッダーとフッターはejsテンプレートで作成され、ページ番号や総ページ数などを動的に含めることができます。
37
+ - **ウォーターマークの設定**: PDFページにウォーターマークを追加できます。ウォーターマークはテキストとして表示され、通常はページの中央に半透明で配置されます。
38
+ - **ページ設定**: ページサイズ、余白、スケールなどを設定して、PDFドキュメントのレイアウトを調整できます。
39
+
40
+ #### 使用時の注意点
41
+
42
+ - **`HeadlessPDFOpen`タスクを事前に実行する必要がある**: `HeadlessPDFCapture`タスクは、必ず`HeadlessPDFOpen`タスクの後に実行する必要があります。そうでない場合、PDFドキュメントが存在しないため、エラーが発生します。
43
+ - **動的データ処理**: ejsテンプレートを使用してHTMLコンテンツを動的に生成でき、テンプレート内で`accessor`を使用してデータにアクセスできます。
44
+
45
+ - **ヘッダー/フッター**: `HeadlessPDFOpen`で設定されたヘッダーとフッターが自動的に含まれ、必要に応じて各ページごとに調整できます。
@@ -0,0 +1,45 @@
1
+ ### Headless PDF Capture Task
2
+
3
+ **Headless PDF Capture Task**는 HTML 콘텐츠를 렌더링하여 PDF의 본문 페이지를 생성하는 작업입니다. 이 작업은 `headless-pdf-open` 작업으로 생성된 PDF 문서에 새로운 페이지를 추가하며, 헤더, 푸터, 워터마크 등의 설정을 포함할 수 있습니다.
4
+
5
+ #### 매개변수 설명
6
+
7
+ - **accessor**: PDF 생성에 필요한 데이터에 접근하기 위한 경로를 지정합니다. 이 경로는 데이터 구조에서 원하는 정보를 추출하는 데 사용됩니다.
8
+
9
+ - **htmlContent**: PDF 문서의 본문으로 렌더링할 HTML 콘텐츠를 지정합니다. HTML을 사용하여 페이지의 내용을 정의할 수 있습니다.
10
+
11
+ - **format**: PDF 페이지의 크기를 지정합니다. `A4`, `A3`, `Letter`, `Legal` 등의 값 중에서 선택할 수 있습니다.
12
+
13
+ - **width**: 페이지의 폭을 지정합니다. 예: `"8.5in"`, `"21cm"`, `"600px"`. 지정하지 않으면 `format`에 따라 자동으로 설정됩니다.
14
+
15
+ - **height**: 페이지의 높이를 지정합니다. 예: `"11in"`, `"29.7cm"`, `"800px"`. 지정하지 않으면 `format`에 따라 자동으로 설정됩니다.
16
+
17
+ - **marginTop**: 페이지 상단 여백을 지정합니다. 예: `"0.5in"`, `"1cm"`, `"100px"`.
18
+
19
+ - **marginBottom**: 페이지 하단 여백을 지정합니다. 예: `"0.5in"`, `"1cm"`, `"100px"`.
20
+
21
+ - **marginLeft**: 페이지 왼쪽 여백을 지정합니다. 예: `"0.5in"`, `"1cm"`, `"100px"`.
22
+
23
+ - **marginRight**: 페이지 오른쪽 여백을 지정합니다. 예: `"0.5in"`, `"1cm"`, `"100px"`.
24
+
25
+ - **scale**: 페이지 콘텐츠의 스케일을 조정합니다. 기본값은 `1`이며, 값이 클수록 콘텐츠가 확대됩니다.
26
+
27
+ - **printBackground**: `true`로 설정하면, HTML 페이지의 배경 이미지나 색상이 포함됩니다. 기본값은 `true`입니다.
28
+
29
+ - **landscape**: `true`로 설정하면, PDF가 가로 방향으로 생성됩니다. 기본값은 `false`입니다.
30
+
31
+ - **preferCSSPageSize**: `true`로 설정하면, CSS에서 정의된 페이지 크기를 우선시하여 사용합니다. 기본값은 `false`입니다.
32
+
33
+ #### 주요 기능
34
+
35
+ - **HTML 콘텐츠 렌더링**: HTML 템플릿을 렌더링하여 PDF 페이지를 생성합니다. HTML을 사용하여 복잡한 레이아웃과 스타일을 적용할 수 있습니다.
36
+ - **헤더 및 푸터 설정**: 각 페이지에 동적으로 헤더와 푸터를 삽입할 수 있습니다. 헤더와 푸터는 ejs 템플릿으로 작성되며, 페이지 번호와 총 페이지 수 등을 동적으로 포함할 수 있습니다.
37
+ - **워터마크 설정**: PDF 페이지에 워터마크를 추가할 수 있습니다. 워터마크는 텍스트로 표시되며, 페이지의 중앙에 반투명으로 배치할 수 있습니다.
38
+ - **페이지 설정**: 페이지의 크기, 여백, 스케일 등을 설정하여 PDF 문서를 원하는 레이아웃으로 조정할 수 있습니다.
39
+
40
+ #### 사용 시 유의사항
41
+
42
+ - **이전에 `HeadlessPDFOpen` 작업이 실행되어야 함**: `HeadlessPDFCapture` 작업은 반드시 이전에 `HeadlessPDFOpen` 작업이 수행된 후에 실행되어야 합니다. 그렇지 않으면 PDF 문서가 존재하지 않기 때문에 오류가 발생합니다.
43
+ - **동적 데이터 처리**: ejs 템플릿을 통해 동적으로 HTML 콘텐츠를 생성할 수 있으며, 템플릿에서 `accessor`를 사용하여 데이터에 접근할 수 있습니다.
44
+
45
+ - **헤더/푸터**: `HeadlessPDFOpen`에서 설정된 헤더와 푸터가 자동으로 포함될 수 있으며, 필요에 따라 각 페이지에 맞게 조정할 수 있습니다.
@@ -0,0 +1,45 @@
1
+ ### Headless PDF Capture Task
2
+
3
+ **Headless PDF Capture Task** is a task that generates the body pages of a PDF by rendering HTML content. This task adds new pages to a PDF document created by the `headless-pdf-open` task and can include settings such as headers, footers, and watermarks.
4
+
5
+ #### Parameter Descriptions
6
+
7
+ - **accessor**: Specifies the path to access the data required for PDF generation. This path is used to extract the desired information from the data structure.
8
+
9
+ - **htmlContent**: Specifies the HTML content to be rendered as the body of the PDF document. You can define the content of the page using HTML.
10
+
11
+ - **format**: Specifies the size of the PDF page. Values such as `A4`, `A3`, `Letter`, `Legal`, etc., can be selected.
12
+
13
+ - **width**: Specifies the width of the page, e.g., `"8.5in"`, `"21cm"`, `"600px"`. If not specified, it will be automatically set according to the `format`.
14
+
15
+ - **height**: Specifies the height of the page, e.g., `"11in"`, `"29.7cm"`, `"800px"`. If not specified, it will be automatically set according to the `format`.
16
+
17
+ - **marginTop**: Specifies the top margin of the page, e.g., `"0.5in"`, `"1cm"`, `"100px"`.
18
+
19
+ - **marginBottom**: Specifies the bottom margin of the page, e.g., `"0.5in"`, `"1cm"`, `"100px"`.
20
+
21
+ - **marginLeft**: Specifies the left margin of the page, e.g., `"0.5in"`, `"1cm"`, `"100px"`.
22
+
23
+ - **marginRight**: Specifies the right margin of the page, e.g., `"0.5in"`, `"1cm"`, `"100px"`.
24
+
25
+ - **scale**: Adjusts the scale of the page content. The default value is `1`, and the larger the value, the larger the content.
26
+
27
+ - **printBackground**: When set to `true`, background images or colors of the HTML page are included. The default value is `true`.
28
+
29
+ - **landscape**: When set to `true`, the PDF is generated in landscape orientation. The default value is `false`.
30
+
31
+ - **preferCSSPageSize**: When set to `true`, the page size defined in CSS is preferred. The default value is `false`.
32
+
33
+ #### Key Features
34
+
35
+ - **HTML Content Rendering**: Renders HTML templates to generate PDF pages. You can apply complex layouts and styles using HTML.
36
+ - **Header and Footer Settings**: Dynamically insert headers and footers on each page. Headers and footers are written using ejs templates, which can dynamically include page numbers and total pages.
37
+ - **Watermark Settings**: Add a watermark to the PDF pages. The watermark is displayed as text, usually placed semi-transparently in the center of the page.
38
+ - **Page Settings**: Configure the layout of the PDF document by setting the page size, margins, scale, etc.
39
+
40
+ #### Usage Notes
41
+
42
+ - **Must Execute `HeadlessPDFOpen` Task First**: The `HeadlessPDFCapture` task must be executed after the `HeadlessPDFOpen` task. Otherwise, an error will occur because the PDF document does not exist.
43
+ - **Dynamic Data Handling**: HTML content can be generated dynamically using ejs templates, and `accessor` can be used to access data within the template.
44
+
45
+ - **Headers/Footers**: The headers and footers set in `HeadlessPDFOpen` are automatically included and can be adjusted for each page if necessary.
@@ -0,0 +1,47 @@
1
+ ### Tugas Tangkap PDF Tanpa Kepala (Headless PDF Capture Task)
2
+
3
+ **Tugas Tangkap PDF Tanpa Kepala** ialah tugas yang menjana halaman badan PDF dengan merender kandungan HTML. Tugas ini menambah halaman baru kepada dokumen PDF yang dihasilkan oleh tugas `headless-pdf-open`, dan boleh menyertakan tetapan seperti header, footer, dan watermark.
4
+
5
+ #### Penerangan Parameter
6
+
7
+ - **accessor**: Menetapkan laluan untuk mengakses data yang diperlukan untuk penjanaan PDF. Laluan ini digunakan untuk mengekstrak maklumat yang diperlukan daripada struktur data.
8
+
9
+ - **htmlContent**: Menetapkan kandungan HTML yang akan dirender sebagai badan dokumen PDF. Anda boleh menggunakan HTML untuk mentakrifkan kandungan halaman.
10
+
11
+ - **format**: Menetapkan saiz halaman PDF. Anda boleh memilih antara nilai `A4`, `A3`, `Letter`, `Legal`, dan lain-lain.
12
+
13
+ - **width**: Menetapkan lebar halaman. Contoh: `"8.5in"`, `"21cm"`, `"600px"`. Jika tidak ditetapkan, ia
14
+
15
+ akan diselaraskan secara automatik berdasarkan `format`.
16
+
17
+ - **height**: Menetapkan ketinggian halaman. Contoh: `"11in"`, `"29.7cm"`, `"800px"`. Jika tidak ditetapkan, ia akan diselaraskan secara automatik berdasarkan `format`.
18
+
19
+ - **marginTop**: Menetapkan margin atas halaman. Contoh: `"0.5in"`, `"1cm"`, `"100px"`.
20
+
21
+ - **marginBottom**: Menetapkan margin bawah halaman. Contoh: `"0.5in"`, `"1cm"`, `"100px"`.
22
+
23
+ - **marginLeft**: Menetapkan margin kiri halaman. Contoh: `"0.5in"`, `"1cm"`, `"100px"`.
24
+
25
+ - **marginRight**: Menetapkan margin kanan halaman. Contoh: `"0.5in"`, `"1cm"`, `"100px"`.
26
+
27
+ - **scale**: Melaraskan skala kandungan halaman. Nilai lalai ialah `1`, dan semakin besar nilainya, semakin besar kandungan.
28
+
29
+ - **printBackground**: Apabila ditetapkan kepada `true`, imej latar belakang atau warna halaman HTML akan disertakan. Nilai lalai ialah `true`.
30
+
31
+ - **landscape**: Apabila ditetapkan kepada `true`, PDF akan dijana dalam orientasi landskap. Nilai lalai ialah `false`.
32
+
33
+ - **preferCSSPageSize**: Apabila ditetapkan kepada `true`, saiz halaman yang ditentukan dalam CSS akan diutamakan. Nilai lalai ialah `false`.
34
+
35
+ #### Fungsi Utama
36
+
37
+ - **Render Kandungan HTML**: Merender templat HTML untuk menghasilkan halaman PDF. Anda boleh menggunakan HTML untuk menerapkan susun atur dan gaya yang kompleks.
38
+ - **Tetapan Header dan Footer**: Boleh memasukkan header dan footer secara dinamik pada setiap halaman. Header dan footer ditulis menggunakan templat ejs, yang boleh memasukkan nombor halaman dan jumlah halaman secara dinamik.
39
+ - **Tetapan Watermark**: Boleh menambah watermark pada halaman PDF. Watermark dipaparkan sebagai teks, dan biasanya diletakkan secara lut sinar di tengah halaman.
40
+ - **Tetapan Halaman**: Boleh melaraskan saiz halaman, margin, skala, dan lain-lain untuk menyusun dokumen PDF mengikut keinginan anda.
41
+
42
+ #### Perhatian Semasa Penggunaan
43
+
44
+ - **Tugas `HeadlessPDFOpen` perlu dijalankan terlebih dahulu**: Tugas `HeadlessPDFCapture` mesti dijalankan selepas tugas `HeadlessPDFOpen`. Jika tidak, dokumen PDF tidak wujud, dan ralat akan berlaku.
45
+ - **Pemprosesan Data Dinamik**: Kandungan HTML boleh dijana secara dinamik menggunakan templat ejs, dan `accessor` boleh digunakan untuk mengakses data dalam templat.
46
+
47
+ - **Header/Footer**: Header dan footer yang ditetapkan dalam `HeadlessPDFOpen` akan disertakan secara automatik, dan boleh disesuaikan mengikut setiap halaman jika perlu.
@@ -0,0 +1,45 @@
1
+ ### 无头PDF捕捉任务 (Headless PDF Capture Task)
2
+
3
+ **无头PDF捕捉任务**是通过渲染HTML内容来生成PDF正文页面的任务。此任务将新页面添加到由`headless-pdf-open`任务创建的PDF文档中,并可以包括页眉、页脚和水印等设置。
4
+
5
+ #### 参数说明
6
+
7
+ - **accessor**: 指定用于生成PDF的数据的访问路径。该路径用于从数据结构中提取所需信息。
8
+
9
+ - **htmlContent**: 指定要渲染为PDF文档正文的HTML内容。可以使用HTML定义页面的内容。
10
+
11
+ - **format**: 指定PDF页面的大小。可以选择`A4`、`A3`、`Letter`、`Legal`等值。
12
+
13
+ - **width**: 指定页面的宽度。例如:`"8.5in"`、`"21cm"`、`"600px"`。如果未指定,将根据`format`自动设置。
14
+
15
+ - **height**: 指定页面的高度。例如:`"11in"`、`"29.7cm"`、`"800px"`。如果未指定,将根据`format`自动设置。
16
+
17
+ - **marginTop**: 指定页面的上边距。例如:`"0.5in"`、`"1cm"`、`"100px"`。
18
+
19
+ - **marginBottom**: 指定页面的下边距。例如:`"0.5in"`、`"1cm"`、`"100px"`。
20
+
21
+ - **marginLeft**: 指定页面的左边距。例如:`"0.5in"`、`"1cm"`、`"100px"`。
22
+
23
+ - **marginRight**: 指定页面的右边距。例如:`"0.5in"`、`"1cm"`、`"100px"`。
24
+
25
+ - **scale**: 调整页面内容的缩放比例。默认值为`1`,值越大,内容越大。
26
+
27
+ - **printBackground**: 如果设置为`true`,将包含HTML页面的背景图像或颜色。默认值为`true`。
28
+
29
+ - **landscape**: 如果设置为`true`,PDF将以横向生成。默认值为`false`。
30
+
31
+ - **preferCSSPageSize**: 如果设置为`true`,优先使用CSS中定义的页面大小。默认值为`false`。
32
+
33
+ #### 主要功能
34
+
35
+ - **HTML内容渲染**: 渲染HTML模板以生成PDF页面。可以使用HTML应用复杂的布局和样式。
36
+ - **页眉和页脚设置**: 可以动态插入每页的页眉和页脚。页眉和页脚使用ejs模板编写,可以动态包含页码和总页数等信息。
37
+ - **水印设置**: 可以为PDF页面添加水印。水印以文本形式显示,通常半透明地放置在页面中央。
38
+ - **页面设置**: 可以通过设置页面的大小、边距、缩放等来调整PDF文档的布局。
39
+
40
+ #### 使用注意事项
41
+
42
+ - **必须先执行`HeadlessPDFOpen`任务**: `HeadlessPDFCapture`任务必须在`HeadlessPDFOpen`任务之后执行,否则会因为PDF文档不存在而导致错误。
43
+ - **动态数据处理**: 可以通过ejs模板动态生成HTML内容,并使用`accessor`从数据中获取信息。
44
+
45
+ - **页眉/页脚**: `HeadlessPDFOpen`中设置的页眉和页脚将自动包含,必要时可以针对每个页面进行调整。
@@ -0,0 +1,55 @@
1
+ ### ヘッドレスPDFオープンタスク (Headless PDF Open Task)
2
+
3
+ **ヘッドレスPDFオープンタスク**は、HTMLテンプレートを使用してPDFドキュメントを生成し、カバーページやラストページを処理し、ヘッダー、フッター、透かしなどの基本的なPDF設定を行うタスクです。このタスクは、後続のキャプチャタスクと組み合わせて、完全なドキュメントを完成させます。
4
+
5
+ #### パラメータ説明
6
+
7
+ - **accessor**: PDF生成のためのデータにアクセスするためのパスを指定します。このパスは、データ構造から必要な情報を抽出するために使用されます。
8
+
9
+ - **coverPage**: PDFドキュメントの最初のページとして使用するHTMLテンプレートです。HTMLを使用してPDFのカバーページを定義できます。
10
+
11
+ - **lastPage**: PDFドキュメントの最後のページとして使用するHTMLテンプレートです。最後のページは後で追加されます。
12
+
13
+ - **header**: 各ページの上部に表示するテキストを定義します。`<%= pageNumber %>`や`<%= totalPages %>`を使用して、ページ番号や総ページ数を動的に表示できます。
14
+
15
+ - **footer**: 各ページの下部に表示するテキストを定義します。通常、著作権情報やページ番号を表示するために使用されます。
16
+
17
+ - **watermark**: 各ページに表示する透かしテキストを定義します。通常「DRAFT」や「CONFIDENTIAL」などのテキストが使用されます。
18
+
19
+ - **fileName**: 生成されたPDFファイルの名前を指定します。指定しない場合は、デフォルトで`output.pdf`という名前が使用されます。
20
+
21
+ - **format**: PDFページのサイズを指定します。`A4`、`A3`、`Letter`、`Legal`などから選択できます。
22
+
23
+ - **width**: ページの幅を指定します。例: `"8.5in"`、`"21cm"`、`"600px"`。指定しない場合、`format`に従って自動的に設定されます。
24
+
25
+ - **height**: ページの高さを指定します。例: `"11in"`、`"29.7cm"`、`"800px"`。指定しない場合、`format`に従って自動的に設定されます。
26
+
27
+ - **marginTop**: ページ上部の余白を指定します。例: `"0.5in"`、`"1cm"`、`"100px"`。
28
+
29
+ - **marginBottom**: ページ下部の余白を指定します。例: `"0.5in"`、`"1cm"`、`"100px"`。
30
+
31
+ - **marginLeft**: ページ左側の余白を指定します。例: `"0.5in"`、`"1cm"`、`"100px"`。
32
+
33
+ - **marginRight**: ページ右側の余白を指定します。例: `"0.5in"`、`"1cm"`、`"100px"`。
34
+
35
+ - **scale**: ページコンテンツのスケールを調整します。デフォルト値は`1`で、値が大きいほどコンテンツが拡大されます。
36
+
37
+ - **printBackground**: `true`に設定すると、HTMLページの背景画像や色が含まれます。デフォルト値は`true`です。
38
+
39
+ - **landscape**: `true`に設定すると、PDFが横向きに生成されます。デフォルト値は`false`です。
40
+
41
+ - **preferCSSPageSize**: `true`に設定すると、CSSで定義されたページサイズが優先して使用されます。デフォルト値は`false`です。
42
+
43
+ #### 主な機能
44
+
45
+ - PDFドキュメント生成: HTMLテンプレートを基にPDFドキュメントを生成します。
46
+ - カバーページおよびラストページ: PDFの最初と最後のページを定義できます。
47
+ - ヘッダーおよびフッター設定: 各ページに表示するヘッダーとフッターを指定できます。
48
+ - 透かし: ページに透かしを追加できます。
49
+ - 多様なページ設定: ページサイズ、余白、方向などを設定して、PDFドキュメントを希望通りに構成できます。
50
+
51
+ #### 使用時の注意点
52
+
53
+ - **ラストページ処理**: ラストページは`HeadlessPDFOpen`タスクで処理され、`save`タスクでドキュメントの最後に追加されます。
54
+ - **ヘッダー/フッター**: ヘッダーとフッターには、動的にページ番号を挿入でき、テンプレートを使用して設定できます。
55
+ - **ページ設定**: ページサイズや余白設定が正しく適用されない場合は、`format`や`preferCSSPageSize`設定を調整してみてください。
@@ -0,0 +1,55 @@
1
+ ### Headless PDF Open Task
2
+
3
+ **Headless PDF Open Task**는 HTML 템플릿을 사용하여 PDF 문서를 생성하고, 표지(커버 페이지)와 마지막 페이지를 처리하며, 헤더, 푸터, 워터마크 등을 포함한 기본적인 PDF 설정을 수행하는 작업입니다. 이 작업은 이후의 캡처 작업과 결합하여 전체 문서를 완성합니다.
4
+
5
+ #### 매개변수 설명
6
+
7
+ - **accessor**: PDF 생성을 위한 데이터에 접근하기 위한 경로를 지정합니다. 이 경로는 데이터 구조에서 원하는 정보를 추출하는 데 사용됩니다.
8
+
9
+ - **coverPage**: PDF 문서의 첫 페이지로 사용할 HTML 템플릿입니다. HTML을 사용하여 PDF의 커버 페이지를 정의할 수 있습니다.
10
+
11
+ - **lastPage**: PDF 문서의 마지막 페이지로 사용할 HTML 템플릿입니다. 마지막 페이지는 이후에 추가됩니다.
12
+
13
+ - **header**: 각 페이지의 상단에 표시할 텍스트를 정의합니다. `<%= pageNumber %>`와 `<%= totalPages %>`를 사용하여 동적으로 페이지 번호와 총 페이지 수를 표시할 수 있습니다.
14
+
15
+ - **footer**: 각 페이지의 하단에 표시할 텍스트를 정의합니다. 보통 저작권 정보나 페이지 번호 등을 표시하는 데 사용됩니다.
16
+
17
+ - **watermark**: 각 페이지에 표시할 워터마크 텍스트를 정의합니다. 일반적으로 "DRAFT", "CONFIDENTIAL"과 같은 텍스트가 사용됩니다.
18
+
19
+ - **fileName**: 생성된 PDF 파일의 이름을 지정합니다. 지정하지 않으면 기본적으로 `output.pdf`라는 이름이 사용됩니다.
20
+
21
+ - **format**: PDF 페이지의 크기를 지정합니다. `A4`, `A3`, `Letter`, `Legal` 등의 값 중에서 선택할 수 있습니다.
22
+
23
+ - **width**: 페이지의 폭을 지정합니다. 예: `"8.5in"`, `"21cm"`, `"600px"`. 지정하지 않으면 `format`에 따라 자동으로 설정됩니다.
24
+
25
+ - **height**: 페이지의 높이를 지정합니다. 예: `"11in"`, `"29.7cm"`, `"800px"`. 지정하지 않으면 `format`에 따라 자동으로 설정됩니다.
26
+
27
+ - **marginTop**: 페이지 상단 여백을 지정합니다. 예: `"0.5in"`, `"1cm"`, `"100px"`.
28
+
29
+ - **marginBottom**: 페이지 하단 여백을 지정합니다. 예: `"0.5in"`, `"1cm"`, `"100px"`.
30
+
31
+ - **marginLeft**: 페이지 왼쪽 여백을 지정합니다. 예: `"0.5in"`, `"1cm"`, `"100px"`.
32
+
33
+ - **marginRight**: 페이지 오른쪽 여백을 지정합니다. 예: `"0.5in"`, `"1cm"`, `"100px"`.
34
+
35
+ - **scale**: 페이지 콘텐츠의 스케일을 조정합니다. 기본값은 `1`이며, 값이 클수록 콘텐츠가 확대됩니다.
36
+
37
+ - **printBackground**: `true`로 설정하면, HTML 페이지의 배경 이미지나 색상이 포함됩니다. 기본값은 `true`입니다.
38
+
39
+ - **landscape**: `true`로 설정하면, PDF가 가로 방향으로 생성됩니다. 기본값은 `false`입니다.
40
+
41
+ - **preferCSSPageSize**: `true`로 설정하면, CSS에서 정의된 페이지 크기를 우선시하여 사용합니다. 기본값은 `false`입니다.
42
+
43
+ #### 주요 기능
44
+
45
+ - PDF 문서 생성: HTML 템플릿을 기반으로 PDF 문서를 생성합니다.
46
+ - 커버 페이지 및 마지막 페이지: PDF의 첫 페이지와 마지막 페이지를 정의할 수 있습니다.
47
+ - 헤더 및 푸터 설정: 각 페이지에 표시할 헤더와 푸터를 지정할 수 있습니다.
48
+ - 워터마크: 페이지에 워터마크를 추가할 수 있습니다.
49
+ - 다양한 페이지 설정: 페이지 크기, 여백, 방향 등을 설정하여 PDF 문서를 원하는 대로 구성할 수 있습니다.
50
+
51
+ #### 사용 시 유의사항
52
+
53
+ - **마지막 페이지 처리**: 마지막 페이지는 `HeadlessPDFOpen` 태스크에서 처리한 후, `save` 태스크에서 문서의 마지막에 추가됩니다.
54
+ - **헤더/푸터**: 헤더와 푸터는 동적으로 페이지 번호를 계산하여 삽입할 수 있으며, 필요에 따라 템플릿을 활용할 수 있습니다.
55
+ - **페이지 설정**: 페이지 크기나 여백 설정이 제대로 적용되지 않을 경우, `format`과 `preferCSSPageSize` 설정을 조정하여 시도해 볼 수 있습니다.
@@ -0,0 +1,55 @@
1
+ ### Headless PDF Open Task
2
+
3
+ **Headless PDF Open Task** is a task that generates a PDF document using an HTML template, manages the cover page and last page, and performs basic PDF settings including headers, footers, and watermarks. This task is combined with subsequent capture tasks to complete the entire document.
4
+
5
+ #### Parameter Descriptions
6
+
7
+ - **accessor**: Specifies the path to access the data for PDF generation. This path is used to extract the desired information from the data structure.
8
+
9
+ - **coverPage**: An HTML template used as the first page of the PDF document. You can define the cover page of the PDF using HTML.
10
+
11
+ - **lastPage**: An HTML template used as the last page of the PDF document. The last page is added later.
12
+
13
+ - **header**: Defines the text to display at the top of each page. Use `<%= pageNumber %>` and `<%= totalPages %>` to dynamically display the page number and total pages.
14
+
15
+ - **footer**: Defines the text to display at the bottom of each page. It is commonly used to display copyright information or page numbers.
16
+
17
+ - **watermark**: Defines the watermark text to display on each page. Common texts include "DRAFT" or "CONFIDENTIAL."
18
+
19
+ - **fileName**: Specifies the name of the generated PDF file. If not specified, the default name `output.pdf` is used.
20
+
21
+ - **format**: Specifies the size of the PDF page. Values like `A4`, `A3`, `Letter`, and `Legal` can be chosen.
22
+
23
+ - **width**: Specifies the width of the page, e.g., `"8.5in"`, `"21cm"`, `"600px"`. If not specified, it is automatically set according to the `format`.
24
+
25
+ - **height**: Specifies the height of the page, e.g., `"11in"`, `"29.7cm"`, `"800px"`. If not specified, it is automatically set according to the `format`.
26
+
27
+ - **marginTop**: Specifies the top margin of the page, e.g., `"0.5in"`, `"1cm"`, `"100px"`.
28
+
29
+ - **marginBottom**: Specifies the bottom margin of the page, e.g., `"0.5in"`, `"1cm"`, `"100px"`.
30
+
31
+ - **marginLeft**: Specifies the left margin of the page, e.g., `"0.5in"`, `"1cm"`, `"100px"`.
32
+
33
+ - **marginRight**: Specifies the right margin of the page, e.g., `"0.5in"`, `"1cm"`, `"100px"`.
34
+
35
+ - **scale**: Adjusts the scale of the page content. The default value is `1`, with larger values increasing the content size.
36
+
37
+ - **printBackground**: When set to `true`, the background images or colors of the HTML page are included. The default value is `true`.
38
+
39
+ - **landscape**: When set to `true`, the PDF is generated in landscape orientation. The default value is `false`.
40
+
41
+ - **preferCSSPageSize**: When set to `true`, the page size defined in CSS is preferred. The default value is `false`.
42
+
43
+ #### Key Features
44
+
45
+ - PDF document generation: Generates a PDF document based on the HTML template.
46
+ - Cover page and last page: Allows you to define the first and last pages of the PDF.
47
+ - Header and footer settings: Specify headers and footers to display on each page.
48
+ - Watermark: Add a watermark to the pages.
49
+ - Various page settings: Configure the PDF document as desired by setting the page size, margins, orientation, etc.
50
+
51
+ #### Usage Notes
52
+
53
+ - **Last Page Handling**: The last page is processed in the `HeadlessPDFOpen` task and added to the end of the document in the `save` task.
54
+ - **Headers/Footers**: Headers and footers can dynamically insert calculated page numbers and can be customized using templates.
55
+ - **Page Settings**: If page size or margin settings are not applied correctly, try adjusting the `format` and `preferCSSPageSize` settings.
@@ -0,0 +1,57 @@
1
+ ### Tugas PDF Tanpa Kepala (Headless PDF Open Task)
2
+
3
+ **Tugas PDF Tanpa Kepala** ialah tugas yang menghasilkan dokumen PDF menggunakan templat HTML, mengurus halaman
4
+
5
+ muka (cover page) dan halaman akhir, serta menjalankan tetapan PDF asas yang merangkumi header, footer, dan watermark. Tugas ini digabungkan dengan tugas tangkapan berikutnya untuk melengkapkan dokumen keseluruhan.
6
+
7
+ #### Penerangan Parameter
8
+
9
+ - **accessor**: Menetapkan laluan untuk mengakses data bagi penjanaan PDF. Laluan ini digunakan untuk mengekstrak maklumat yang dikehendaki daripada struktur data.
10
+
11
+ - **coverPage**: Templat HTML yang akan digunakan sebagai halaman pertama dokumen PDF. Anda boleh menggunakan HTML untuk mentakrifkan halaman muka PDF.
12
+
13
+ - **lastPage**: Templat HTML yang akan digunakan sebagai halaman terakhir dokumen PDF. Halaman terakhir akan ditambah kemudian.
14
+
15
+ - **header**: Mentakrifkan teks yang akan dipaparkan di bahagian atas setiap halaman. Anda boleh menggunakan `<%= pageNumber %>` dan `<%= totalPages %>` untuk memaparkan nombor halaman dan jumlah halaman secara dinamik.
16
+
17
+ - **footer**: Mentakrifkan teks yang akan dipaparkan di bahagian bawah setiap halaman. Biasanya digunakan untuk memaparkan maklumat hak cipta atau nombor halaman.
18
+
19
+ - **watermark**: Mentakrifkan teks watermark yang akan dipaparkan pada setiap halaman. Biasanya teks seperti "DRAFT" atau "CONFIDENTIAL" digunakan.
20
+
21
+ - **fileName**: Menetapkan nama fail PDF yang dihasilkan. Jika tidak ditetapkan, nama `output.pdf` akan digunakan secara lalai.
22
+
23
+ - **format**: Menetapkan saiz halaman PDF. Anda boleh memilih nilai seperti `A4`, `A3`, `Letter`, `Legal`.
24
+
25
+ - **width**: Menetapkan lebar halaman. Contoh: `"8.5in"``, `"21cm"``, `"600px"`. Jika tidak ditetapkan, ia akan diselaraskan secara automatik berdasarkan `format`.
26
+
27
+ - **height**: Menetapkan ketinggian halaman. Contoh: `"11in"``, `"29.7cm"``, `"800px"`. Jika tidak ditetapkan, ia akan diselaraskan secara automatik berdasarkan `format`.
28
+
29
+ - **marginTop**: Menetapkan margin atas halaman. Contoh: `"0.5in"``, `"1cm"``, `"100px"`.
30
+
31
+ - **marginBottom**: Menetapkan margin bawah halaman. Contoh: `"0.5in"``, `"1cm"``, `"100px"`.
32
+
33
+ - **marginLeft**: Menetapkan margin kiri halaman. Contoh: `"0.5in"``, `"1cm"``, `"100px"`.
34
+
35
+ - **marginRight**: Menetapkan margin kanan halaman. Contoh: `"0.5in"``, `"1cm"``, `"100px"`.
36
+
37
+ - **scale**: Menyesuaikan skala kandungan halaman. Nilai lalai ialah `1` dan semakin besar nilainya, semakin besar kandungan.
38
+
39
+ - **printBackground**: Jika disetkan kepada `true`, imej latar belakang atau warna halaman HTML akan disertakan. Nilai lalai ialah `true`.
40
+
41
+ - **landscape**: Jika disetkan kepada `true`, PDF akan dijana dalam orientasi melintang. Nilai lalai ialah `false`.
42
+
43
+ - **preferCSSPageSize**: Jika disetkan kepada `true`, saiz halaman yang ditentukan dalam CSS akan diutamakan. Nilai lalai ialah `false`.
44
+
45
+ #### Fungsi Utama
46
+
47
+ - Penjanaan dokumen PDF: Menjana dokumen PDF berdasarkan templat HTML.
48
+ - Halaman muka dan halaman terakhir: Anda boleh mentakrifkan halaman pertama dan terakhir dokumen PDF.
49
+ - Tetapan header dan footer: Anda boleh menetapkan header dan footer yang akan dipaparkan pada setiap halaman.
50
+ - Watermark: Anda boleh menambah watermark pada halaman.
51
+ - Pelbagai tetapan halaman: Anda boleh menetapkan saiz halaman, margin, orientasi, dan lain-lain untuk menyusun dokumen PDF mengikut kehendak anda.
52
+
53
+ #### Perhatian Semasa Penggunaan
54
+
55
+ - **Pengurusan Halaman Akhir**: Halaman terakhir akan diproses dalam tugas `HeadlessPDFOpen` dan ditambah pada akhir dokumen dalam tugas `save`.
56
+ - **Header/Footer**: Header dan footer boleh dimasukkan secara dinamik untuk memaparkan nombor halaman dan boleh disesuaikan menggunakan templat.
57
+ - **Tetapan Halaman**: Jika saiz halaman atau margin tidak digunakan dengan betul, cuba sesuaikan tetapan `format` dan `preferCSSPageSize`.
@@ -0,0 +1,55 @@
1
+ ### 无头PDF打开任务 (Headless PDF Open Task)
2
+
3
+ **无头PDF打开任务**使用HTML模板生成PDF文档,处理封面和最后一页,并执行包含页眉、页脚和水印在内的基本PDF设置。该任务与后续的捕捉任务结合,完成整个文档的生成。
4
+
5
+ #### 参数说明
6
+
7
+ - **accessor**: 指定用于生成PDF的数据的访问路径。该路径用于从数据结构中提取所需信息。
8
+
9
+ - **coverPage**: 用作PDF文档封面的HTML模板。可以使用HTML定义PDF的封面页。
10
+
11
+ - **lastPage**: 用作PDF文档最后一页的HTML模板。最后一页将在后续添加。
12
+
13
+ - **header**: 定义显示在每页顶部的文本。可以使用`<%= pageNumber %>`和`<%= totalPages %>`动态显示页码和总页数。
14
+
15
+ - **footer**: 定义显示在每页底部的文本。通常用于显示版权信息或页码。
16
+
17
+ - **watermark**: 定义显示在每页上的水印文本。通常使用“DRAFT”或“CONFIDENTIAL”等文本。
18
+
19
+ - **fileName**: 指定生成的PDF文件名。如果未指定,默认使用`output.pdf`。
20
+
21
+ - **format**: 指定PDF页面的大小。可以选择`A4`、`A3`、`Letter`、`Legal`等值。
22
+
23
+ - **width**: 指定页面的宽度。例如:`"8.5in"`、`"21cm"`、`"600px"`。如果未指定,将根据`format`自动设置。
24
+
25
+ - **height**: 指定页面的高度。例如:`"11in"`、`"29.7cm"`、`"800px"`。如果未指定,将根据`format`自动设置。
26
+
27
+ - **marginTop**: 指定页面的上边距。例如:`"0.5in"`、`"1cm"`、`"100px"`。
28
+
29
+ - **marginBottom**: 指定页面的下边距。例如:`"0.5in"`、`"1cm"`、`"100px"`。
30
+
31
+ - **marginLeft**: 指定页面的左边距。例如:`"0.5in"`、`"1cm"`、`"100px"`。
32
+
33
+ - **marginRight**: 指定页面的右边距。例如:`"0.5in"`、`"1cm"`、`"100px"`。
34
+
35
+ - **scale**: 调整页面内容的缩放比例。默认值为`1`,值越大,内容越大。
36
+
37
+ - **printBackground**: 如果设置为`true`,将包含HTML页面的背景图像或颜色。默认值为`true`。
38
+
39
+ - **landscape**: 如果设置为`true`,PDF将以横向生成。默认值为`false`。
40
+
41
+ - **preferCSSPageSize**: 如果设置为`true`,优先使用CSS中定义的页面大小。默认值为`false`。
42
+
43
+ #### 主要功能
44
+
45
+ - PDF文档生成: 基于HTML模板生成PDF文档。
46
+ - 封面页及最后一页: 可以定义PDF的封面页和最后一页。
47
+ - 页眉及页脚设置: 可以指定显示在每页的页眉和页脚。
48
+ - 水印: 可以为页面添加水印。
49
+ - 多种页面设置: 可以通过设置页面大小、边距、方向等,按需配置PDF文档。
50
+
51
+ #### 使用注意事项
52
+
53
+ - **最后一页处理**: 最后一页在`HeadlessPDFOpen`任务中处理后,在`save`任务中追加到文档末尾。
54
+ - **页眉/页脚**: 页眉和页脚可以动态插入计算的页码,并根据需要使用模板。
55
+ - **页面设置**: 如果页面大小或边距设置未正确应用,可以尝试调整`format`和`preferCSSPageSize`设置。
@@ -0,0 +1,23 @@
1
+ ### ヘッドレスPDF保存タスク (Headless PDF Save Task)
2
+
3
+ **ヘッドレスPDF保存タスク**は、以前に生成されたPDFドキュメントをファイルとして保存するタスクです。このタスクはPDFドキュメントを保存して添付ファイルとして管理し、保存されたファイルのメタデータを返します。
4
+
5
+ #### 主な機能
6
+
7
+ - **PDFドキュメントの保存**: `headless-pdf-open`、`headless-pdf-capture`、`headless-pdf-capture-board`タスクで生成されたPDFドキュメントを保存します。ドキュメントは指定されたファイル名で保存され、ファイルのパスとメタデータが返されます。
8
+ - **最後のページの追加**: `headless-pdf-open`タスクで最後のページが指定されている場合、保存前に最後のページをPDFドキュメントに追加します。
9
+ - **添付ファイルとして保存**: 生成されたPDFドキュメントを添付ファイルとして保存し、ファイルのメタデータをデータベースに記録します。保存されたファイルは`Attachment`レコードとして管理されます。
10
+
11
+ #### 返却データ
12
+
13
+ - **id**: 保存された添付ファイルのユニークID。
14
+ - **name**: 添付ファイルの名前。
15
+ - **path**: 添付ファイルのパス。
16
+ - **mimetype**: ファイルのMIMEタイプ(例:`application/pdf`)。
17
+ - **refBy**: 参照情報(このタスクでは`pdf-published`)。
18
+ - **fullpath**: ファイルのフルパス。
19
+
20
+ #### 使用時の注意点
21
+
22
+ - **`headless-pdf-open`および`headless-pdf-capture`タスクを事前に実行する必要がある**: `headless-pdf-save`タスクは、必ず`headless-pdf-open`および必要な`headless-pdf-capture`タスクが実行された後に実行する必要があります。そうでない場合、保存するPDFドキュメントが存在しないためエラーが発生します。
23
+ - **ファイル名の設定**: PDFドキュメントのファイル名はデフォルトで`document-<タイムスタンプ>.pdf`に設定されており、必要に応じて`headless-pdf-open`でカスタムファイル名を設定できます。
@@ -0,0 +1,25 @@
1
+ ### Headless PDF Save Task
2
+
3
+ **Headless PDF Save Task**는 이전에 생성된 PDF 문서를 파일로 저장하는 작업입니다. 이 작업은 PDF 문서를 저장하여 첨부 파일로 관리하며, 저장된 파일의 메타데이터를 반환합니다.
4
+
5
+ #### 주요 기능
6
+
7
+ - **PDF 문서 저장**: `headless-pdf-open` 및 `headless-pdf-capture`, `headless-pdf-capture-board` 작업으로 생성된 PDF 문서를 저장합니다. 문서는 지정된 파일 이름으로 저장되며, 파일의 경로와 메타데이터가 반환됩니다.
8
+ - **마지막 페이지 추가**: 만약 `headless-pdf-open` 작업에서 마지막 페이지가 지정된 경우, 저장하기 전에 마지막 페이지를 PDF 문서에 추가합니다.
9
+
10
+ - **첨부 파일로 저장**: 생성된 PDF 문서를 첨부 파일로 저장하고, 파일 메타데이터를 데이터베이스에 기록합니다. 저장된 파일은 `Attachment` 레코드로 관리됩니다.
11
+
12
+ #### 반환 데이터
13
+
14
+ - **id**: 저장된 첨부 파일의 고유 ID.
15
+ - **name**: 첨부 파일의 이름.
16
+ - **path**: 첨부 파일의 경로.
17
+ - **mimetype**: 파일의 MIME 타입 (예: `application/pdf`).
18
+ - **refBy**: 참조 정보 (이 작업에서는 `pdf-published`).
19
+ - **fullpath**: 파일의 전체 경로.
20
+
21
+ #### 사용 시 유의사항
22
+
23
+ - **이전에 `headless-pdf-open` 및 `headless-pdf-capture` 작업이 실행되어야 함**: `headless-pdf-save` 작업은 반드시 이전에 `headless-pdf-open` 및 필요한 `headless-pdf-capture` 작업들이 수행된 후에 실행되어야 합니다. 그렇지 않으면 저장할 PDF 문서가 존재하지 않기 때문에 오류가 발생합니다.
24
+
25
+ - **파일 이름 설정**: PDF 문서의 파일 이름은 기본적으로 `document-<타임스탬프>.pdf`로 지정되며, 필요에 따라 커스텀 파일 이름을 `headless-pdf-open`에서 설정할 수 있습니다.
@@ -0,0 +1,23 @@
1
+ ### Headless PDF Save Task
2
+
3
+ **Headless PDF Save Task** is a task that saves a previously generated PDF document as a file. This task saves the PDF document as an attachment and returns the metadata of the saved file.
4
+
5
+ #### Key Features
6
+
7
+ - **Save PDF Document**: Saves the PDF document generated by `headless-pdf-open`, `headless-pdf-capture`, and `headless-pdf-capture-board` tasks. The document is saved with the specified file name, and the file's path and metadata are returned.
8
+ - **Add Last Page**: If a last page was specified in the `headless-pdf-open` task, the last page is added to the PDF document before saving.
9
+ - **Save as Attachment**: Saves the generated PDF document as an attachment and records the file metadata in the database. The saved file is managed as an `Attachment` record.
10
+
11
+ #### Returned Data
12
+
13
+ - **id**: Unique ID of the saved attachment.
14
+ - **name**: Name of the attachment.
15
+ - **path**: Path of the attachment.
16
+ - **mimetype**: MIME type of the file (e.g., `application/pdf`).
17
+ - **refBy**: Reference information (in this task, it is `pdf-published`).
18
+ - **fullpath**: Full path of the file.
19
+
20
+ #### Usage Notes
21
+
22
+ - **Must Execute `headless-pdf-open` and `headless-pdf-capture` Tasks First**: The `headless-pdf-save` task must be executed after the `headless-pdf-open` and required `headless-pdf-capture` tasks have been performed. Otherwise, an error will occur because there is no PDF document to save.
23
+ - **File Name Setting**: The file name of the PDF document is set to `document-<timestamp>.pdf` by default, and a custom file name can be set in the `headless-pdf-open` task if needed.
@@ -0,0 +1,23 @@
1
+ ### Tugas Simpan PDF Tanpa Kepala (Headless PDF Save Task)
2
+
3
+ **Tugas Simpan PDF Tanpa Kepala** ialah tugas yang menyimpan dokumen PDF yang dijana sebelum ini sebagai fail. Tugas ini menyimpan dokumen PDF sebagai fail lampiran dan memulangkan metadata fail yang disimpan.
4
+
5
+ #### Fungsi Utama
6
+
7
+ - **Simpan Dokumen PDF**: Menyimpan dokumen PDF yang dijana oleh tugas `headless-pdf-open`, `headless-pdf-capture`, dan `headless-pdf-capture-board`. Dokumen akan disimpan dengan nama fail yang ditetapkan, dan laluan fail serta metadata akan dipulangkan.
8
+ - **Tambah Halaman Terakhir**: Jika halaman terakhir telah ditetapkan dalam tugas `headless-pdf-open`, halaman terakhir akan ditambah kepada dokumen PDF sebelum disimpan.
9
+ - **Simpan Sebagai Fail Lampiran**: Menyimpan dokumen PDF yang dijana sebagai fail lampiran dan merekodkan metadata fail dalam pangkalan data. Fail yang disimpan akan diuruskan sebagai rekod `Attachment`.
10
+
11
+ #### Data yang Dipulangkan
12
+
13
+ - **id**: ID unik fail lampiran yang disimpan.
14
+ - **name**: Nama fail lampiran.
15
+ - **path**: Laluan fail lampiran.
16
+ - **mimetype**: Jenis MIME fail (contoh: `application/pdf`).
17
+ - **refBy**: Maklumat rujukan (dalam tugas ini adalah `pdf-published`).
18
+ - **fullpath**: Laluan penuh fail.
19
+
20
+ #### Perhatian Semasa Penggunaan
21
+
22
+ - **Tugas `headless-pdf-open` dan `headless-pdf-capture` perlu dijalankan terlebih dahulu**: Tugas `headless-pdf-save` mesti dijalankan selepas tugas `headless-pdf-open` dan `headless-pdf-capture` yang diperlukan dijalankan. Jika tidak, ralat akan berlaku kerana tiada dokumen PDF untuk disimpan.
23
+ - **Tetapan Nama Fail**: Nama fail dokumen PDF secara lalai ditetapkan sebagai `document-<timestamp>.pdf`, dan nama fail tersuai boleh ditetapkan dalam tugas `headless-pdf-open` jika diperlukan.