05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 10-16. Closed note<br />

The content_type is the MIME type of the file (e.g., "text/plain"). The icon parameter<br />

can be "graph", "pushpin", "paperclip", or "tag". For example:<br />

pdf_begin_page($p, 595, 842);<br />

pdf_attach_file($p, 100, 600, 200, 700, "file.zip",<br />

"Here is that file you wanted",<br />

"Rasmus Lerdorf", "application/zip", "paperclip");<br />

Page Transitions<br />

PDF has the ability to apply special page transition effects similar to those you might<br />

see in presentation programs such as Microsoft PowerPoint. Most viewers apply<br />

transitions only when in fullscreen mode.<br />

A page transition is set with the transition parameter. The available transitions are<br />

"split", "blinds", "box", "wipe", "dissolve", "glitter", and "replace". The default<br />

transition is always the simple "replace", which just replaces one page with the next.<br />

To set the default time between pages, you can set the duration parameter. For<br />

example, to set the duration between pages to 5 seconds and to switch to the "wipe"<br />

page transition from here on, you can use:<br />

<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.<br />

Other PDF Features | 261

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!