创建PDF模板: Difference between revisions

Jump to navigation Jump to search
Tag: 2017 source edit
Line 127: Line 127:
提醒:setXY 函数的原点位于页面的左上角
提醒:setXY 函数的原点位于页面的左上角


===Add a PDF Annotation (comment)===
===添加PDF批注(注释)===
''Left side of the page around the middle:''
''页面左侧围绕中间:''
 
<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
$pdf->Annotation(102, 202, 10, 10, "this is the comment text", array('Subtype'=>'Text', 'Name' => 'Comment', 'T' => 'this is comment author', 'Subj' => 'this is comment title', 'C' => array(255, 255, 0)));
$pdf->Annotation(102, 202, 10, 10, "this is the comment text", array('Subtype'=>'Text', 'Name' => 'Comment', 'T' => 'this is comment author', 'Subj' => 'this is comment title', 'C' => array(255, 255, 0)));
</syntaxhighlight>
</syntaxhighlight>


''Right side of the page around the middle:''
''页面右侧围绕中间:''
 
<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
$pdf->Annotation(202, 102, 10, 10, "this is the comment text", array('Subtype'=>'Text', 'Name' => 'Comment', 'T' => 'this is comment author', 'Subj' => 'this is comment title', 'C' => array(255, 255, 0)));
$pdf->Annotation(202, 102, 10, 10, "this is the comment text", array('Subtype'=>'Text', 'Name' => 'Comment', 'T' => 'this is comment author', 'Subj' => 'this is comment title', 'C' => array(255, 255, 0)));
</syntaxhighlight>
</syntaxhighlight>


===Add Complementary Attribute (extrafiled)===
===添加补充属性(额外字段)===
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]
一个专门的页面为您提供了一些建议,如何将补充属性(额外字段)集成到Dolibarr的PDF模板中:[[Add Extrafields on PDF Models|在PDF模板上添加额外字段]]


==如需了解更多信息==
==如需了解更多信息==


*http://www.fpdf.org/?lang=en
*TCPDF函数清单:<nowiki>https://tcpdf.org/docs/srcdoc/</nowiki>
*TCPDF函数清单:<nowiki>https://tcpdf.org/docs/srcdoc/</nowiki>
*
*


=激活模块=
=激活您的新模板=
In page Home => Setup => Modules =>
前往 '''主页 => 设置 => 模块/应用 =>'''


*activate your module
*激活您的模块
*eventually, set it as the default model.
*最终,将其设置为默认模板


=故障排除=
=故障排除=
714

edits

Navigation menu