Title: Switch Themes
Last modified: March 20, 2018

---

# Switch Themes

 *  Resolved [petrusmaximus](https://wordpress.org/support/users/petrusmaximus/)
 * (@petrusmaximus)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/switch-themes/)
 * Hello,
    is there a possibility to switch the theme that is beeing used to create
   the PDF? For example as a parameter when calling mpdf_pdfbutton()? For example:
   <?php if(function_exists(‘mpdf_pdfbutton’)) mpdf_pdfbutton(false, ‘my link’, ‘
   my login text’, ‘MYTHEME’); ?>

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

 *  Plugin Author [fkrauthan](https://wordpress.org/support/users/fkrauthan/)
 * (@fkrauthan)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/switch-themes/#post-10097323)
 * Hey,
 * Yeah this feature is not available. And I currently have no resources to work
   on the plugin. But feel free to head over to [https://github.com/fkrauthan/wp-mpdf](https://github.com/fkrauthan/wp-mpdf)
   and submit a pull request. I am more then happy to merge it and release a new
   version.
 * Thanks,
    Florian
 *  [edgar33](https://wordpress.org/support/users/edgar33/)
 * (@edgar33)
 * [8 years ago](https://wordpress.org/support/topic/switch-themes/#post-10291598)
 * Hello [@petrusmaximus](https://wordpress.org/support/users/petrusmaximus/), [@fkrauthan](https://wordpress.org/support/users/fkrauthan/),
 * I am looking to be able to change the specific theme that is used to create PDF?
   
   Did you find a solution ?
 * Thank you !!
    Cedric
 *  Thread Starter [petrusmaximus](https://wordpress.org/support/users/petrusmaximus/)
 * (@petrusmaximus)
 * [8 years ago](https://wordpress.org/support/topic/switch-themes/#post-10291738)
 * [@edgar33](https://wordpress.org/support/users/edgar33/)
    Yes I did, I check 
   URL parameter and change the theme accordingly. In the file wp-mpdf/wp-mpdf.php
   I changed the following starting in line #457
 *  $templatePath = dirname( __FILE__ ) . ‘/themes/’;
    $templateFile = $templatePath.‘
   default_de.php’; if ( isset( $_GET[‘lang’] ) && $_GET[‘lang’] == ‘en’ ) { $templateFile
   = $templatePath . ‘default_en.php’; }
 * In this case the default_de template is used by default, if I find lang=en in
   URL I change the template to default_en.
 * Hope it helps you.
 * Peter.
 *  [edgar33](https://wordpress.org/support/users/edgar33/)
 * (@edgar33)
 * [8 years ago](https://wordpress.org/support/topic/switch-themes/#post-10349835)
 * Thank you very much for your answer, this one helped me a lot.
    I also used the
   same technique as yours. We lose the caching file, this is unfortunate.
 * Thanks again
    Cedric

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

The topic ‘Switch Themes’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-mpdf.svg)
 * [wp-mpdf](https://wordpress.org/plugins/wp-mpdf/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mpdf/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mpdf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mpdf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mpdf/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [edgar33](https://wordpress.org/support/users/edgar33/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/switch-themes/#post-10349835)
 * Status: resolved