Samigo doesn't translate formulas in Latex when downloading assessments in pdf

Description

Samigo doesn't translate formulas in Latex when downloading assessments in pdf. Steps:

 

  1.  Enable Mathjax in Samigo.

  2. Create a question (in assessment) which has a Latex math expression and save it:

  3. Mathjax renders the math expression:

  4. Select the 'Print' option in the assessment:

  5. Click the "Download PDF" button.

  6. The pdf document does not render the math expression:

Attachments

5
  • 11 Dec 2018, 06:49 AM
  • 30 May 2018, 05:27 AM
  • 30 May 2018, 05:27 AM
  • 30 May 2018, 05:27 AM
  • 30 May 2018, 05:27 AM

Activity

Show:

Earle Nietzel February 12, 2021 at 2:20 PM

I believe that cleaning up the html print and making it look good which would then allow people to save the page as PDF which would then also look decent is the optimal way forward. Browsers are generally much better at printing html/saving pdf now without the need for a custom pdf generator.

Raúl Sánchez Vegas December 11, 2018 at 6:52 AM

Mathew Jones said in the dev list:

It sounds like Tiffany is proposing a removal of the entire "Download PDF" feature. Really it can be explained in one line of text how someone can "Print to PDF" any HTML page from any modern browser . That really means PDF generation is just additional code and maintenance that should be removed. Also the library Samigo uses (itext 4.0) is ancient, and forked to be proprietary. It would possibly need to be rewritten to still be usable anyway. As we upgrade JSF these custom components shouldn't be ported forward unless someone steps up to rewrite the components in PDFBox or update to OpenPDF.

I think we're basically saying there's we'd recommend this feature will be removed entirely from a future release since a better workaround exists including accessibility and LaTeX.

I believe the "Download PDF" feature should not be removed. The "Print to PDF" option from modern browsers is not good enough because it shows not desired information as you can see in this exam: 

 .

I agree with Mathew on updating the PDF generation from (itext 4.0) to PDFBox or OpenPDF. I've filled a new ticket to address this update: SAK-41065. Regards,

Raúl

Matthew Jones June 11, 2018 at 1:11 PM

Matthew Jones May 31, 2018 at 9:56 PM

Possibly there used to be before iframes were removed, now as you say it's becoming less and less useful. It probably would be worth removing entirely and improving the print style sheet if that needs it. I'd probably have to look at a side-by-side comparison of the outputs to see what is different about it in it's current state, I know there's a lot of old lightly maintained code that could be cleaned up for sure.

Tiffany Stull May 31, 2018 at 9:41 PM

Is there a compelling reason to have a Download PDF option in Samigo at all?  If not, I vote to remove the option and change the Print HTML button's label to Print.

There have been a couple past issues (now fixed) with the print PDF functionality missing some content that was otherwise present in the HTML print view (e.g. SAK-36355 and SAK-35135). Most modern browsers have a save as PDF option when printing (or if saving as PDF isn't a default option, you can usually find a plugin that lets you save PDFs), so I'd think in most cases the HTML print view would suffice.

Details

Priority

Affects versions

Assignee

Reporter

Created May 30, 2018 at 5:51 AM
Updated February 12, 2021 at 2:20 PM

Flag notifications