• Resolved ithks

    (@ithks)


    Dear ZealousWeb, I’d like to start of by thanking you for a great plugin, it has been working flawlessly for me for some time now.

    But there is however something I’d like help with, because at the moment I have the current PDF File Name Prefix “TRKH_[date]_[your-subject]” which works without any problem, but it’s the random generated numbers put at the end of each file that I’d like to get rid off.

    Heres an example of a PDF name that has been generated “TRKH27 November 2023Tester det vi det1701120945051_823780741.pdf”

    For my wordpress instance, the chances of someone sending in a form with the same subject on the same day are lower then me winning three lottery jackpots in a row

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ithks

    (@ithks)

    The best feeling is when you can answer your own question!

    In the file “class.cf7-pdf-generation.front.action.php” on line 317 there is the following

    $pdf_file_name=$cf7_pdf_filename_prefix.''.$current_time.'.pdf';

    And my simply removing ‘-‘.$current_time. the random numbers were gone from the PDF file names.

    If this isn’t the best way to solve it, or you have any other feedback I’d be more then happy to hear it!

    Plugin Author ZealousWeb

    (@zealopensource)

    Hello @ithks,

    Thank you for getting in touch. Kindly review the screenshot provided through the following link:
    SS: https://prnt.sc/mVgzmCiyq4Z0

    We kindly request you to implement the necessary changes in the code at line number 317. The target file is located at “plugins/generate-pdf-using-contact-form-7/inc/front/class.cf7-pdf-generation.front.action.php.”

    The suggested modification is as follows:

    $trkhvar = 'TRKH';
    							$formattedDate = date('d-F-Y');
    							$pdf_file_name = $trkhvar.'-'.$formattedDate.'.pdf';


    Output : TRKH-28-November-2023

    Should you have any questions or require further assistance, please don’t hesitate to ask. We appreciate your prompt attention to this matter.

    Thank you,
    ZealousWeb

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove random number from pdf name’ is closed to new replies.