WordPress.org

Ready to get started?Download WordPress

Forums

PDF24 Articles To PDF
[resolved] Adding custom markup doesn't work. (4 posts)

  1. eleonis
    Member
    Posted 1 year ago #

    Hey!

    I'm using the pdf24Plugin_link() function to create a PDF of all articles.
    Now I want to add some adress data to the end of the PDF coming from
    the footer of my page by using

    pdf24Plugin_begin();
    ... html markup ...
    pdf24Plugin_end();

    But the footer part doesn't show up in the created PDF.

    Any help is appreciated - thanks!

    http://wordpress.org/extend/plugins/pdf24-posts-to-pdf/

  2. eleonis
    Member
    Posted 1 year ago #

    UPDATE:

    I figured out why it didn't worked:
    I forgot to add the pdf24Plugin_link() statement after begin() .. end().

    BUT: Is it possible to have only one pdf24Plugin_link() in the header part
    of your site and include all articles + custom code coming from the footer
    to create one PDF?

  3. pdf24
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    if you place the call to pdf24Plugin_link() in the footer then all articles of the current page will be used for the PDF file.

    Inserting the call to pdf24Plugin_link() in the header will not work correctly because the pdf24Plugin_begin(); and pdf24Plugin_end(); is not called at that time. That is the reason why the call to pdf24Plugin_link() must be in the footer or at least after the pdf24Plugin_end() was called.

    If the call to pdf24Plugin_link() is performed in the loop then only the current article is used for the PDF. If the call is performed outside the loop then all articles will be used for the PDF file.

    The new plugin version 3.6 is more powerfull and has a mode that breaks the restrictions that the call must be performed after pdf24Plugin_end();

    The call to pdf24Plugin_link() can be split into two call. You only need to call the method pdf24Plugin_form(get_the_ID()) just after pdf24Plugin_end(). This creates a hidden form identified by the ID returned by get_the_ID(). This hidden form can then be referenced from an other place, everywhere in your blog. The reference link can be created with the new method pdf24Plugin_formSubmit(get_the_ID()). This creates a link which sends the form identified by the ID returned by get_the_ID().

  4. pdf24
    Member
    Plugin Author

    Posted 1 year ago #

    If you want to add a PDF creation link in the header and and if you use the the content markers pdf24Plugin_begin() and pdf24Plugin_end() then you have to use the pdf24Plugin_form(ID) and pdf24Plugin_formSubmit(ID) to get it working. This two methods are made for this purpose. The pdf24Plugin_formSubmit(ID) call can be added into the header part. This only creates code which sends a form identified by the ID argument. In the footer part add the call to pdf24Plugin_form(ID) which creates the form containing all marked contents. The ID argument must match in both call and can be any identifier containing digits and letters a-z.

    This will work in your case.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic