Page 1 of 1

Change PDFObject options

Posted: Sun Mar 28, 2021 4:37 pm
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.


Re: Change PDFObject options

Posted: Sun Mar 28, 2021 5:43 pm
by mpol_ch

Perfect, thank you.

mpol_ch


Re: Change PDFObject options

Posted: Thu Jul 06, 2023 9:44 am
by MASTERAL

hi

Can you say me where put this code

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

Thanks


Re: Change PDFObject options

Posted: Thu Jul 06, 2023 9:50 am
by arbei

You may use Page_Head server event, see example 4.