このページはまだ翻訳されていません。原文の内容が表示されています。
embed
ElementElementElement functions can be customized with set
and show
rules.
set
and show
rules.A file that will be embedded into the output PDF.
This can be used to distribute additional files that are related to the PDF within it. PDF readers will display the files in a file listing.
Some international standards use this mechanism to embed machine-readable data (e.g., ZUGFeRD/Factur-X for invoices) that mirrors the visual content of the PDF.
Example
#pdf.embed(
"experiment.csv",
relationship: "supplement",
mime-type: "text/csv",
description: "Raw Oxygen readings from the Arctic experiment",
)
Notes
- This element is ignored if exporting to a format other than PDF.
- File embeddings are not currently supported for PDF/A-2, even if the embedded file conforms to PDF/A-1 or PDF/A-2.
引数ParametersParameters are the inputs to a function. They are specified in parentheses after the function name.
path
RequiredRequiredRequired parameters must be specified when calling the function.PositionalPositionalPositional parameters are specified in order, without names.
The path of the file to be embedded.
Must always be specified, but is only read from if no data is provided in the following argument.
data
RequiredRequiredRequired parameters must be specified when calling the function.PositionalPositionalPositional parameters are specified in order, without names.
Raw file data, optionally.
If omitted, the data is read from the specified path.
relationship
The relationship of the embedded file to the document.
Ignored if export doesn't target PDF/A-3.
使用可能な文字列値:
source
The PDF document was created from the source file.
data
The file was used to derive a visual presentation in the PDF.
alternative
An alternative representation of the document.
supplement
Additional resources for the document.
デフォルト値: none
mime-type
The MIME type of the embedded file.
デフォルト値: none