Skip to content

Commit

Permalink
Fixed code formatting in example
Browse files Browse the repository at this point in the history
  • Loading branch information
pipwerks committed Feb 13, 2025
1 parent 73d27a4 commit fdd170a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ Any string entered here will be inserted into the target element when the browse

If you're trying to embed a base64 PDF but the browser doesn't support inline PDFs, the user will see a download link for the PDF. This option enable syou to set a custom filename for that downloaded base64 PDF.

```js
var options = {
fallbackFileNameForBase64: "My custom fielname.pdf"
};
PDFObject.embed("myfile.pdf", "#my-container", options);
//If browser doesn't support inline PDFs, outputs:
//<p>This is a <a href='myfile.pdf'>fallback link</a></p>
```
```js
var options = {
fallbackFileNameForBase64: "My custom fielname.pdf"
};
PDFObject.embed("myfile.pdf", "#my-container", options);
//If browser doesn't support inline PDFs, outputs:
//<p>This is a <a href='myfile.pdf'>fallback link</a></p>
```

**Demo:** [Embedding a PDF encoded as a Base64 string, with custom filename](/examples/base64-filename.html){target=_blank}

Expand Down

0 comments on commit fdd170a

Please sign in to comment.