Change PDFObject options

Tips submitted by PHPMaker users
Post Reply
arbei
User
Posts: 8737

Change PDFObject options

Post by arbei »

If you want to change the options of the PDFObject (the embedded PDF viewer), you can use global or page level Client Script (see Server Events and Client Scripts in the help file), e.g.

ew.PDFObjectOptions = {
      width: "600px",
      height: "600px",
      pdfOpenParams: {
        toolbar: 1
      }
};

The PDFObject viewer will use the specified sizes and have a toolbar which allow user to have more controls on the PDF.

See PDFObject API for complete information about the available options.


mpol_ch
User
Posts: 847
Location: Switzerland

Post by mpol_ch »

Perfect, thank you.

mpol_ch


MASTERAL
User
Posts: 15

Post by MASTERAL »

hi

Can you say me where put this code

ew.PDFObjectOptions = {
      width: "600px",
      height: "600px",
      pdfOpenParams: {
        toolbar: 1
      }
};

Thanks


arbei
User
Posts: 8737

Post by arbei »

You may use Page_Head server event, see example 4.


Post Reply