php-doc-en/reference/pdf/functions/pdf-stringwidth.xml

61 lines
2 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/pdf.xml, last change in rev 1.42 -->
<refentry id="function.pdf-stringwidth">
<refnamediv>
<refname>pdf_stringwidth</refname>
<refpurpose>Returns width of text using current font</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>float</type><methodname>pdf_stringwidth</methodname>
<methodparam><type>resource</type><parameter>pdfdoc</parameter></methodparam>
<methodparam><type>string</type><parameter>text</parameter></methodparam>
<methodparam><type>int</type><parameter>font</parameter></methodparam>
<methodparam><type>float</type><parameter>size</parameter></methodparam>
</methodsynopsis>
<para>
Returns the width of <parameter>text</parameter> using the parameters
<parameter>font</parameter> and <parameter>size</parameter>.
Please note that <parameter>font</parameter> is a font handle returned
by <function>pdf_findfont</function>.
Parameters <parameter>font</parameter> and <parameter>size</parameter>
are optional before PHP 4.3.5 or with PDFlib less than 5. If they are
not specified, the font set by <function>pdf_setfont</function> is used.
</para>
<note>
<para>
Both the <parameter>font</parameter> and <parameter>size</parameter>
parameters must be used together.
</para>
</note>
<para>
See also
<function>pdf_setfont</function> and
<function>pdf_findfont</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->