Generator.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @package Zend_Pdf
  16. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  17. * @license http://framework.zend.com/license/new-bsd New BSD License
  18. */
  19. /** Zend_Pdf_Trailer */
  20. require_once 'Zend/Pdf/Trailer.php';
  21. /**
  22. * PDF file trailer generator (used for just created PDF)
  23. *
  24. * @package Zend_Pdf
  25. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  26. * @license http://framework.zend.com/license/new-bsd New BSD License
  27. */
  28. class Zend_Pdf_Trailer_Generator extends Zend_Pdf_Trailer
  29. {
  30. /**
  31. * Object constructor
  32. *
  33. * @param Zend_Pdf_Element_Dictionary $dict
  34. */
  35. public function __construct(Zend_Pdf_Element_Dictionary $dict)
  36. {
  37. parent::__construct($dict);
  38. }
  39. /**
  40. * Get length of source PDF
  41. *
  42. * @return string
  43. */
  44. public function getPDFLength()
  45. {
  46. return strlen(Zend_Pdf::PDF_HEADER);
  47. }
  48. /**
  49. * Get PDF String
  50. *
  51. * @return string
  52. */
  53. public function getPDFString()
  54. {
  55. return Zend_Pdf::PDF_HEADER;
  56. }
  57. /**
  58. * Get header of free objects list
  59. * Returns object number of last free object
  60. *
  61. * @return integer
  62. */
  63. public function getLastFreeObject()
  64. {
  65. return 0;
  66. }
  67. }