Printing

Printing

by Angela Williams -
Number of replies: 14

I am wondering if anyone can help solve this for me.  I have the certficate working on a Moodle 2.2 server.  You can view or save the certificate but, you can not print.  I want people to be able to print their own certificate.  

Anyone know is it an error in the install of the module or is their something I am missing here.  See greyed out printer.

greyed out printer icon

Average of ratings: -
In reply to Angela Williams

Re: Printing

by Jim Cook -

The security settings are not the issue.  This may sound like a stupid question...Do you have a printer connected to the computer you are viewing the certificate with?  Not having the printer visable seems to me like there is no printer connected.

Jim

In reply to Jim Cook

Re: Printing

by Angela Williams -

Yes, I do have a printer connected and I have confirmed that it works with other pdf files.

In reply to Angela Williams

Re: Printing

by John Romain -

Hi Angela,

Was having the same problem. Running Moodle 2.2. If you look in the certificate type folder you will find under each type of certificate a certificate.php file. In that file you will find a $pdf->SetProtection(array('print')); function which should set the protection for the pdf file to print only. That is cauasing the problem comment out this line for each type you are looking to print and it will work. this completely removes protection for the file. But considering there are a number of ways around PDF security it should not be a concern. Number your certificates.

John

Attachment PrintCap.jpg
In reply to John Romain

Re: Printing

by Angela Williams -

Thanks for this solution.  I don't have access to this area but I have forwarded this solution on to the server admin.  I am hoping they will make this change so it is printable. 

Thanks again.

In reply to Angela Williams

Re: Printing

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi guys,

I have created a tracker issue for this - http://tracker.moodle.org/browse/CONTRIB-3330

Do you think the setProtection is necessary at all, should there be a setting in the certificate that enables/disables this or just remove the code?

Average of ratings: Useful (2)
In reply to Mark Nelson

Re: Printing

by joe jacelone -

Hey Mark,

Yes please make this an editable setting.  This issue has caused a few headaches for clients of ours and it would be great to have an option to enable or disable this feature.  Although I cannot think of a reason to have the feature since the person is only receiving the certificate after they completed all the work in the course.  At this point a fully accessible printable version should be available to the student I would assume.

In reply to joe jacelone

Re: Printing

by Jean-Michel Védrine -

I think what would be really interesting would be to make the certificate pdf not editable but printable !

In reply to Mark Nelson

Re: Printing

by Ludovico Sassarini -

Not necessary at all, maybe an option to enable/disable it would be useful. Also because you have to complete the course to get the certificate. It would be also interesting to set the pdf not editable by the end-user.

In reply to Ludovico Sassarini

Re: Printing

by Rich Solomon -

Hi all,

I actually tried the "fix" but received an error in the popup window after commenting out the line.

I'm actually stuck here and need to have a way for online candidates to be able to print their certificates.  Any other ideas?

the actual error tht I had received was:

"TCPDF ERROR: Some data has already been output, can't send PDF file"

All I was was comment out the Security line as noted above.

Help?  I'm new to Moodle, and am getting my way around.

In reply to Rich Solomon

Re: Printing

by Rich Solomon -

I've tried the fix again (commenting out the line), but still get the error when attempting to generate and display the certificate. I've commented out the line on all of the certificate.php files that I have.

Bump?  wink

In reply to Rich Solomon

Re: Printing

by Mike Holzer -

Instead of commenting out that line, replace 'print' with 'modify'. That way the pdf will still be protected, but it will not be modifyable.

In reply to Mike Holzer

Re: Printing

by Emma Perks -

Hi, sorry the above solution is resulting in a grey screen and no certificate.

Thanks.

In reply to Mike Holzer

Re: Printing

by Ralph Blakeslee -

This "work around" worked.  My students can now print their certificates.

Ralph

In reply to Ralph Blakeslee

Re: Printing

by K A -

Hi there, so what do we do with certificates that are already issued and showing they are protected from printing? How can they be re-issued without having the student retake the quiz?