Use my Own Font for the PDF
-
Hello that ist a very nice Plugin
and i try to use my own font, question is this possible?thank for help
greetings
Leonid
-
Hi Leonid_Design,
this is not possible at the moment, maybe in future versions of the plugin.
In the meanwhile the only possible way is doing it manually. I didn’t test it yet:https://mpdf1.com/manual/index.php?tid=501
Best.
Thanks very much it function!
Next problem: in frontend of wordpress the title will not show but in the pdf, what can i do to not display it in the pdf?thanks for help
greetings
leonidHi Leonid_Design,
Good to know that adding fonts worked ??
Did you have any problems doing it? I’ve planned to look at this soon, so if you encountered any problem and you solved it, please comment them here, this will be gold for me, thanks.About title being printed in the PDF is strange because the default template only gets the content but not the title.
I’m going to need more info on how you are entering the content.are you adding the title in the content inside a <h1> or something like that?
If this is the case, you can hide pieces of content using this shortcode:
https://wp.dinamiko.com/demos/dkpdf/doc/dkpdf-remove-shortcode/Best.
Hello Dinamiko,
yes i have some problems: it will not show the bold style with the font Myriad Pro
then i made this in the dk-pdf/includes/mpdf60/config.php on line 433:'STRONG' => array( 'FONT-WEIGHT' => 'normal', 'FONT-FAMILY' => 'myriadprobold', ),
and use this code by config_fonts.php:
"myriadpro" => array( 'R' => "MyriadProLight.ttf", 'B' => "MyriadPro-SemiboldIt.ttf", 'I' => "MyriadPro-LightIt.ttf", 'BI' => "MyriadPro-SemiboldIt.ttf", ), "myriadprobold" => array( 'R' => "MyriadPro-SemiboldIt.ttf", 'B' => "MyriadPro-SemiboldIt.ttf", 'I' => "MyriadPro-SemiboldIt.ttf", 'BI' => "MyriadPro-SemiboldIt.ttf", ),
and ad the font here:
// Add fonts to this array if they contain characters in the SIP or SMP Unicode planes // but you do not require them. This allows a more efficient form of subsetting to be used. $this->BMPonly = array( "dejavusanscondensed", "myriadpro", "myriadprobold", "dejavusans", "helvetica_neueregular", "dejavuserifcondensed", "dejavuserif", "dejavusansmono", );
Hope that helps you…
my problem is not show the title, now i have delite the line in all templates that give but it shows, i have my own made theme, very small and now dont know what i can do more..
greetings
LeonidYES i found it!!!
here ist the title tag included:
dkpdfg-index.php on line 65
<h1><?php the_title();?></h1>Greetings
LeonidHi Leonid,
Great! this kind of information is what I need, thank you very much.
About titles, sorry but I don’t understand the problem until I’ve more info…
Maybe you can override DK PDF templates in your theme, more info here:
https://wp.dinamiko.com/demos/dkpdf/doc/how-to-use-dk-pdf-templates-in-your-theme/This is a key feature of DK PDF, because allows printing whatever data you want in the PDF, you can get custom fields… and show them in the PDF for example.
Another thing that you can try is hidding content using dkpdf-remove shortcode directly in your theme templates, I didn’t tried but something like this maybe can work:
<?php echo do_shortcode( '[dkpdf-remove]'. get_the_title() .'[/dkpdf-remove]' );?>
Best.
Hi Leonid,
I can’t see the_title() in templates/dkpdf-index.php on line 65 (latest version 1.4).
In any case, the correct way for modifying templates is copying them in your theme, following the above documentation link. Once you’ve copied the template(s) in your theme, you can do whatever you want with those template(s).
Best.
is here: dk-pdf-generator/templates/dkpdfg-index.php
greetings
LeonidHi Leonid,
OK! I finally understood ?? you’re using DK PDF Generator Pro Addon.
First thing, thank you very much for using it!
And yes, this template uses the_title, I recommend you don’t modify plugin templates directly, the best way is copy plugin templates in your theme. the only thing to keep in mind is that the folder in your theme for DK PDF Generator templates has to be named dkpdfg instead of dkpdf.
You can follow this documentation but keeping in mind that the folder has to be named dkpdfg for DK PDF Generator templates:
https://wp.dinamiko.com/demos/dkpdf/doc/how-to-use-dk-pdf-templates-in-your-theme/
Best.
Hi Leonid,
I just created the doc for DK PDF Generator:
https://wp.dinamiko.com/demos/dkpdf-generator/doc/how-to-use-dk-pdf-generator-templates-in-your-theme/Best.
Hi, dinamiko.
Please give me a right adress to your function for manual adding fonts to PDF (https://mpdf1.com/manual/index.php?tid=501 – this path is wrong).
Thank for help
Greetings
Evgeniy AnnenkovHi evgeniyannenkov,
mPDF author deleted online documentation but allows downloading the manual in PDF: https://www.mpdf1.com/mpdf/index.php
download the PDF and see Fonts and Languages chapter.
Thanks.
- The topic ‘Use my Own Font for the PDF’ is closed to new replies.