• Resolved TopCasinoWagering

    (@topcasinowagering)


    Hi,

    Thank you for this great plugin.
    I have only a problem.
    I use wordpress access control plugin and when I protect one page this plugin dosen’t work. Already have try others access control plugins and WordPress PDF Templates doesen’t work.
    I think the problem is the plugin render pdf file on other url.
    url.com/article/pdf instead of url.com/article.

    Already try chang this $dompdf->stream(“result.pdf”, array(“Attachment” => 0)); to $dompdf->stream(“result.pdf”, array(“Attachment” => 1)); but without luck. WordPress Access Control dont let WordPress PDF Templates render the pdf file.

    Could you help me on this?
    Thank you again for this great plugin.

    https://wordpress.org/plugins/wp-pdf-templates/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi! Thanks for checking out our plugin!

    It looks like the access control plugin is restricting access to the /my-post/pdf endpoint because it doesn’t realise /pdf is just an additional parameter, not a separate post from /my-post.

    Have you tried using GET parameters instead of rewritten endpoints? i.e. /my-post?pdf or /my-post/?pdf. Perhaps this way the access control plugin doesn’t think this is a separate post and grants access to the PDF version of the post.

    All the best,
    Antti

    Hi! Thanks for checking out our plugin!

    It looks like the access control plugin is restricting access to the /my-post/pdf endpoint because it doesn’t realise /pdf is just an additional parameter, not a separate post from /my-post.

    Have you tried using GET parameters instead of rewritten endpoints? i.e. /my-post?pdf or /my-post/?pdf. Perhaps this way the access control plugin doesn’t think this is a separate post and grants access to the PDF version of the post.

    All the best,
    Antti

    Thread Starter TopCasinoWagering

    (@topcasinowagering)

    Hi,

    I have a test site under
    http://www.rui-nunes.com/educacao-especial-todos-os-alunos/

    Login is: demo
    Username: demo

    Already try using GET instead of /%postname%/ and the result is the same.
    Already try usin another access plugin “Pages by User Role” and same thing.

    Thank you for your help

    My guess is PDF rendering fails because WP PDF Templates can’t access the /pdf-template endpoint to render it. The same sort of thing can occur if the page being rendered requires some sort of session authentification.

    Can you make an exception to the access control plugin or perhaps somehow give the plugin credentials pragmatically? Maybe modify the plugin to send cookies along with the file_get_contents() request?

    Let me know if I can help any further.

    Cheers!
    Antti

    Plugin Author Viljami Kuosmanen

    (@zuige)

    [marked topic as resolved]

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Protected content’ is closed to new replies.