• Resolved McKSuse

    (@mcksuse)


    I need to display the footer but I don’t see how. I am using the WP Post to PDF Enhanced to display products. It displays the image, header and logo fine, but I don’t see anyway to add footer info. (On all of my pages, posts and Product pages, I have the company name, address, etc.. on footer). I tried adding it to the header but it was too crowded. I know I can just type in the footer information ON the product page but we have hundreds of products. Anyway to add a shortcode or check something to display the already set up footer widget?

    https://www.ads-software.com/plugins/wp-post-to-pdf-enhanced/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Lewis Rosenthal

    (@lewisr)

    Hmmm… While we do have the option to process shortcodes and to render content from other plugins in the pdf, there is no specific mechanism to pull content from widgets.

    I can see this as something related to the request for custom fields, or at least allowing for the inclusion of information we currently support in the header to be placed down below, in the footer area instead. I’ll have a look at this.

    Sorry for not having an immediate fix, but stand by. Let me see what might be possible without going crazy.

    Cheers

    Lewis

    Thread Starter McKSuse

    (@mcksuse)

    Thanks for checking it out! (And yes, don’t go crazy). ??

    Plugin Author Lewis Rosenthal

    (@lewisr)

    Well, this can be done in similar fashion to the manner in which we handle the header. However, it does bring up some interesting questions:

    1. In contrast to the top of the page, typically, footers have only one or two lines of type.
    2. We might want to consider a horizontal arrangement for the footer
    3. Page numbering right now is automatic, using the default settings for the TCPDF class. We may want the option to change the numbering format and/or position, or to not print page numbers at all.

    How do you normally display the company name and address in the footer? Name on top and address on line beneath, all on one line, or more than two lines? Left aligned, centered, or right aligned? How does the footer impact the page number in multi-page documents?

    Your feedback here is appreciated, both in terms of how you see the finished product and in terms of suggestions for the admin options, either adding to what we already have or changing some of the options (i.e., creating a table of fields with drop boxes to determine header/footer/both, and then check boxes to enable each – just a random thought, here).

    Thanks!

    Lewis

    Thread Starter McKSuse

    (@mcksuse)

    Wow, you’re quick to respond!

    Let’s see, I bet everyone is going to give you different answers regarding the footer. I think at least a couple lines would be great. Here is what I currently am needing (not that you would do exactly what I need, just an example):

    I’m building a website for a company that custom builds furniture. They often have designers look at their site to pick out material or an actual piece of furniture (table, chair, sofa, etc..). They expect to be able to view a TEAR SHEET for any piece of furniture. That is where your code comes in. I have an ecommerce app set up with products. The designer/user clicks on a product, then converts it to PDF so they can view it, print it, email it. The furniture company wants this PDF to show the image, but also have address, URL and the company logo, almost like this is a mini-business card. I don’t see a way to attach a sample here, but here are links of other companies (you can click on their TEAR SHEET or PRINT PRODUCT DETAILS to see what it looks like).

    Another company: https://bungalowclassic.com/product/7834?category_id=2

    The website I’m working on:
    https://tecno.myparisbistro.com/store/furniture/rose-chair/

    They are requesting 3 lines of verbiage at the bottom:
    left aligned: 2 lines of address and 1 line for phone
    right aligned: 2 lines for 2 web addresses.

    They would also like the logo to take more space at the top but I’m assuming I can adjust that sizing on my own?

    Thanks,
    Susan

    Thread Starter McKSuse

    (@mcksuse)

    And if its just like formatting CSS code I don’t mind making changes. (Yes, I’ll make backups!)

    Plugin Author Lewis Rosenthal

    (@lewisr)

    Hey, Susan!

    First, you’re very welcome!

    Looking at the example site (which you realize is serving a static pdf, and not attempting to do what we do here, on the fly), I can see more clearly what you’re trying to achieve. Your second post hit me square in the head, as it set me on track thinking about a couple of other admin fields which call external files or store actual code in the database. This, I think, probably makes the most sense in terms of how to go about making this footer area flexible.

    Thus, we could do something as simple as:

    Use Custom Footer? [ ]
    
                       +---------------------------------------+
    Custom footer file |                                       |
                       +---------------------------------------+

    Then, you would just enter the name of the custom footer file, which would consist of something like:

    <?php
        html_entity_decode(get_bloginfo('name'), ENT_COMPAT | ENT_HTML401 | ENT_QUOTES), html_entity_decode(get_bloginfo('description') . "\n" . get_the_title(), ENT_COMPAT | ENT_HTML401 | ENT_QUOTES);
    ?>

    or any text you’d like, including CSS (or references to the custom CSS now available in the trunk version), and any static HTML you might like to include.

    Alternatively, we could go another step further:

    Use Custom Footer? [ ]
    
                       +---------------------------------------+
    Custom footer      |                                       |
                       |  editing box                          |
                       |                                       |
                       |                                       |
                       +---------------------------------------+

    the contents of which would be stored in the database instead of in an external file.

    Let me try a quick hack on this over the weekend to see if either of these might do the trick. My earlier inclination was to allow selecting various fields to fill in the footer area, but I can easily see how that would fall short in terms of flexibility.

    Oh, and as for logo size: The header area should expand to allow for a larger logo. There is code to add some padding around the sides of the logo so that it does not become crowded. This is currently hardcoded, but if you find the need to increase it, I could surely add this padding factor to the admin panel to make it easier to adjust.

    Cheers, and thanks again for the great idea to make this plugin more useful!

    Lewis

    Thread Starter McKSuse

    (@mcksuse)

    Lewis,

    I tend to like storing input in the database itself but CSS changes are also really easy so whatever you think would work best. Regarding the logo, I know how to add padding but I don’t know who your main target market is for this plugin so having it managed in the admin panel could be good. (I often find that plugins that have admin panels are pretty limited for changes I need….I prefer to edit the CSS, but that’s just me.)

    Thanks!!
    Susan

    Plugin Author Lewis Rosenthal

    (@lewisr)

    I understand just what you mean in terms of admin panels being limited; think how boring creative writing would be if all we had were menus of words… ??

    Insofar as the padding issue goes, the problem with editing in this case is that you would have to hack the core (of the pkugin) which – as you know – makes updates cumbersome. In this case, like the image scaling ratio (I need to clean up that language, as it is currently misleading), a textbox in the admin panel with a default of 14 (the current hardcoded value) would make it easy for anyone to adjust.

    Cheers. Stand by for some motion on this over the weekend. I’ve been wrestling with the image alignment thing tonight, and I’m about cross-eyed…!

    Lewis

    Plugin Author Lewis Rosenthal

    (@lewisr)

    I almost have this worked out. It poses an interesting PHP coding conundrum for me, and like a crossword puzle which one just can’t put down, I’ll get back to it tonight, Susan.

    More news to follow!

    Cheers

    Lewis

    Thread Starter McKSuse

    (@mcksuse)

    Sounds great! I wish I could help you. Let me know if I can test something…

    Susan

    Thread Starter McKSuse

    (@mcksuse)

    Also, I don’t know if there is a way to send you an attachment but my client has sent me a PDF of the layout they desire. I realize you are not customizing your plugin for just my needs, but thought it might be helpful to see.

    Susan

    Plugin Author Lewis Rosenthal

    (@lewisr)

    ??

    Let me get something functional, and then we’ll see about making it more flexible. My initial design goal is the alternative layout I mentioned above, with a simple text box for entering code & text to store in the db. The speed bump I hit had to do with declaring global variables in order to extend the footer class for TCPDF. I did an admirable job of removing the footer entirely, but getting my code read from the database was a whole other story. ?? A little more pondering (and staring blankly at the screen), and the realization dawned on me as to what I’d overlooked. So, now that I know what I need to fix in order to make it work, it shouldn’t be a big production to actually get it happening.

    In my static tests, I didn’t try anything fancy in terms of adding html and styling, though in theory, this should all just work. It will mean that you’ll need to either do your editing in a WYSIWYG editor and paste the results, or be fairly comfortable coding HTML (which shouldn’t be a big deal for you, but may ultimately cause me to provide a more novice-friendly interface).

    Anyway, Susan, no rush on the pdf, but if you’d like to contact me directly, use the contact form on my blog, and I’ll email a reply. From there, we’ll be pen pals!

    Cheers (and oh, I’ll let you know know when I need some testing, believe me!)

    Lewis

    Thread Starter McKSuse

    (@mcksuse)

    Hi Lewis,

    FYI, and it might just be me, but I can’t hit your site (2rosenthalsDOTnet)

    Susan

    Plugin Author Lewis Rosenthal

    (@lewisr)

    Not just you, Susan. I’ve been dealing with some server issues lately, and this time when the server went down and came back up, it had an excruciatingly long disk check to complete (ugh, I hate when that happens).

    Anyway, back up and running, now.

    Cheers

    Lewis

    Plugin Author Lewis Rosenthal

    (@lewisr)

    Just to keep everyone in the loop here, Susan, now that I’ve pushed 1.0.1, I’ll be getting back to this. As you know, I’m fairly close to having something for testing, so I’ll notify you via PM when we’re ready to knock it around a bit.

    Cheers

    Lewis

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Display Footer on PDF?’ is closed to new replies.