Topic on Extension talk:PDFEmbed

Jump to navigation Jump to search

Users unable to embed PDF

Legaulph (talkcontribs)
MediaWiki 1.25.5

When trying to embed a PDF the user is getting:

"you don't have permission to embed pdf files"

If I edit as admin and save it I get the same error.

I have to delete it save then edit and add the link and save then it is successful

Pisnaz (talkcontribs)

Are you using <pdf>File:FooBar.pdf</pdf> ?

I just had the same issue and am kicking myself for it now. (talkcontribs)

Having the same issue as well any ideas

Pisnaz (talkcontribs)

Seems I had other issues as well once I started using my bot and normal users.

There is a embed_pdf permission showing now, that I did not see before. It seems it is only on Administrators by default.

For my Bot uploads I simply added in $wgGroupPermissions['bot']['embed_pdf'] = true; to my LocalSettings.php

I am running:

MediaWiki 1.26.2
PDFEmbed 1.1.2

Hope that helps. Also be careful as blanket permissions might cause issues.

RockSheep (talkcontribs)

This should be said in the configuration section of the extension article. Thanks!

Legaulph (talkcontribs)

Yes that works for me as well

This post was hidden by Pisnaz (history) (talkcontribs)

That worked great! now that that has a permission line I can get my users to see or embed. Thanks a bunch! (talkcontribs)


I have added the

$wgGroupPermissions['*']['embed_pdf'] = true;

to my LocalSettings.php but I still get the error-message "you don't have permission to embed pdf files". MW Version 1.31.1

What else can I check?

Thanks in advance! (talkcontribs)

Anyone on this problem ?

IMTS-TB (talkcontribs)


I've installed the Extionsion, and can upload PDF files to our MediaWiki 1.31.

However, after linking to the uploaded file, and saving the page, a empty square shows, where the PDF image should be.

When I check the source code of the page, an URL is listed, and when I click on the URL, the PDF is opened.

All this happens in Google Chrome.

I also installed this extension in our TestWiki, and there I have no issues! Same browser., same Wiki version (talkcontribs)


You have to replace line 92 in the PDFEmbed.hooks.pdf file


'src' => $file->getFullUrl().'#page='.$page,


'src' => preg_replace("/^http:/i", "https:", $file->getFullUrl()).'#page='.$page,

When not changed, you get an empty square, cause your side is loaded with https and the extension uses http, mixed content, blocked in chrome for example.

Reply to "Users unable to embed PDF"