{"id":894,"date":"2015-01-13T08:47:20","date_gmt":"2015-01-13T08:47:20","guid":{"rendered":"http:\/\/www.masterlevel.de\/blog\/?p=894"},"modified":"2015-01-13T08:47:20","modified_gmt":"2015-01-13T08:47:20","slug":"fpdf-utf-8-faehig-machen","status":"publish","type":"post","link":"https:\/\/www.masterlevel.de\/blog\/fpdf-utf-8-faehig-machen\/","title":{"rendered":"fpdf utf-8 f\u00e4hig machen"},"content":{"rendered":"<p>Damit fpdf mit utf-8 Inhalten klar kommt, in\u00a0fpdf.php\u00a0(liegt hier in der Version: 1.7 vom 18.06.2011 vor) diesen Code suchen:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\r\n\tif($txt!=='')\r\n\t{\r\n\t\tif($align=='R')\r\n\t\t\t$dx = $w-$this-&gt;cMargin-$this-&gt;GetStringWidth($txt);\r\n\t\telseif($align=='C')\r\n\t\t\t$dx = ($w-$this-&gt;GetStringWidth($txt))\/2;\r\n\t\telse\r\n\t\t\t$dx = $this-&gt;cMargin;\r\n<\/pre>\n<p>Und nun das davor setzen:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$txt = iconv('utf-8', 'cp1252', $txt);\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Damit fpdf mit utf-8 Inhalten klar kommt, in\u00a0fpdf.php\u00a0(liegt hier in der Version: 1.7 vom 18.06.2011 vor) diesen Code suchen: if($txt!==&#8220;) { if($align==&#8217;R&#8216;) $dx = $w-$this-&gt;cMargin-$this-&gt;GetStringWidth($txt); elseif($align==&#8217;C&#8216;) $dx = ($w-$this-&gt;GetStringWidth($txt))\/2; else $dx = $this-&gt;cMargin; Und nun das davor setzen: $txt = iconv(&#8218;utf-8&#8216;, &#8218;cp1252&#8216;, $txt);<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[93,94],"tags":[],"class_list":["post-894","post","type-post","status-publish","format-standard","hentry","category-php","category-snippets"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Umlaute falsch in fpdf?<\/title>\n<meta name=\"description\" content=\"Dann checkt mal dieses HOW TO (fpdf utf 8 encoding)...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.masterlevel.de\/blog\/fpdf-utf-8-faehig-machen\/\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"J. Adler\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/fpdf-utf-8-faehig-machen\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/fpdf-utf-8-faehig-machen\\\/\"},\"author\":{\"name\":\"J. Adler\",\"@id\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/#\\\/schema\\\/person\\\/e6868eda89eb09db99b63d9d8dd4b63f\"},\"headline\":\"fpdf utf-8 f\u00e4hig machen\",\"datePublished\":\"2015-01-13T08:47:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/fpdf-utf-8-faehig-machen\\\/\"},\"wordCount\":67,\"commentCount\":2,\"articleSection\":[\"PHP\",\"Snippets\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/fpdf-utf-8-faehig-machen\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/fpdf-utf-8-faehig-machen\\\/\",\"url\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/fpdf-utf-8-faehig-machen\\\/\",\"name\":\"Umlaute falsch in fpdf?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/#website\"},\"datePublished\":\"2015-01-13T08:47:20+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/#\\\/schema\\\/person\\\/e6868eda89eb09db99b63d9d8dd4b63f\"},\"description\":\"Dann checkt mal dieses HOW TO (fpdf utf 8 encoding)...\",\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/fpdf-utf-8-faehig-machen\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/\",\"name\":\"masterlevel\",\"description\":\"Manche Sachen vergi\u00dft man, weil man sie nicht oft braucht - deshalb stehen sie hier...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/#\\\/schema\\\/person\\\/e6868eda89eb09db99b63d9d8dd4b63f\",\"name\":\"J. Adler\",\"url\":\"https:\\\/\\\/www.masterlevel.de\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Umlaute falsch in fpdf?","description":"Dann checkt mal dieses HOW TO (fpdf utf 8 encoding)...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.masterlevel.de\/blog\/fpdf-utf-8-faehig-machen\/","twitter_misc":{"Verfasst von":"J. Adler"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.masterlevel.de\/blog\/fpdf-utf-8-faehig-machen\/#article","isPartOf":{"@id":"https:\/\/www.masterlevel.de\/blog\/fpdf-utf-8-faehig-machen\/"},"author":{"name":"J. Adler","@id":"https:\/\/www.masterlevel.de\/blog\/#\/schema\/person\/e6868eda89eb09db99b63d9d8dd4b63f"},"headline":"fpdf utf-8 f\u00e4hig machen","datePublished":"2015-01-13T08:47:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.masterlevel.de\/blog\/fpdf-utf-8-faehig-machen\/"},"wordCount":67,"commentCount":2,"articleSection":["PHP","Snippets"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.masterlevel.de\/blog\/fpdf-utf-8-faehig-machen\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.masterlevel.de\/blog\/fpdf-utf-8-faehig-machen\/","url":"https:\/\/www.masterlevel.de\/blog\/fpdf-utf-8-faehig-machen\/","name":"Umlaute falsch in fpdf?","isPartOf":{"@id":"https:\/\/www.masterlevel.de\/blog\/#website"},"datePublished":"2015-01-13T08:47:20+00:00","author":{"@id":"https:\/\/www.masterlevel.de\/blog\/#\/schema\/person\/e6868eda89eb09db99b63d9d8dd4b63f"},"description":"Dann checkt mal dieses HOW TO (fpdf utf 8 encoding)...","inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.masterlevel.de\/blog\/fpdf-utf-8-faehig-machen\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.masterlevel.de\/blog\/#website","url":"https:\/\/www.masterlevel.de\/blog\/","name":"masterlevel","description":"Manche Sachen vergi\u00dft man, weil man sie nicht oft braucht - deshalb stehen sie hier...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.masterlevel.de\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Person","@id":"https:\/\/www.masterlevel.de\/blog\/#\/schema\/person\/e6868eda89eb09db99b63d9d8dd4b63f","name":"J. Adler","url":"https:\/\/www.masterlevel.de\/blog\/author\/admin\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.masterlevel.de\/blog\/wp-json\/wp\/v2\/posts\/894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.masterlevel.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.masterlevel.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.masterlevel.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.masterlevel.de\/blog\/wp-json\/wp\/v2\/comments?post=894"}],"version-history":[{"count":1,"href":"https:\/\/www.masterlevel.de\/blog\/wp-json\/wp\/v2\/posts\/894\/revisions"}],"predecessor-version":[{"id":895,"href":"https:\/\/www.masterlevel.de\/blog\/wp-json\/wp\/v2\/posts\/894\/revisions\/895"}],"wp:attachment":[{"href":"https:\/\/www.masterlevel.de\/blog\/wp-json\/wp\/v2\/media?parent=894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.masterlevel.de\/blog\/wp-json\/wp\/v2\/categories?post=894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.masterlevel.de\/blog\/wp-json\/wp\/v2\/tags?post=894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}