Project

General

Profile

Feature #1909

export as PDF

Added by Furio Petrossi almost 9 years ago. Updated about 8 years ago.

Status:
Feature implemented
Priority:
High
Assignee:
Category:
-
Target version:
Start date:
26/08/2010
Due date:
% Done:

90%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

Only teachers can exporto (print) as PDF a document.
Is it possible to expand the feature to all users or decide if give the possibility or not?

Note:
ASCIIMathML or mimeTeX aren't correctly exported.


Files

2010-09-02_150712.png (10.8 KB) 2010-09-02_150712.png Teacher Furio Petrossi, 02/09/2010 15:14
2010-09-02_150817.png (4.76 KB) 2010-09-02_150817.png Student Furio Petrossi, 02/09/2010 15:14

Associated revisions

Revision 46f8ba1f (diff)
Added by Julio Montoya about 8 years ago

Showing pdf icon in html files for students see #1909

History

#1

Updated by Olivier CORRE almost 9 years ago

shall we just merge this with http://support.chamilo.org/issues/1880 ?

#2

Updated by Furio Petrossi almost 9 years ago

If you like, but it is different: here we don't need to add export options but change export rights.

#3

Updated by Olivier CORRE almost 9 years ago

there is already an "export to PDF" feature???

#4

Updated by Furio Petrossi almost 9 years ago

Yes: as we can see in updated code (HG (02/09/2010 - 14:01)) it is possible to do it for a teacher, but not for a student (see attached images).

#5

Updated by Julio Montoya over 8 years ago

  • Priority changed from Low to Normal
  • Complexity changed from Easy to Normal

It doesn't work when trying to export to pdf when using templates (left zone when creating a new document) ...

#6

Updated by Julio Montoya over 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Julio Montoya
  • % Done changed from 0 to 30

I added some fixes for this feature ...

http://code.google.com/p/chamilo/source/detail?r=3f2aa9cec365f42ae8efe1f0c2d79d9642212e78&repo=classic

hey Juan Carlos I also added some fixes for the main/document/export_htmldoc2pdf.php file

now we use some classes of DocumentManager::export_to_pdf() and PDF::html_to_pdf()
The code is based in your contributions of the export_html_doc2pf ...

@furio can you attach here an html with the ASCIIMathML or mimeTeX code ?

#7

Updated by Juan Carlos Raña Trabado over 8 years ago

Ok, I'm glad to hear you. Now I very busy, I look this later, also in export wiki to pdf.

Excusa Furio I talk in Spanish: Por otro lado, para ayudar un poco. La exportación de fórmulas en ASCIIMathML o mimeTEX a PDF es complicada porque para que esto se produjera es necesario que se pudieran exportar imágenes al archivo pdf generado. Las imágenes de mimeTEX y ASCIIMathML se generan dinámicamente (si vemos el código de la página web que las soporta no hay ninguna llamada a ningún archivo con extensión gif o similar, sino la llamada a mimeTEX o ASCIIMathML); por tanto sería necesario esta indicación real (quizá una caché donde estuvieran las imágenes reales( podría estar en un buffer o en el mismo disco)) para que esto se pudiera conseguir (o al menos eso supongo, sólo es una idea)

#8

Updated by Julio Montoya over 8 years ago

Using the pdf.lib.php instead of the main/wiki/export_mpdf.php file. we should centralize all "html to pdf" code in this class

http://code.google.com/p/chamilo/source/detail?r=0943f84cc3409e7253f7eb76aad2dc0058ee9edb&repo=classic

#9

Updated by Yannick Warnier over 8 years ago

Allowing to download documents as PDF should be the default behaviour, as users can download the HTML documents anyway...

#10

Updated by Yannick Warnier over 8 years ago

  • Priority changed from Normal to High
  • % Done changed from 30 to 50

Apparently there is a setting in the database to allow students to download the documents as PDF, but for some reason the download icon doesn't appear to me when connected as a student (even when the option is selected).

This is probably due to the PDF icon being in the "actions" column instead of being next to the portfolio and open in new page icons (at the right side of the title column).

#11

Updated by Yannick Warnier over 8 years ago

The problem is still there (I had forgotten about it) The setting is in the Tools category in the portal settings.

#12

Updated by Julio Montoya about 8 years ago

  • Status changed from Assigned to Needs more info
  • Assignee deleted (Julio Montoya)
  • % Done changed from 50 to 90
#13

Updated by Yannick Warnier about 8 years ago

  • Status changed from Needs more info to Feature implemented
  • Assignee set to Julio Montoya

All good. Checked and approved, although the PDF generation is very resource hungry (we should think about some caching for that)

Also available in: Atom PDF