@@ -12,14 +12,14 @@ use crate::World;
1212
1313/// 出力されるPDFに埋め込まれるファイル。
1414///
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リーダーはファイルリストにファイルを表示します。
1717///
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)を埋め込むことができます。
2121///
22- /// # Example
22+ /// # 例
2323/// ```typ
2424/// #pdf.embed(
2525/// "experiment.csv",
@@ -29,16 +29,16 @@ use crate::World;
2929/// )
3030/// ```
3131///
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に準拠していたとしてもです。
3636#[ elem( Show , Locatable ) ]
3737pub struct EmbedElem {
38- /// The [path ]($syntax/#paths) of the file to be embedded.
38+ /// 埋め込まれるファイルの[パス ]($syntax/#paths)。
3939 ///
40- /// Must always be specified, but is only read from if no data is provided
41- /// in the following argument.
40+ /// 常に指定する必要がありますが、
41+ /// 次の引数でデータが提供されていない場合にのみ読み取られます。
4242 #[ required]
4343 #[ parse(
4444 let Spanned { v: path, span } =
@@ -51,9 +51,9 @@ pub struct EmbedElem {
5151 #[ borrowed]
5252 pub path : Derived < EcoString , EcoString > ,
5353
54- /// Raw file data, optionally.
54+ /// 任意で指定する生のファイルデータ。
5555 ///
56- /// If omitted, the data is read from the specified path.
56+ /// この引数が指定されない場合、データは指定されたパスから読み取られます。
5757 #[ positional]
5858 // Not actually required as an argument, but always present as a field.
5959 // We can't distinguish between the two at the moment.
@@ -66,16 +66,16 @@ pub struct EmbedElem {
6666 ) ]
6767 pub data : Bytes ,
6868
69- /// The relationship of the embedded file to the document.
69+ /// 埋め込まれるファイルと文書との関係。
7070 ///
71- /// Ignored if export doesn't target PDF /A-3.
71+ /// エクスポート対象がPDF /A-3でない場合は無視されます。
7272 pub relationship : Option < EmbeddedFileRelationship > ,
7373
74- /// The MIME type of the embedded file.
74+ /// 埋め込まれるファイルのMIMEタイプ。
7575 #[ borrowed]
7676 pub mime_type : Option < EcoString > ,
7777
78- /// A description for the embedded file.
78+ /// 埋め込まれるファイルの説明。
7979 #[ borrowed]
8080 pub description : Option < EcoString > ,
8181}
@@ -94,12 +94,12 @@ impl Show for Packed<EmbedElem> {
9494/// The relationship of an embedded file with the document.
9595#[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash , Cast ) ]
9696pub enum EmbeddedFileRelationship {
97- /// The PDF document was created from the source file.
97+ /// PDF文書がそのソースファイルから作成されたことを示す。
9898 Source ,
99- /// The file was used to derive a visual presentation in the PDF.
99+ /// ファイルがPDFにおける視覚的表現を得るために使われたことを示す。
100100 Data ,
101- /// An alternative representation of the document.
101+ /// 文書の代替的な表現であることを示す。
102102 Alternative ,
103- /// Additional resources for the document.
103+ /// 文書への追加のリソースであることを示す。
104104 Supplement ,
105105}
0 commit comments