Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter newbee2begreat

    (@newbee2begreat)

    By the way I am using the fault template.

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    Hi,

    This is a bit tricky to accomplish.

    There are two options:

    1. Add a HTML field to your Gravity Form and position it in the form so it is displayed on the 5th page of the PDF. To get HTML fields to show up in the default template you need to set the default-show-html option to true in your configuration.php file. Any HTML fields you don’t want shown can be excluded by adding the class name exclude to those fields in the Gravity Forms editor.

    You’d then have to add a class to the aforementioned HTML field which has a display: none CSS property assign to it (so the HTML field isn’t displayed to the user while filling out the form.

    2. The more complex solution is to use mPDF’s Named @page selectors to set a custom header on page 5. The process requires you have an understanding of how the @page selector can set and display headers.

    Thread Starter newbee2begreat

    (@newbee2begreat)

    I went with the 1st option you suggested.
    1 -> I Added the HTML field where I wanted it to be
    2 -> Uncommitted the “default-show-html” within the config file.
    Question Here is:
    3 -> I know how to add the class to a file but which file to a make the changes to so that I can specify the class name on via Gravity form HTML text CSS reference?
    4 -> Do I just do the following within the html text field: <img src= “location”> ?

    Thread Starter newbee2begreat

    (@newbee2begreat)

    I did some more digging and I was able to get the image to appear on the form of the “template=default-template.php&data=1” but unable to get it to show on the PDF. I wanted to know if I am doing something wrong?

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    Some web hosts have trouble displaying an image in the PDF via a URL. You can try use an absolute path to your image in your <img src="" /> tag. That should get it to display correctly in the PDF.

    Thread Starter newbee2begreat

    (@newbee2begreat)

    No luck. I was able to use the absolute path and nothing appeared where it should.It works when on the gravity forms itself and within default-template.php&data=1. However, I am still unable to view within the PDF.

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    If I was in your position I would try modify the PHP PDF template file directly and play around with URL, absolute and relative paths to your image until you get it working. Then copy that to your HTML and retest.

    Thread Starter newbee2begreat

    (@newbee2begreat)

    Wonderful I got it working. I found that the HTML Field is not appearing within the PDF. Is this a bug or something?

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    There should be no bug, provided you updated the configuration.php file correctly and enabled the default-show-html on the correct form ID.

    Thread Starter newbee2begreat

    (@newbee2begreat)

    This was what did:

    $gf_pdf_config[] = array(
    ‘form_id’ => 5,
    ‘template’ => ‘default-template.php’,
    ‘default-show-page-names’ => true,
    );
    Uncommented.

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    That configuration node has default-show-page-names set to true not default-show-html. Once you swap that over the HTML should show up in your PDF.

    Thread Starter newbee2begreat

    (@newbee2begreat)

    Still No luck even after debugging. I did the following.

    1. Modified the Config file.
    $gf_pdf_config[] = array(
    ‘form_id’ => 5,
    ‘template’ => ‘default-template.php’,
    ‘default-show-html’ => true,
    );
    Still unable to view the HTML image.
    After reading the documentation again just no luck.
    Have any ideas as to why this is not working or am I forgetting something to do?

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    Are any other HTML fields you have in the form showing up? If you don’t have any other HTML fields in your form try add them and view the PDF again. If those text-based HTML fields aren’t showing there is still a problem with your configuration. I would check that you don’t have two active nodes for form #5: eg 2 x $gf_pdf_config[] = array('form_id' => 5,

    Thread Starter newbee2begreat

    (@newbee2begreat)

    I only have one HTML field with in my form that is still not showing up on the generic PDF (default-template.php) even after rebuilding my test site. There is only one active node set to the page ID for the form that I need to generate.

    The gravity form HTML has the following code inserted with in the content box:
    <img src=”https://MyTestsite.com/wp-images/HeaderLogo.jpg&#8221; />

    Here are my warnings that appear while debugging:

    Warning
    : Missing argument 3 for GFPDFEntryDetail::do_lead_detail_grid(), called in
    …/wp-content/uploads/PDF_EXTENDED_TEMPLATES/default-template.php on
    line 79 and defined in
    …/wp-content/plugins/gravity-forms–
    df-extended/helper/pdf-entry-detail.php
    on line 53
    Notice
    …wp-content/plugins/gravity-forms-pdf-extended/helper/pdf-entry-detail.php
    on line 68
    Warning
    : array_merge(): Argument #2 is not an array in
    …/wp-content/plugins/gravity-forms-pdf-extended/helper/pdf-entry-detail.php
    on line 68

    Have any ideas with the information that I have provided for you?

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    Can you try delete the PDF_EXTENDED_TEMPLATES directory and use the reinitialise button from the Forms -> Settings -> PDF page and see if that helps? You have be using an older PDF template for some reason.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Image Placement’ is closed to new replies.