No polish characters in pdf

By: Kamil Haraburda | Asked: 05/03/2024
ForumsCategory: General questionsNo polish characters in pdf
Kamil Haraburda asked 8 months ago

Hi, I have problem with polish characeters in my pdf (example: https://bit.ly/3QtZfPK)

Every polish character, like ą, ę, ń or ł is showind as a "?". I tried to work with charset UTF-8, I changed it on ISO-8859-2 - but is still doesn't work. Could you help me with that? Greets

1 Answers
Victor Font answered 8 months ago
How are you changing the character set?
Kamil Haraburda replied 8 months ago

I downloaded all plugin files via ftp and changed UTF-8 everywhere to ISO-8895-2 in Notepad++. There were almost 500 of them, but it changed anything 😥

Victor Font replied 8 months ago

Oh no!! That is a huge mistake and as you've learned it has nothing to do with your problem. I hope you have a way of restoring your site and put all the plugins back to their correct state. Since WordPress 4.2 the the defaults established for DB Collation and character set has been utf8mb4 and utf8mb4_unicode_520_ci. This combination supports every known language.

The problem you're running into with the PDF has nothing to do with the database collation and character set. The default fonts for PDF generation do not support an extended characters. You need to change the PDF's font to support your language.

Here's a Formidable Knowledgebase article that points you in the right direction: https://formidableforms.com/knowledgebase/frm_pdfs_css/#kb-use-custom-font

Kamil Haraburda replied 8 months ago

Yes, I have backup and I restored it 👍 Thanks for your advice, I will try this 😊 Thank you 👍

Kamil Haraburda replied 8 months ago

I tried to change font for Arial, but it still doesn't work... 😥 I tried to make it by adding snippet below and edit font-family in css files...

add_filter('frm_data', 'custom_font_pdfs_css', 10, 2);
function custom_font_pdfs_css( $css, $args ) {
$custom_css = 'body { font-family: Arial; }';
return $css . $custom_css;
}

Could we contact on e-mail - maybe you can take a look on my website? 😥

Victor Font replied 8 months ago

No. I don't work on anyone's website without a paid engagement. If you're interested in hiring me, please start here: https://formidable-masterminds.com/project-application/

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right