jcmlmorav / advanced-pdf-generator

Wordpress Plugin to create PDF files from a specific file template. View, download or send by email with specific mail template.
GNU General Public License v2.0
6 stars 1 forks source link

Template file not found pdf.php #1

Open Serob opened 6 years ago

Serob commented 6 years ago

On generating it gives ther following error in pdf: Template file not found at theme_path…/advanced-pdf-generator/apg-templates/pdf.php

How to create pdf.php and mail.php files? What should they consist of? What's the format? Is there any example?

jcmlmorav commented 6 years ago

I think there is an error in the path printed in the PDF file. Create the apg-templates directory in your theme root and put the follow files to customize. wp-content/themes/you-theme-name/apg-templates/

Please let me know if it works.

Serob commented 6 years ago

I've changed it already to the theme path that you've suggested, but the rusult was the same(only diff is that there's another path in the error). My pdf.php file is empty, maybe this cause the problem? How should I fill it if I want my post to be converted to pdf?

P.S. there are questins from the other users regarding to the same error in wordpress site also.

jcmlmorav commented 6 years ago

Plugin is looking for the pdf.php file in the index path of the current theme: get_template_directory() . '/apg-templates/pdf.php' it should works.

Are you using some skeleton theme?

Serob commented 6 years ago

Yes, I found this part in the source code. And for the theme: I am using default "Twenty Seventeen" theme.

jcmlmorav commented 6 years ago

OK, let me check if there is a bug with current wp versions or themes

Thanks for your report. I'll post here if I find something.

Serob commented 6 years ago

I'm on Windows, if it can help.

Serob commented 6 years ago

I also noticed difference between slashes, so the full path is

...wamp64\www\testsite\wordpress/wp-content/themes/twentyseventeen/apg-templates/pdf.php

Can they cause problems? Although browser finds the file in this path format.

jcmlmorav commented 6 years ago

Maybe, I tested all in Linux and Mac OS, but not in windows. I'll check if that is the issue.

paveldevelop commented 5 years ago

problem in function is_file()

ZoraizQ commented 5 years ago

Do you have an example template file with images atleast? Do we use FPDF or something?