TCPDF generates a single PDF for minutes. This is all because font subsetting (embedded font contains only these characters that are actually used) is enabled by default. When the following line is added to _print_pdf_tcpdf(), PDF is generated "instantly":

$pdf->setFontSubsetting(FALSE);

Please include checkbox in admin/config/print/pdf for disabling font subsetting. Generated PDFs will be larger but it's an enormous difference between 1s and 1min!

CommentFileSizeAuthor
#1 modules_print_print_pdf.patch2.01 KBpillarsdotnet
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pillarsdotnet’s picture

Status: Active » Needs review
FileSize
2.01 KB

Patch needs testing.

jcnventura’s picture

Status: Needs review » Fixed

Thanks for the patch! I've committed it to git.

ogi’s picture

Status: Fixed » Needs work

A syntax error slipped in. > is missing.

+  $pdf-setFontSubsetting(variable_get('print_pdf_tcpdf_subsetting',FALSE));
jcnventura’s picture

Status: Needs work » Fixed

Thanks for the warning.. I have been trying to clear the queue, and I haven't really started re-testing the whole module.

ogi’s picture

Status: Fixed » Needs work

An error is introduced again

-  $pdf->setFontSubsetting(variable_get('print_pdf_tcpdf_subsetting',FALSE));
+  $pdf->setFontSubsetting(variable_get('print_pdf_font_subsetting',FALSE));
jcnventura’s picture

Status: Needs work » Fixed

I had spotted that earlier.. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.