Forums | Mahara Community
Problem embedding PDF
29 October 2013, 1:08
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.
29 October 2013, 2:22
Have just set up a page called Testing123 and managed to embed a PDF file from home:
29 October 2013, 3:15
Hmm...possible to send me that PDF so I can try with the same file?
31 October 2013, 15:26
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.
02 November 2013, 9:53
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.
08 November 2013, 15:00
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.
08 November 2013, 16:30
Hi Robert, can you see this snapshot?
06 November 2013, 20:07
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.
11 November 2013, 13:48
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).
18 November 2013, 7:41
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: