No Preview option in PDF Templates

Bingo again… My module name is “pcbld_UsersPasswords” and it gets trimmed (no S) on line 36 of formLetterPdf.php

Now everything works. Moral of the story - don’t name your modules with an S at the end, or make a custom formLetterPdf.php

D.

any quick fix for this cutting of s, as I am trying to enable pdf templates for cases module!

Found one solution… placed this in formletterpdf

if($module_type == “Cases”){
$module = new aCase();
}
else {
$module = new $module_type();
}

Hi,

I have been wanting to implement this on a custom module, so i started to follow your instructions except i do not have the file /custom/modules//metadata/[color=#ff0000]detailviewdefs.php[/color] the only file i have in the directory is listviewdefs.php

I wanted to check before i started adding files into the directory. and if so i would assume i should be adding a complete detailviewdefs.php file with all the required code and not just the modifications. So my next question would be is there somewhere within the module i can take this file from and add the customized file to the proper directory? im new to SuiteCRM so i just like to cover my bases before i play too much.

Thanks

Hi I was successful in getting the print PDF to work on a custom module, except now i am attempting to make this work on the Cases module. I have attached all the edited files. I renamed Cases to Tickets, so i dont know if im missing something in the name, but as far as i can tell Cases should still be the appropriate name. The PDF template is all set and linked to the Tickets (Cases) setup in the dropdown as Cases [Tickets]. The weird part is, instead of a popup and asking to download it directs to a new blank page in Firefox in chrome and IE i get the error:

“Server 500 Error The website encountered an error while retrieving http://192.168.2.138/SuiteCrm/index.php?entryPoint=generatePdf. It may be down for maintenance or configured incorrectly.”

I checked permissions and ownerships and changed them all to the same as the preset permission and getting the same thing. So not sure why its not working for cases and in the other one. Any help is greatly appreciated!

I removed all the extra files i did not edit.

Hi All,

I also got the blank page issue.

Does anyone has a solution to this problem.

Please help me.

This addition step fixed it for me.

https://suitecrm.com/forum/developer-help/1379-no-preview-option-in-pdf-templates?start=30#21427

Dianna

Before I give the advice in this thread a shot to generate PDF templates from a customised Cases module, I thought I’d point out that the documentation is counter-intuitive here. As mentioned at https://suitecrm.com/wiki/index.php/Userguide#PDF_Templates: [i]"System Administrator users can extend this list by editing the ‘pdf_template_type_dom’ using the drop down editor functionality. Please note that the drop down ‘Item Name’ must be the name of the module directory." This works as expected, but if one can’t then actually generate PDF letters from the module added to the Type list without diving into forum posts and code, this statement is of limited practical use. Perhaps a link to this thread or something could be added to that wiki page.

Cheers,
Dave

Many thanks to Sid in post #5953, works great in SuiteCRM v7.6.6

Cheers,
Dave

I have a problem with custom field in PDF.

I have created field: product_measure_unit_c, and managed to get it into LineItems products and services.

But, on PDF I can select this field for LineItems:Products but not for LineItems:Services. Service list does not contain my field.

Does someone knows how to get field on PDF for services?

this link dont work, please help me . thanks

http://archive.h2ik.co/2012/03/sugarcrm-upgrade-safe-way-to-extend-views/ t

1 Like