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.4 $ -->
<!-- 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>int</type><parameter>pdf_object</parameter></methodparam>
<methodparam><type>string</type><parameter>text</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>font</parameter></methodparam>
<methodparam choice="opt"><type>float</type><parameter>size</parameter></methodparam>
</methodsynopsis>
<para>
Returns the width of <parameter>text</parameter> using the last
font set by <function>pdf_setfont</function>. If the optional
parameters <parameter>font</parameter> and
<parameter>size</parameter> are specified, the width will be
calculated using that font and size instead. Please note that
<parameter>font</parameter> is a font handle returned by
<function>pdf_findfont</function>.
</para>
<note>
<para>
Both the <parameter>font</parameter> and <parameter>size</parameter>
parameters must 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
-->