How to create a custom PDF of a record view data

Hello everyone,

I want to generate a custom PDF in record view. And want to add button for pdf in Edit button dropdown as par below image. 

Want to show record view data in PDF as table format.

Parents Reply
  • Hello ,

    One more question for that how to apply pdf manager according conditionally.

    1. I want show download button only if Category = Vet Check and Category = Test.

    2. I want to print different pdf if Category = Vet Check and Category = Test.

    Please let me know how to manage.

    Thanks,

    Laxmichand saini

    laxmichand

Children
  • Ho, sorry

    I've been off the community for a couple of days.

    I have conditional PDFs that are composed using multiple templates depending on various conditions on the record and related records... I can share more but it will take a bit to write it all up in a non-specific and comprehensible manner...

    Having said that, if the header/footer are the same, you could have a simple If statement in your pdf.
    You build One document, call it "Communication PDF", and include it in the Edit menu, and then you "build" the document based on your record's values.

    For example the body of your PDF could be something like:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    {if ($fields.category == 'VetCheck')}
    this is the text that will print in the PDF
    {else}
    this is the text for all other categories
    {/if}
    This is whatever the two have in common...
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    For dropdowns, be sure to use the database values in your smarty, not the labels.

    I hope this works out for you, and again, my apologies on the delayed response.


    Francesca