Title: Vanilla PDF Embed
Author: Mike Doherty
Published: <strong>7 دسامبر 2013</strong>
Last modified: 8 نوامبر 2016

---

جستجوی افزونه‌ها

این افزونه **با ۳ نگارش عمدهٔ اخیر وردپرس آزمایش نشده است**. ممکن است دیگر نگهداری
یا پشتیبانی نشود و هنگام استفاده با نگارش‌های تازه‌تر وردپرس مشکل سازگاری داشته 
باشد.

![](https://s.w.org/plugins/geopattern-icon/vanilla-pdf-embed.svg)

# Vanilla PDF Embed

 توسط [Mike Doherty](https://profiles.wordpress.org/_doherty/)

[دانلود](https://downloads.wordpress.org/plugin/vanilla-pdf-embed.zip)

 * [جزئیات](https://fa.wordpress.org/plugins/vanilla-pdf-embed/#description)
 * [نقد و بررسی‌ها](https://fa.wordpress.org/plugins/vanilla-pdf-embed/#reviews)
 *  [نصب](https://fa.wordpress.org/plugins/vanilla-pdf-embed/#installation)
 * [توسعه](https://fa.wordpress.org/plugins/vanilla-pdf-embed/#developers)

 [پشتیبانی](https://wordpress.org/support/plugin/vanilla-pdf-embed/)

## توضیحات

### Basic use

To embed a PDF you’ve uploaded to your WordPress site’s media
 library, simply put
the URL for the attachment page in your post on its own line. The PDF will be embedded
with the default settings at that location, as if it were using oEmbed.

#### Examples:

    ```
    برای دسترسی به report1.pdf کلیک کنید
    ```

This doesn’t work for PDFs hosted on other websites, or if you
 need to change the
parameters.

### Using the `[pdf]` shorttag

If the PDF isn’t in your WordPress site’s media library, or if
 you want to customize
any parameters for the embed, then use the `[pdf]...[/pdf]` shorttag. Between the
tags, you’ll provide the URL for the PDF to embed. If the PDF is in your WordPress
site’s media library, you can either give the attachment page URL, or the URL to
the PDF file directly.

The `[pdf]` shorttag accepts several optional parameters:

 * `width` – sets the width of the frame the PDF is embedded in.
    By default, this
   is set to 100%.
 * `height` – sets the height of the frame the PDF is embedded
    in. By default, 
   this is unset.
 * `title` – sets the title of the PDF, for use in the fallback
    link text.
 * `open_params` – sets the [PDF open params](https://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf)
   
   which control how the PDF file is displayed in the embed frame. These are poorly
   supported in browsers.

#### Examples:

    ```
    Post short URL: [pdf width="200px"]http://localhost/?p=9[/pdf]
    Attachment default URL: [pdf height="500em"]http://localhost/?attachment_id=9[/pdf]
    Attachment pretty URL: [pdf title="Report 1"]http://localhost/test/report1/[/pdf]
    Media direct URL: [pdf]http://localhost/wp-content/uploads/2013/11/report1.pdf[/pdf]
    Change PDF open params: [pdf open_params="page=10&view=Fit"]http://localhost/?p=9[/pdf]
    ```

### Compatibility

The PDF should be embedded in the page, with the document scaled so it fills the

embed frame horizontally. Unfortunately, embedding PDFs is not well-supported.

#### Auto-loading embedded PDFs

Unlike with images, web browsers may not automatically download and display
 embedded
PDFs when the page is loaded. For security reasons, some users prefer not to allow
the PDF plugin to run unless they trust the website the PDF comes from. This generally
leaves a grey rectangle that the user may click on to allow the PDF to be downloaded
and displayed.

#### PDF open parameters

As of v0.0.8, you can set the [PDF open parameters](https://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf)

by setting `open_params` in the shortcode, as shown above. This is unlikely to actually
anything, since PDF open parameters are poorly supported in browsers. But you can
try! Provide the parameters as a query string: `page=1&view=Fit`. Refer to the Adobe
documentation on what parameters are available.

#### Chrome

The PDF should be scaled/zoomed within the embed frame so that the full
 horizontal
width of the paper fills the frame. This is [not supported in Chrome’s default PDF
viewer, so the document will probably be scaled to 100%, which may either mean the
document doesn’t fill the frame, or, more likely, the document is too wide for the
frame, and the right-hand side of the document is hidden.

#### Internet Explorer

Internet Explorer requires a PDF plugin to render embedded PDFs. Generally,
 that’s
Adobe Reader. Without such a plugin, the fallback download link will be used.

#### Mobile browsers

In particular, mobile browsers may show a grey box instead of the embedded PDF,

and will download the file when it is clicked. Other mobile browsers might embed
the PDF, but won’t allow it to scroll.

### Alternatives

Your best alternative is to **not** embed PDFs. PDFs are bad for many reasons:
 
not easily indexed by search engines, not easily accessible by readers who use assistive
technologies, poorly supported by web browsers (as seen above) and so on. They’re
just **bad** and you should avoid embedding PDFs if you can.

If you _really_ can’t, then you might consider using another solution like
 [https://pdfobject.com/](https://pdfobject.com/)
or [PDF.js](https://mozillalabs.com/en-US/pdfjs/).

## عکس‌های صفحه

[[

[[

## نصب

 1. Upload `vanilla-pdf-embed.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the “Plugins” menu in the WordPress admin panel

## نقد و بررسی‌ها

![](https://secure.gravatar.com/avatar/f2949e1420c186ba7fe9eafb8f5c406b6b29ddebb639e7c7da6f93d39b784643?
s=60&d=retro&r=g)

### 󠀁[Nice](https://wordpress.org/support/topic/nice-3180/)󠁿

 [Martin Sauter](https://profiles.wordpress.org/martinsauter/) 2 دسامبر 2019

Converts the URL of a PDF document automatically in to an embedded PDF. Very easy
to use, very nice result.

![](https://secure.gravatar.com/avatar/b117d1429cff526413f6e66f90fa39a6f17bbc0bb66ec2f9cfc986386f2af984?
s=60&d=retro&r=g)

### 󠀁[Very easy to use](https://wordpress.org/support/topic/very-easy-to-use-373/)󠁿

 [indianplayschools](https://profiles.wordpress.org/indianplayschools/) 21 جولای
2018

Just paste the link to pdf file on the same domain and you can view it just as pdf
and not a link. This is what I was looking for. The best plugin to view the pdf.
You can download and print too. Thank you very much

![](https://secure.gravatar.com/avatar/f28a5b915e730569ba49f741213d364c32a32c0ecd2c7f9a089fa9fd4f083ec2?
s=60&d=retro&r=g)

### 󠀁[Does not embed PDF](https://wordpress.org/support/topic/does-not-embed-pdf/)󠁿

 [clasherplayer](https://profiles.wordpress.org/clasherplayer/) 13 ژوئن 2018

There was no embedding; only the link to the PDF file was placed. I think that this
plugin has not been updated as of the time of writing.

![](https://secure.gravatar.com/avatar/07b259d2c74295e4b1cc0168ef8d242eaf73ccf6be1d3565712dab6b9ca290b5?
s=60&d=retro&r=g)

### 󠀁[Doesn't work on Latest Chrome or Firefox](https://wordpress.org/support/topic/doesnt-work-on-latest-chrome-or-firefox/)󠁿

 [joey4040](https://profiles.wordpress.org/joey4040/) 3 سپتامبر 2016 1 پاسخ

Doesn't work on Latest Chrome or Firefox

![](https://secure.gravatar.com/avatar/a44d69f0d3a20b36ef35485a683ec60490cded760647e7d0c3e10bbff5b26698?
s=60&d=retro&r=g)

### 󠀁[Doesn't embed Pdf](https://wordpress.org/support/topic/doesnt-embed-pdf/)󠁿

 [swampy](https://profiles.wordpress.org/ziky/) 3 سپتامبر 2016 1 پاسخ

Doesn't embed it all, just inserts a link to download the pdf

![](https://secure.gravatar.com/avatar/1447d63d58562dbd0e76b2c9c3e9325a5a6fd63808b933b24dd759e5482dc663?
s=60&d=retro&r=g)

### 󠀁[Works Nicely!](https://wordpress.org/support/topic/doesnt-work-properly-21/)󠁿

 [Zeshan Ahmed](https://profiles.wordpress.org/zeshanshani/) 3 سپتامبر 2016 1 پاسخ

 [ خواندن تمامی 32 نقد و بررسی‌ ](https://wordpress.org/support/plugin/vanilla-pdf-embed/reviews/)

## توسعه دهندگان و همکاران

“Vanilla PDF Embed” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کرده‌اند.

مشارکت کنندگان

 *   [ Mike Doherty ](https://profiles.wordpress.org/_doherty/)

[ترجمه “Vanilla PDF Embed” به زبان شما.](https://translate.wordpress.org/projects/wp-plugins/vanilla-pdf-embed)

### علاقه‌ مند به توسعه هستید؟

[کد را مرور کنید](https://plugins.trac.wordpress.org/browser/vanilla-pdf-embed/)،
[مخزن SVN](https://plugins.svn.wordpress.org/vanilla-pdf-embed/) را بررسی کنید، 
یا از طریق [RSS](https://plugins.trac.wordpress.org/log/vanilla-pdf-embed/?limit=100&mode=stop_on_copy&format=rss)
در [گزارش توسعه](https://plugins.trac.wordpress.org/log/vanilla-pdf-embed/) مشترک
شوید.

## گزارش تغییرات

#### 0.0.8

 * Add the ability to set PDF open params

#### 0.0.7

 * Fix a couple corner cases – thanks AngelinaBelle!

#### 0.0.6

 * Set a default height of 500em

#### 0.0.5

 * Fix a simple programming error; thanks to firedog341 for the report

#### 0.0.4

 * By default, use a 100% width embed frame
 * Expanded readme

#### 0.0.3

 * Embed PDFs on attachment pages
 * Fix a spacing issue for PDFs with no title
 * Don’t use PDF open parameters for the fallback link

#### 0.0.2

 * Don’t embed non-PDFs from the media library

#### 0.0.1

 * Initial release

## اطلاعات

 *  نگارش **0.0.8**
 *  آخرین به‌روزرسانی **10 سال پیش**
 *  نصب‌های فعال **3,000+**
 *  نگارش وردپرس ** 3.0.1 یا بالاتر **
 *  آزمایش‌شده تا **4.5.0**
 *  زبان
 * [English (US)](https://wordpress.org/plugins/vanilla-pdf-embed/)
 * برچسب
 * [embed](https://fa.wordpress.org/plugins/tags/embed/)[pdf](https://fa.wordpress.org/plugins/tags/pdf/)
 *  [نمایش پیشرفته](https://fa.wordpress.org/plugins/vanilla-pdf-embed/advanced/)

## امتیازها

 4.6 از 5 ستاره.

 *  [  امتیاز 27 5-ستاره     ](https://wordpress.org/support/plugin/vanilla-pdf-embed/reviews/?filter=5)
 *  [  امتیاز 2 4-ستاره     ](https://wordpress.org/support/plugin/vanilla-pdf-embed/reviews/?filter=4)
 *  [  امتیاز 0 3-ستاره     ](https://wordpress.org/support/plugin/vanilla-pdf-embed/reviews/?filter=3)
 *  [  امتیاز 1 2-ستاره     ](https://wordpress.org/support/plugin/vanilla-pdf-embed/reviews/?filter=2)
 *  [  امتیاز 2 1-ستاره     ](https://wordpress.org/support/plugin/vanilla-pdf-embed/reviews/?filter=1)

[بررسی شما](https://wordpress.org/support/plugin/vanilla-pdf-embed/reviews/#new-post)

[مشاهدهٔ همهٔ بررسی‌ها](https://wordpress.org/support/plugin/vanilla-pdf-embed/reviews/)

## مشارکت کنندگان

 *   [ Mike Doherty ](https://profiles.wordpress.org/_doherty/)

## پشتیبانی

چیزی برای گفتن دارید؟ نیاز به کمک دارید؟

 [مشاهده انجمن پشتیبانی](https://wordpress.org/support/plugin/vanilla-pdf-embed/)

## کمک مالی

آیا تمایل دارید از پیشرفت این افزونه حمایت کنید؟

 [ کمک مالی به این افزونه ](https://flattr.com/profile/doherty)