Pdf File Upload In Joomla Vs Wordpress

Posted on by admin
Pdf File Upload In Joomla Vs Wordpress Average ratng: 6,3/10 7190 votes

Uploading and linking a pdf in a Joomla article using JCE editor. Making a link on your Joomla web page for viewers to be able to download a pdf. Three Ways To Add PDF Files To Your WordPress.

Description

Upload PDFs and embed them straight into your site – just like adding images! PDFs will be automatically sized to their natural size and shape (or just fill the width available if they are too big). Optionally, you can specify a width and the correct height will be calculated automatically. The shape will be recalculated whenever the page is resized by the user.

The plugin has a unique method for embedding PDFs, using Javascript only, and not using iframes or third-party services. This gives a lot of flexibility over the appearance of your document.

The free viewer currently has Next/Prev buttons to page through the document, and zoom buttons.

PDFs are embedded within your existing WordPress pages so we have full control over appearance, and all Javascript and other files are served by your own server (not by Google or any other third-party who may not be able to guarantee their own reliability).

Even if other plugins use similar technology, they will insert the PDF itself into an ‘iframe’ which means they do not get the flexibility over sizing.

There is no button for users to download the PDF in the free version of the plugin, but this is available in the Premium versions along with other extra features.
Hyperlinks in your PDF will only be clickable in the Premium versions.

Usage

Once installed and Activated, click Add Media from any page or post, just like adding an image, but drag and drop a PDF file instead.

When you insert into your post, it will appear in the editor as a ‘shortcode’ as follows:

[pdf-embedder url=’https://mysite.com/wp-content/uploads/2015/01/Plan-Summary.pdf’]

You can change the default appearance – e.g. width, and toolbar position/appearance through Settings -> PDF Embedder.

To override your site-wide defaults on an individual embed, see the Plugin Instructions for information about sizing options plus other ways to customize the shortcodes.

Extra Premium Features

Features available in the Premium versions:

  • Download button in the toolbar
  • Continuous scroll between pages
  • Hyperlinks are fully functional
  • Full screen mode
  • Edit page number to jump straight to page
  • Track number of downloads and views
  • Removes wp-pdf.com attribution from the toolbar
  • Mobile-friendly
  • Secure option – difficult to download original PDF

See wp-pdf.com for details!

Mobile-friendly embedding using PDF Embedder Premium

The free version of the plugin should work on most mobile browsers, but it will be cumbersome for users with small screens – it is difficult to position the document entirely within the screen, and your users’ fingers may catch the entire browser page when they’re trying only to move about the document…

Our PDF Embedder Premium plugin solves this problem with an intelligent ‘full screen’ mode.
When the document is smaller than a certain width, the document displays only as a ‘thumbnail’ with a large ‘View in Full Screen’ button for the user to click when they want to study your document.
This opens up the document so it has the full focus of the mobile browser, and the user can move about the document without hitting other parts of the web page by mistake. Click Exit to return to the regular web page.

The user can also touch and scroll continuously between all pages of the PDF which is much easier than clicking the next/prev buttons to navigate.

See our website wp-pdf.com for more details and purchase options.

Protect your PDFs with our secure premium version

Our PDF Embedder Premium Secure plugin provides the same simple but elegant viewer as the premium version, with the added protection that it is difficult for users to
download or print the original PDF document.

This means that your PDF is unlikely to be shared outside your site where you have no control over who views, prints, or shares it.

Optionally add a watermark containing the user’s name or email address to discourage sharing of screenshots.

See our website wp-pdf.com for more details and purchase options.

PDF Thumbnails

Our PDF Thumbnails plugin provides automatically generates fixed image versions of all PDF files in your Media Library, to use on your site as you wish.

You can use them as featured images in posts containing an embedded version of the PDF, or as a visual clickable link to download the PDF directly.
It also displays the thumbnail as the ‘icon’ for the PDF in the Media Library, making it easy for authors to locate the PDFs they need to insert in a post.

See our website wp-pdf.com/thumbnails/ for more details and purchase options.

Now translation-ready!

Please contribute your translations.

Persian translation by Mostafa Safarian i of سئو

French translation by Thierry Gaillou of JDFitForme

Spanish translation by Armando Landois of LANDOIS Diseño

With thanks to the Mozilla team for developing the underlying pdf.js technology used by this plugin.

Blocks

This plugin provides 1 block.

pdfemb/pdf-embedder-viewer

Installation

Easiest way:

  1. Go to your WordPress admin control panel’s plugin page
  2. Search for ‘PDF Embedder’
  3. Click Install
  4. Click Activate on the plugin

If you cannot install from the WordPress plugins directory for any reason, and need to install from ZIP file:

  1. Upload directory and contents to the /wp-content/plugins/ directory, or upload the ZIP file directly in
    the Plugins section of your WordPress admin
  2. Follow the instructions from step 4 above

FAQ

How can I obtain support for this product?

We have instructions and a Knowledge Base on our website explaining common setup queries and issues.

Please feel free to email contact@wp-pdf.com with any questions.

Always include your full shortcode, plus links to the relevant pages, and screenshots if they would be helpful too.

We may occasionally be able to respond to support queries posted on the ‘Support’ forum here on the wordpress.org plugin page, but we recommend sending us an email instead if possible.

How can I change the Size or customize the Toolbar?

See Settings -> PDF Embedder in your WordPress admin to change site-wide defaults. You can also override individual embeds by modifying the shortcode.

Resizing works as follows:

  • If width=’max’ the width will take as much space as possible within its parent container (e.g. column within your page).
  • If width is a number (e.g. width=’500′) then it will display at that number of pixels wide.

In all cases, if the parent container is narrower than the width calculated above, then the document width will be reduced to the size of the container.

The height will be calculated so that the document fits naturally, given the width already calculated.

The Next/Prev toolbar can appear at the top or bottom of the document (or both), and it can either appear only when the user hovers over the document or it can be fixed at all times.

See the Plugin Instructions for more details about sizing and toolbar options.

Premium feature list

Features available in the premium versions of the plugin:

  • Download button in the toolbar
  • Continuous scroll between pages
  • Hyperlinks are fully functional
  • Full screen mode
  • Edit page number to jump straight to page
  • Track number of downloads and views
  • Removes wp-pdf.com attribution from the toolbar
  • Mobile-friendly
  • Secure option – difficult to download original PDF

See wp-pdf.com for details!

Can I improve the viewing experience for mobile users?

Yes, our PDF Embedder Premium plugin has an intelligent ‘full screen’ mode.
When the document is smaller than a certain width, the document displays only as a ‘thumbnail’ with a large ‘View in Full Screen’ button for the user to click when they want to study your document.
This opens up the document so it has the full focus of the mobile browser, and the user can move about the document without hitting other parts of the web page by mistake.
Click Exit to return to the regular web page.

See our website wp-pdf.com for more details and purchase options.

Can I protect my PDFs so they are difficult for viewers to download directly?

Not with the free or (regular) premium versions – it is relatively easy to find the link to download the file directly.

A secure premium version is available that encrypts the PDF during transmission, so it is difficult for a casual user to save or print the file for use outside your site.

See our website wp-pdf.com for more details and purchase options.

Can I add a Download button to the toolbar?

This is possible only in the Premium version. As a workaround in the free version, you could add a direct link to the PDF beneath the embedded version.

To do this, copy the URL from the pdf-embedder shortcode and insert it into a link using HTML such as this:
<a href=”(url of PDF)”>Download Here</a>

Are Hyperlinks supported?

The Premium versions allow functioning hyperlinks – both internal links within the document, and links to external websites.

Can I remove the wp-pdf.com link from the viewer toolbar?

The easiest way is to upgrade to our Premium version, but if you know how to add entries to your database then you can add a line to the wp_options table
with option_name ‘pdfemb_poweredby’ and option_value ‘1’.

For more information on Premium versions visit wp-pdf.com.

Reviews

After trying several ways to incorporate a pdf registration form into my website, I finally succeeded with PDF Embedder. It was easy! Love this plugin and also PDF Thumbnails. I have always experienced quick and thorough support from them.
Active5 months ago

I have a website hosted on a PC I have no access to. I have an upload form allowing people to upload mp3 files up to 30MB big. My server side script is done in PHP.

Every time I try and upload a file, I receive an error claiming that the file exceeds the maximum size allowed, so I need to increase the size. My research on the web suggested changing the .htaccess file which I do not have access to, so that won't work. Others suggested that I should add a custom php.ini file to my root which did not work. Any other suggestions?

Paolo Forgia
4,8086 gold badges29 silver badges50 bronze badges
Yo MommaYo Momma
3,8235 gold badges29 silver badges43 bronze badges

15 Answers

You need to set the value of upload_max_filesize and post_max_size in your php.ini :

After modifying php.ini file(s), you need to restart your HTTP server to use new configuration.

If you can't change your php.ini, you're out of luck. You cannot change these values at run-time; uploads of file larger than the value specified in php.ini will have failed by the time execution reaches your call to ini_set.

See the Description of core php.ini directives.

meagarmeagar
188k32 gold badges284 silver badges300 bronze badges

You can change it via an .htaccess file.

.htaccess files are stored in the same directory as your .php files are. They modify configuration for that folder and all sub-folders. You simply use them by creating an .htaccess file in the directory of your choice (or modify it if present).

The following should enable you to increase your upload limit (if the server provider allows PHP config changes via .htaccess).

Andrew MooreAndrew Moore
78.5k29 gold badges154 silver badges169 bronze badges

I had the same problem and i created a .user.ini file and put it in the directory in which the upload script was located. Than inside that file i set these these two values:

and it worked great for me!

Tamil Selvan C
15.5k9 gold badges38 silver badges59 bronze badges
user1641252user1641252

You can also use ini_set function (only for PHP version below 5.3):

Like @acme said, in php 5.3 and above this settings are PHP_INI_PERDIR directives so they can't be set using ini_set. You can use user.ini instead.

vzwick
8,9554 gold badges36 silver badges60 bronze badges
ManjarManjar

To locate the ini file, first run

Then open the file and change

replacing the 2M with the size you want, for instance 100M.

I've got a blog post about with a little more info too http://www.seanbehan.com/how-to-increase-or-change-the-file-upload-size-in-the-php-ini-file-for-wordpress

seanbehanseanbehan

I have the same problem in the past .. and i fixed it through .htaccess file

When you make change on php configration through .htaccess you should put configrations in IfModule tag, other that the Internal server error will arise.

This is an example, it works fine for me:

And this is php referance if you want to understand more.http://php.net/manual/en/configuration.changes.php

Eyad FarraEyad Farra
4,1361 gold badge19 silver badges24 bronze badges

I resolved this issue by creating a file called .user.ini in the directory where the PHP file scripts reside (this means any PHP script in this directory gets the new file size limit)

Wordpress Upload Document

The contents of .user.ini were:

Fabien Sa
6,0672 gold badges32 silver badges38 bronze badges
PearcePearce

I had the same problem. I have tried three ways that were usually suggested:

  1. functions.php
  2. php.ini
  3. .htaccess

none if which solved my problem. I am using godaddy and came across a suggested solution which was:

  1. got to Web Hosting, then Manage
  2. Under Software select Select PHP version
  3. Select Switch to PHP Options found on the top right corner of the table in font color: blue
  4. On the bottom most part, you'll probably have upload_max_filesize = 2M
  5. Now, feel free to change it
  6. Be sure to click the Save button!
  7. Now go to your wp-admin panel, select Media then Add

Voila! Now you have a different max upload file size :)

nrmbnrmb

Well, I would like to add my 2 cents here.

I'm using shared webhosting and I tackled this problem many times, tried to resolve it on my own but to no avail. Finally I managed to resolve it through checking various web sources and contacting my hosting service provider. My questions were 'How can I change php value memory_limit in shared webhosting?', 'How can I change php value upload_max_filesize in shared webhosting?', 'How can I change php value max_input_vars in shared webhosting?', 'How can I change php value max_execution_time in shared webhosting?', 'How can I change php value max_input_time in shared webhosting?' and many more by configuring or changing php.ini or .htaccess file. I tried to change them but problems arose. Finally I contacted my hosting provider, and it turns out that I set my php to native, they changed it to php 5.6, here is their answer:

'Your PHP was set to 'native' mode which means you can't override those values. I've changed you to just '5.6' so you should be good to go.'

Pdf File Upload In Joomla Vs Wordpress

After that I connected my website through ftp Filezilla, also don't forget to make both your ftp service to show hidden files, and your local computer to do so, because .htaccess file was hidden in my local laptop and in my website. It was available in public_html folder, I just downloaded it and added the following codes to the end of the file and then uploaded it back to the server:

Everything is working properly for the time being, if any of you overcome with some problems please write here and warn me so that I can change the above-shown codes. By the way, I also upload some pictures which shows the change.

One more thing I almost forgot to mention ZipArchive installation on your shared webhosting service, I managed that requirement to tick by just going to php settings through my cpanel, click on php selector extensions and then tick zip section, that's all.

Thanks.

PS: I'm open to good practices, and if you see any bad practice here please let me know, I'll try to change them. Thanks.

garakchygarakchy

many times i have noticed that site wit shared hosting do not allow to change settings in php.ini files. one also can not even crate .htaaccess file at all. in such situation one can try following things

The EasyLearn AcademyThe EasyLearn Academy

the answers are a bit incomplete, 3 things you have to do

in php.ini of your php installation (note: depending if you want it for CLI, apache, or nginx, find the right php.ini to manipulate. For nginx it is usually located in /etc/php/7.1/fpm where 7.1 depends on your version. For apache usually /etc/php/7.1/apache2)

or set other values. Restart/reload apache if you have apache installed or php-fpm for nginx if you use nginx.

ToskanToskan
5,8978 gold badges59 silver badges110 bronze badges

Non of those solutions work for me!! (already set to 32M by default).The problem is in most case max_allowed_packet

I am working on localhost and using MAMP.

Here is solutions;

1. If you don't have my.ini

Add

To

2. If you have my.ini

Under

Add

DONE!

ErcanEErcanE
9481 gold badge13 silver badges24 bronze badges

Perhaps this should be a comment to @seanb123 and @Fredrick Gauss commenting on his comment, but for me in Drupal 8.1 with PHP 7 the file I needed to modify was located here:

I modded probably four other php.ini files, including the one my system called the 'Loaded Configuration File' (php -i grep -i 'loaded configuration file') and the one found on the info.php page but none of them helped. The key to discovering the correct path was found on a site from 2012. They said the path '/etc/php5/apache2/php.ini' was deprecated even BACK THEN but it gave me a clue where to find it. For PHP7 it's a little different than in PHP5 but the concept is the same.

Maybe this will help some otherwise helpless schmuck like myself.

That being said, the answer to the OP in my case would be that someone with admin privileges on the box would have to do it.

The site that helped me: http://www.evilbox.ro/linux/remove-ispconfig-maximum-upload-size-of-2m-for-wordpress/

This is also addressed here: Import file size limit in PHPMyAdmin

EDIT:the full text of my note to myself:

In order to change the max upload size, edit upload_max_filesize and [if needed?] post_max_size in /etc/php/7.0/apache2/php.ini (or in older versions: /etc/php5/apache2/php.ini )

/etc/init.d/apache2 restart

EDIT AGAIN:since you're importing big files you may need to change the timeout for processing them. In my case, the file named, 'config.default.php' was found at /usr/share/phpmyadmin/libraries/config.default.php with the variable $cfg['ExecTimeLimit'] = 300;I changed mine to 900 for a huge import, for instance.Afterward you need to restart apache

seizethecarpseizethecarp

Three things you need to check.

upload_max_filesize, memory_limit and post_max_size in the php.ini configuration file exactly.

All of these three settings limit the maximum size of data that can be submitted and handled by PHP.

Typically post_max_size and memory_limit need to be larger than upload_max_filesize.

So three variables total you need to check to be absolutely sure.

prostiprosti
10.7k2 gold badges44 silver badges48 bronze badges

With WAMP it's all pretty easy

WAMP Icon > PHP > PHP Settings > upload_max_filesize = nM > n = (2M, 4M, 8M, 16M, 32M, 64M, 128M, 256M, 512M, or Choose (custom)).

Service(s) reload automatically.

But, if you truly have no access to the server, you might want to explore writing a chunking API.

Razi Tiwana
1,2192 gold badges9 silver badges14 bronze badges
SimonBSimonB

protected by CommunitySep 27 '13 at 15:20

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged php or ask your own question.