Avatar of theresel
theresel
Flag for Canada asked on

ContuttoPDF for Wordpress

Hi,

I am using the plugin ContuttoPDF to convert my Wordpress pages to PDF for easy printing.    Everything is working as it should except that the page is always printed in the default language which is French even if we view the page in English.  How can I have it print the correct page language?  Unfortunately, the author says that it is not compatible with qtranslate which I also use to translate my pages and is not willing to change his code for now.  I am attaching the three php files used by the script if it can be of any help.  The page can be viewed at www.carnavalhearstcarnival.com and the link to the PDF is in the upper right corner.
contuttopdf.php
themes-pdf.php
pdf.php
Web ComponentsBlogs

Avatar of undefined
Last Comment
tseward

8/22/2022 - Mon
tseward

Hi,

Download, install and use cutepdf (free) for creating PDF files with any application. This will also solve your language problem your having.

Good luck,

Taylor
theresel

ASKER
That's not what I want, I already have a PDF printer on my computer.  I want to be able to create PDF pages of my site "on the fly" so visitors without a PDF printer can easily create a pdf and print it.  And I don't want to create my pages as PDF and recreate them every time I make changes to my pages.
tseward

Ah.

Ok, on the english page, the PDF link needs to be changed from http://carnavalhearstcarnival.com/?output=pdf 

to

http://carnavalhearstcarnival.com/?lang=en&output=pdf

enjoy,

taylor
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
theresel

ASKER
Okay, if I hardcode the link that would be an ideal solution, but my translations are done dynamically, I don't have an english page as such.  So the language attribute have to be inserted into the Contutto script and I don't know how to do it.
ASKER CERTIFIED SOLUTION
tseward

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.