Forums | Mahara Community

Support /
Problem embedding PDF


Don Presant's profile picture
Posts: 255

29 October 2013, 1:08 AM

Hi, very excited by the prospect of 1.8, but having a problem embedding PDF.

I'm using demo.mahara.org

When I try to upload/embed at the same time I get this message:

          The file you uploaded was not the correct type for this block.

When I try to look for PDF's I've uploaded, none are listed.

Is it me? They seem to be valid PDFs.

 

Gideon Williams's profile picture
Posts: 108

29 October 2013, 2:22 AM

Have just set up a page called Testing123 and managed to embed a PDF file from home:

https://dl.dropboxusercontent.com/u/7336564/testingpdf.png

 

Sorry :O(

Don Presant's profile picture
Posts: 255

29 October 2013, 3:15 AM

Hmm...possible to send me that PDF so I can try with the same file?

don[at]learningagents.ca

Aaron Wells's profile picture
Posts: 896

31 October 2013, 3:26 PM

Hi Don,

What web browser are you using? I think some of our filetype detection is based on what the browser says the file is, so it's possible this may be a browser-specific issue.

Cheers,

Aaron

Don Presant's profile picture
Posts: 255

02 November 2013, 9:53 AM

Hi Aaron:

These work: Chrome, IE

These don't seem to work.: FF 24.0 and now 25.0 on Windows 7

FF can recognize/embed PDFs uploaded by other browsers, but not PDFs that it uploads.

 

I should also meniton that I also have Adobe Acrobat Pro. Not sure if that's relevant; I switched it from the default application for PDFs and it didn't make any difference.

Robert Lyon's profile picture
Posts: 336

08 November 2013, 3:00 PM

The problem seems to be when a pdf is uploaded and saved in Mahara it records the mimetype of the pdf uploaded as well.

If the browser has application/pdf set for handling pdfs (the default) then all is ok. But if you have other pdf mimetype options in play it can get confused.

Can I get you to check your FF applications settings

Preferences -> Applications and scroll thru the list to see all that are associated with PDF.

You should have the default one: Portable Document Format (PDF)

Let me know if you have any others - like PDF document (application/force-download) etc. as I'm trying to get a more robust list of PDF mimetypes that mahara will respect.

Cheers

Robert

Don Presant's profile picture
Posts: 255

08 November 2013, 4:30 PM

Hi Robert, can you see this snapshot?

 

 

Nana Klinton's profile picture
Posts: 1

06 November 2013, 8:07 PM

HI there

I have encountered the same question with you.I can not embed the pdf files even using a pdf processing program.I have installed a pdf program before.I found it is impossible for this program to embed the pdf directly.So is there any powerful program which supports to do that?Thanks for any suggestion.

Aaron Wells's profile picture
Posts: 896

11 November 2013, 1:48 PM

We've filed a bug about the PDF mimetype recognition problem: https://bugs.launchpad.net/mahara/+bug/1249166

Ultimately it's a problem in Mahara's handling of mimetypes altogether. Due to a bug in Ubuntu's distribution of finfo(), we've fallen back to trusting what the browser says the mimetype of the uploaded file is. But different browsers say different things, and it causes problems.

We're discussing some solutions. Hopefully we can get this resolved for 1.8.1 (and I think it'll be a backport to 1.6 and 1.7 as well).

Cheers,

Aaron

Kristina Hoeppner's profile picture
Posts: 3356

18 November 2013, 7:41 AM

Hello,

I've added information of how you can clear out the other incorrect mimetypes from your Firefox so that only the correct PDF one is left and embedding works:

http://manual.mahara.org/en/1.8/blocks/files.html#new-in-mahara-1-8-pdf

Cheers

Kristina

 

10 results