| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <sect1 id="zend.pdf.save">
- <title>שמירת שינויים בטפסי PDF</title>
- <para>
- ישנם שני מתודות אשר שומרות שינויים לטפסי PDF: <code>Zend_Pdf::save()</code> ו <code>Zend_Pdf::render()</code>.
- </para>
- <para>
- <code>Zend_Pdf::save($filename, $updateOnly = false)</code> שומר את טופס ה PDF לקובץ.
- אם $updateOnly מוגדר ל true, אז רק השינויים החדשים מצורפים לקובץ. אחרת הקובץ משוכתב מחדש.
- </para>
- <para>
- <code>Zend_Pdf::render($newSegmentOnly = false)</code> מחזיר את הטופס PDF כסטרינג.
- אם $newSegmentOnly מוגדר ל true, אז רק השינויים החדשים מוחזרים.
- </para>
- <example id="zend.pdf.save.example-1">
- <title>שמירת קבצי PDF</title>
- <programlisting role="php"><![CDATA[
- ...
- // Load the PDF document
- $pdf = Zend_Pdf::load($fileName);
- ...
- // Update the PDF document
- $pdf->save($fileName, true);
- // Save document as a new file
- $pdf->save($newFileName);
- // Return the PDF document as a string
- $pdfString = $pdf->render();
- ...
- ]]>
- </programlisting>
- </example>
- </sect1>
- <!--
- vim:se ts=4 sw=4 et:
- -->
|