Zend_Pdf-Save.xml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <sect1 id="zend.pdf.save">
  2. <title>שמירת שינויים בטפסי PDF</title>
  3. <para>
  4. ישנם שני מתודות אשר שומרות שינויים לטפסי PDF: <code>Zend_Pdf::save()</code> ו <code>Zend_Pdf::render()</code>.
  5. </para>
  6. <para>
  7. <code>Zend_Pdf::save($filename, $updateOnly = false)</code> שומר את טופס ה PDF לקובץ.
  8. אם $updateOnly מוגדר ל true, אז רק השינויים החדשים מצורפים לקובץ. אחרת הקובץ משוכתב מחדש.
  9. </para>
  10. <para>
  11. <code>Zend_Pdf::render($newSegmentOnly = false)</code> מחזיר את הטופס PDF כסטרינג.
  12. אם $newSegmentOnly מוגדר ל true, אז רק השינויים החדשים מוחזרים.
  13. </para>
  14. <example id="zend.pdf.save.example-1">
  15. <title>שמירת קבצי PDF</title>
  16. <programlisting role="php"><![CDATA[
  17. ...
  18. // Load the PDF document
  19. $pdf = Zend_Pdf::load($fileName);
  20. ...
  21. // Update the PDF document
  22. $pdf->save($fileName, true);
  23. // Save document as a new file
  24. $pdf->save($newFileName);
  25. // Return the PDF document as a string
  26. $pdfString = $pdf->render();
  27. ...
  28. ]]>
  29. </programlisting>
  30. </example>
  31. </sect1>
  32. <!--
  33. vim:se ts=4 sw=4 et:
  34. -->