cdocutils.nodes document q)q}q(U nametypesq}q(Xtype_allqNX type_firstqNXtype_left and type_rightqNX header-footerq KXheaders and footersq NX&tables and images in headers / footersq NuUsubstitution_defsq }q Uparse_messagesq]qUcurrent_sourceqNU decorationqNUautofootnote_startqKUnameidsq}q(hUtype-allqhU type-firstqhUtype-left-and-type-rightqh U header-footerqh Uheaders-and-footersqh U$tables-and-images-in-headers-footersquUchildrenq]q(cdocutils.nodes target q)q}q(U rawsourceq X.. _header-footer:Uparentq!hUsourceq"cdocutils.nodes reprunicode q#X0E:\htdocs\phprtflite\tutorials\header-footer.rstq$q%}q&bUtagnameq'Utargetq(U attributesq)}q*(Uidsq+]Ubackrefsq,]Udupnamesq-]Uclassesq.]Unamesq/]Urefidq0huUlineq1KUdocumentq2hh]ubcdocutils.nodes section q3)q4}q5(h Uh!hh"h%Uexpect_referenced_by_nameq6}q7h hsh'Usectionq8h)}q9(h-]h.]h,]h+]q:(hheh/]q;(h h euh1Kh2hUexpect_referenced_by_idq<}q=hhsh]q>(cdocutils.nodes title q?)q@}qA(h XHeaders and footersqBh!h4h"h%h'UtitleqCh)}qD(h-]h.]h,]h+]h/]uh1Kh2hh]qEcdocutils.nodes Text qFXHeaders and footersqGqH}qI(h hBh!h@ubaubcdocutils.nodes paragraph qJ)qK}qL(h XHeaders and footers can be defined for the RTF document. When sections are used, headers and footers must be defined through the sections, otherwise the headers and footers must be defined through the PHPRtfLite instance.qMh!h4h"h%h'U paragraphqNh)}qO(h-]h.]h,]h+]h/]uh1Kh2hh]qPhFXHeaders and footers can be defined for the RTF document. When sections are used, headers and footers must be defined through the sections, otherwise the headers and footers must be defined through the PHPRtfLite instance.qQqR}qS(h hMh!hKubaubhJ)qT}qU(h XHeader / footer types:qVh!h4h"h%h'hNh)}qW(h-]h.]h,]h+]h/]uh1Kh2hh]qXhFXHeader / footer types:qYqZ}q[(h hVh!hTubaubcdocutils.nodes bullet_list q\)q]}q^(h Uh!h4h"h%h'U bullet_listq_h)}q`(UbulletqaX-h+]h,]h-]h.]h/]uh1K h2hh]qb(cdocutils.nodes list_item qc)qd}qe(h XTYPE_ALL (default)qfh!h]h"h%h'U list_itemqgh)}qh(h-]h.]h,]h+]h/]uh1Nh2hh]qihJ)qj}qk(h hfh!hdh"h%h'hNh)}ql(h-]h.]h,]h+]h/]uh1K h]qmhFXTYPE_ALL (default)qnqo}qp(h hfh!hjubaubaubhc)qq}qr(h X TYPE_LEFTqsh!h]h"h%h'hgh)}qt(h-]h.]h,]h+]h/]uh1Nh2hh]quhJ)qv}qw(h hsh!hqh"h%h'hNh)}qx(h-]h.]h,]h+]h/]uh1K h]qyhFX TYPE_LEFTqzq{}q|(h hsh!hvubaubaubhc)q}}q~(h X TYPE_RIGHTqh!h]h"h%h'hgh)}q(h-]h.]h,]h+]h/]uh1Nh2hh]qhJ)q}q(h hh!h}h"h%h'hNh)}q(h-]h.]h,]h+]h/]uh1K h]qhFX TYPE_RIGHTqq}q(h hh!hubaubaubhc)q}q(h X TYPE_FIRST h!h]h"h%h'hgh)}q(h-]h.]h,]h+]h/]uh1Nh2hh]qhJ)q}q(h X TYPE_FIRSTqh!hh"h%h'hNh)}q(h-]h.]h,]h+]h/]uh1K h]qhFX TYPE_FIRSTqq}q(h hh!hubaubaubeubh3)q}q(h Uh!h4h"h%h'h8h)}q(h-]h.]h,]h+]qhah/]qhauh1Kh2hh]q(h?)q}q(h XTYPE_ALLqh!hh"h%h'hCh)}q(h-]h.]h,]h+]h/]uh1Kh2hh]qhFXTYPE_ALLqq}q(h hh!hubaubhJ)q}q(h X>Example for setting the header and footer of the RTF document:qh!hh"h%h'hNh)}q(h-]h.]h,]h+]h/]uh1Kh2hh]qhFX>Example for setting the header and footer of the RTF document:qq}q(h hh!hubaubcdocutils.nodes literal_block q)q}q(h X addSection(); // add header $header = $section->addHeader(); $header->writeText('header text'); // add footer $footer = $section->addFooter(); $footer->writeText('footer text');h!hh"h%h'U literal_blockqh)}q(UlinenosqUlanguageqXphpU xml:spaceqUpreserveqh+]h,]h-]h.]h/]uh1Kh2hh]qhFX addSection(); // add header $header = $section->addHeader(); $header->writeText('header text'); // add footer $footer = $section->addFooter(); $footer->writeText('footer text');qq}q(h Uh!hubaubhJ)q}q(h X;By default headers and footers are displayed for all pages.qh!hh"h%h'hNh)}q(h-]h.]h,]h+]h/]uh1K#h2hh]qhFX;By default headers and footers are displayed for all pages.qq}q(h hh!hubaubeubh3)q}q(h Uh!h4h"h%h'h8h)}q(h-]h.]h,]h+]qhah/]qhauh1K'h2hh]q(h?)q}q(h XTYPE_LEFT and TYPE_RIGHTqh!hh"h%h'hCh)}q(h-]h.]h,]h+]h/]uh1K'h2hh]qhFXTYPE_LEFT and TYPE_RIGHTq˅q}q(h hh!hubaubhJ)q}q(h XTo define different headers for odd and even pages, the RTF document must be set to use different headers/footers for odd and even pages:qh!hh"h%h'hNh)}q(h-]h.]h,]h+]h/]uh1K)h2hh]qhFXTo define different headers for odd and even pages, the RTF document must be set to use different headers/footers for odd and even pages:qӅq}q(h hh!hubaubh)q}q(h XsetOddEvenDifferent(); // section $section = $rtf->addSection(); // add left header $header = $section->addHeader(PHPRtfLite_Container_Header::TYPE_LEFT); $header->writeText('left header'); // add right header $header = $section->addHeader(PHPRtfLite_Container_Header::TYPE_RIGHT); $header->writeText('right header');h!hh"h%h'hh)}q(hhXphphhh+]h,]h-]h.]h/]uh1K+h2hh]qhFXsetOddEvenDifferent(); // section $section = $rtf->addSection(); // add left header $header = $section->addHeader(PHPRtfLite_Container_Header::TYPE_LEFT); $header->writeText('left header'); // add right header $header = $section->addHeader(PHPRtfLite_Container_Header::TYPE_RIGHT); $header->writeText('right header');qڅq}q(h Uh!hubaubeubh3)q}q(h Uh!h4h"h%h'h8h)}q(h-]h.]h,]h+]qhah/]qhauh1K=h2hh]q(h?)q}q(h X TYPE_FIRSTqh!hh"h%h'hCh)}q(h-]h.]h,]h+]h/]uh1K=h2hh]qhFX TYPE_FIRSTq腁q}q(h hh!hubaubhJ)q}q(h X|If you want to specify, that the header or the footer should only appear on the first page, use can use the type TYPE_FIRST:qh!hh"h%h'hNh)}q(h-]h.]h,]h+]h/]uh1K?h2hh]qhFX|If you want to specify, that the header or the footer should only appear on the first page, use can use the type TYPE_FIRST:qq}q(h hh!hubaubh)q}q(h XaddSection(); // add header only for the first page $header = $section->addHeader(PHPRtfLite_Container_Header::TYPE_FIRST); $header->writeText('this header should only appear on the first page');h!hh"h%h'hh)}q(hhXphphhh+]h,]h-]h.]h/]uh1KAh2hh]qhFXaddSection(); // add header only for the first page $header = $section->addHeader(PHPRtfLite_Container_Header::TYPE_FIRST); $header->writeText('this header should only appear on the first page');qq}q(h Uh!hubaubeubh3)q}q(h Uh!h4h"h%h'h8h)}q(h-]h.]h,]h+]qhah/]qh auh1KPh2hh]q(h?)r}r(h X&Tables and images in headers / footersrh!hh"h%h'hCh)}r(h-]h.]h,]h+]h/]uh1KPh2hh]rhFX&Tables and images in headers / footersrr}r(h jh!jubaubhJ)r}r (h X?Of course you can use tables and images in headers and footers:r h!hh"h%h'hNh)}r (h-]h.]h,]h+]h/]uh1KRh2hh]r hFX?Of course you can use tables and images in headers and footers:r r}r(h j h!jubaubh)r}r(h XUaddSection(); // add header $header = $section->addHeader(); // add table $table = $header->addTable(); $table->addRows(1); $table->addColumnsList(array(2, 2, 2)); // add image to table in header $image = $table->addImageToCell(1, 1, '/path/to/image/file');h!hh"h%h'hh)}r(hhXphphhh+]h,]h-]h.]h/]uh1KTh2hh]rhFXUaddSection(); // add header $header = $section->addHeader(); // add table $table = $header->addTable(); $table->addRows(1); $table->addColumnsList(array(2, 2, 2)); // add image to table in header $image = $table->addImageToCell(1, 1, '/path/to/image/file');rr}r(h Uh!jubaubeubeubeh UU transformerrNU footnote_refsr}rUrefnamesr}rUsymbol_footnotesr]rUautofootnote_refsr]rUsymbol_footnote_refsr ]r!U citationsr"]r#h2hU current_liner$NUtransform_messagesr%]r&cdocutils.nodes system_message r')r(}r)(h Uh)}r*(h-]UlevelKh+]h,]Usourceh%h.]h/]UlineKUtypeUINFOr+uh]r,hJ)r-}r.(h Uh)}r/(h-]h.]h,]h+]h/]uh!j(h]r0hFX3Hyperlink target "header-footer" is not referenced.r1r2}r3(h Uh!j-ubah'hNubah'Usystem_messager4ubaUreporterr5NUid_startr6KU autofootnotesr7]r8U citation_refsr9}r:Uindirect_targetsr;]r<Usettingsr=(cdocutils.frontend Values r>or?}r@(Ufootnote_backlinksrAKUrecord_dependenciesrBNU rfc_base_urlrCUhttp://tools.ietf.org/html/rDU tracebackrEKUpep_referencesrFNUstrip_commentsrGNU toc_backlinksrHUentryrIU language_coderJUenrKU datestamprLNU report_levelrMKU _destinationrNNU halt_levelrOKU strip_classesrPNhCNUerror_encoding_error_handlerrQUbackslashreplacerRUdebugrSNUembed_stylesheetrTUoutput_encoding_error_handlerrUUstrictrVU sectnum_xformrWKUdump_transformsrXNU docinfo_xformrYKUwarning_streamrZNUpep_file_url_templater[Upep-%04dr\Uexit_status_levelr]KUconfigr^NUstrict_visitorr_NUcloak_email_addressesr`Utrim_footnote_reference_spaceraUenvrbNUdump_pseudo_xmlrcNUexpose_internalsrdNUsectsubtitle_xformreU source_linkrfNUrfc_referencesrgNUoutput_encodingrhUutf-8riU source_urlrjNUinput_encodingrkU utf-8-sigrlU_disable_configrmNU id_prefixrnUU tab_widthroKUerror_encodingrpUcp850rqU_sourcerrU0E:\htdocs\phprtflite\tutorials\header-footer.rstrsU generatorrtNUdump_internalsruNU pep_base_urlrvUhttp://www.python.org/dev/peps/rwUinput_encoding_error_handlerrxjVUauto_id_prefixryUidrzUdoctitle_xformr{Ustrip_elements_with_classesr|NU _config_filesr}]r~Ufile_insertion_enabledrKU raw_enabledrKU dump_settingsrNubUsymbol_footnote_startrKUidsr}r(hhhh4hhhh4hhhhuUsubstitution_namesr}rh'h2h)}r(h-]h+]h,]Usourceh%h.]h/]uU footnotesr]rUrefidsr}rh]rhasub.