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.

The width defaults to 100%, which means the object expands to fill the element that contains it, whether the element is a <div> or <body>.

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.

Show/hide various controllers

Page mode cannot be used if toolbar is set to 'hide'.

Jump to a location in the document

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

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).

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

Adobe Reader uses FDF files to auto-populate form fields in the PDF.