An open-source standards-friendly JavaScript utility for embedding PDF files into HTML documents.

The PDFObject utility is © 2008-2022 Philip Hutchison. Released with an MIT license.

PDFObject Code Generator

This code generator can generate two kinds of PDF embedding code: pure standards-compliant HTML markup, or JavaScript-based PDFObject code. The generator also makes it easy to customize your embed code using Adobe's optional PDF Open parameters.

Disclaimer: This service is provided free, as-is with no implied guarantees, and without support. The hope is that you will find the service useful and helpful, but should you encounter issues with the code generated on this site, you'll need to handle them yourself.

Leave blank if you intend to make the PDF fill the browser window.
Any string entered here will be inserted into the target element when the browser doesn't support inline PDFs. HTML is supported. Use the shortcode [url] to insert the URL of the PDF.
Optional PDF Open Parameters

PDF Open parameters allow you to customize the way a PDF file opens in Adobe Reader. You can show/hide toolbars, specify a page number, change the display size, and more. Read Adobe's specifications to learn more. These parameters are not well-supported outside of Adobe Reader — most PDF readers will ignore the parameters, including the built-in PDF readers in Chrome, Internet Explorer, and Safari.

Show/hide various controllers
Page mode cannot be used if toolbar is set to 'hide'. This feature is also supported by PDF.js.
Jump to a location in the document

Please select one method; you cannot use named destination and page at the same time.

This feature is also supported by PDF.js.
Supported by most PDF readers. This feature is also supported by PDF.js.
Display size and scroll location of document

Please select one method; you cannot use zoom, view and view rectangle at the same time.

X/Y coordinates are optional. Adobe Reader will zoom in using the %, and scroll to the x/y coordinates specified (in pixels). Also supported by PDF.js.
Offset coordinate is optional. Adobe Reader will scroll to the coordinate specified (in pixels).
Adobe Reader will zoom in using width/height sizes, then scroll to the x/y coordinates specified (in pixels). This will override any settings specified in the "zoom" or "view" options.
Adobe Reader can highlight search terms. Separate words with a space. This feature only searches for single words and does not work for phrases. Do not use apostrophes('), quotes ("), ampersands (&), an equal sign (=) or a hash (#).
Adobe Reader will draw a highlight box using the dimensions specified (in pixels).
Specifies a comment on a given page in the PDF document. You must specify a comment ID, such as 452fde0e-fd22-457c-84aa-2cf5bed5a349
Adobe Reader uses FDF files to auto-populate form fields in the PDF.