@@ -12,14 +12,14 @@ use crate::World;
12
12
13
13
/// 出力されるPDFに埋め込まれるファイル。
14
14
///
15
- /// This can be used to distribute additional files that are related to the PDF
16
- /// within it. PDF readers will display the files in a file listing.
15
+ /// この関数は、PDFに関連する追加のファイルをPDF内に埋め込んで配布するために使用できます。
16
+ /// PDFリーダーはファイルリストにファイルを表示します。
17
17
///
18
- /// Some international standards use this mechanism to embed machine-readable
19
- /// data (e.g., ZUGFeRD/Factur-X for invoices) that mirrors the visual content
20
- /// of the PDF.
18
+ /// 一部の国際規格では、
19
+ /// この仕組みを使用して、
20
+ /// PDFの視覚的な内容を反映した機械可読データ(例:請求書のZUGFeRD/Factur-X)を埋め込んでいます。
21
21
///
22
- /// # Example
22
+ /// # 例
23
23
/// ```typ
24
24
/// #pdf.embed(
25
25
/// "experiment.csv",
@@ -29,16 +29,16 @@ use crate::World;
29
29
/// )
30
30
/// ```
31
31
///
32
- /// # Notes
33
- /// - This element is ignored if exporting to a format other than PDF.
34
- /// - File embeddings are not currently supported for PDF/A-2, even if the
35
- /// embedded file conforms to PDF /A-1 or PDF /A-2.
32
+ /// # 注意
33
+ /// - この要素はPDF以外の形式にエクスポートする場合は無視されます。
34
+ /// - PDF/A-2へのエクスポートでは、埋め込みファイルは現在サポートされていません。
35
+ /// たとえ埋め込まれるファイルがPDF /A-1やPDF /A-2に準拠していたとしてもです。
36
36
#[ elem( Show , Locatable ) ]
37
37
pub struct EmbedElem {
38
- /// The [path ]($syntax/#paths) of the file to be embedded.
38
+ /// 埋め込まれるファイルの[パス ]($syntax/#paths)。
39
39
///
40
- /// Must always be specified, but is only read from if no data is provided
41
- /// in the following argument.
40
+ /// 常に指定する必要がありますが、
41
+ /// 次の引数でデータが提供されていない場合にのみ読み取られます。
42
42
#[ required]
43
43
#[ parse(
44
44
let Spanned { v: path, span } =
@@ -51,9 +51,9 @@ pub struct EmbedElem {
51
51
#[ borrowed]
52
52
pub path : Derived < EcoString , EcoString > ,
53
53
54
- /// Raw file data, optionally.
54
+ /// 任意で指定する生のファイルデータ。
55
55
///
56
- /// If omitted, the data is read from the specified path.
56
+ /// この引数が指定されない場合、データは指定されたパスから読み取られます。
57
57
#[ positional]
58
58
// Not actually required as an argument, but always present as a field.
59
59
// We can't distinguish between the two at the moment.
@@ -66,16 +66,16 @@ pub struct EmbedElem {
66
66
) ]
67
67
pub data : Bytes ,
68
68
69
- /// The relationship of the embedded file to the document.
69
+ /// 埋め込まれるファイルと文書との関係。
70
70
///
71
- /// Ignored if export doesn't target PDF /A-3.
71
+ /// エクスポート対象がPDF /A-3でない場合は無視されます。
72
72
pub relationship : Option < EmbeddedFileRelationship > ,
73
73
74
- /// The MIME type of the embedded file.
74
+ /// 埋め込まれるファイルのMIMEタイプ。
75
75
#[ borrowed]
76
76
pub mime_type : Option < EcoString > ,
77
77
78
- /// A description for the embedded file.
78
+ /// 埋め込まれるファイルの説明。
79
79
#[ borrowed]
80
80
pub description : Option < EcoString > ,
81
81
}
@@ -94,12 +94,12 @@ impl Show for Packed<EmbedElem> {
94
94
/// The relationship of an embedded file with the document.
95
95
#[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash , Cast ) ]
96
96
pub enum EmbeddedFileRelationship {
97
- /// The PDF document was created from the source file.
97
+ /// PDF文書がそのソースファイルから作成されたことを示す。
98
98
Source ,
99
- /// The file was used to derive a visual presentation in the PDF.
99
+ /// ファイルがPDFにおける視覚的表現を得るために使われたことを示す。
100
100
Data ,
101
- /// An alternative representation of the document.
101
+ /// 文書の代替的な表現であることを示す。
102
102
Alternative ,
103
- /// Additional resources for the document.
103
+ /// 文書への追加のリソースであることを示す。
104
104
Supplement ,
105
105
}
0 commit comments