Tell the library to create pdf. Requires small:

  1. Insert picture
  2. Cyrillic text insertion
  3. Support, adequate, embedding fonts and using them specifically for paragraph 2
  4. Note to point 3: otf and on the fly when creating a document

What I tried:

  1. FPDF - not suitable due to the lack of embedding fonts on the fly. I will not prepare files with metrics, as this, IMHO, is a crutch!
  2. TCPDF - similar
  3. PDFLib is a great challenger. Fonts are built in successfully, but there is not enough knowledge to teach the library Cyrillic (I spend tests on Windows 32)
  4. zend ovsky baida with relatives fpdf - has the same problems. But, to be honest, not tested well enough.

I tend to the 3rd point - teach me (referring to a good article about setting up to work with Cyrillic, and that the article was tested by your experience) or tell me the way in the right direction.

PS: the project still uses the Cyrillic alphabet and, of course, it supports the Latin alphabet. I am not strong in theory, so litter for not competence: I would like to teach without the server add-ons to teach the project to work with any languages. For example: Japanese hieroglyphs, etc.

  • Hmm ... Japanese characters and Cyrillic? o_O - Zowie
  • @AlexWindHope, maybe this is a PDF generator with tasks for learning Japanese) - Nofate
  • This is the editor of business cards) Just focus on the support of any language. For example, and cited Japanese. After drawing a business card, I need to drive it into pdf. Accordingly, pick up the fonts and put the image on the background, perhaps logos, perhaps specials. characters. - org

3 answers 3

mpdf , I recommend

  • Now we will test!) Thank you. - org
  • Despite the fact that much needs to be given to him in html, all my needs are met with a bang! Thanks for the link. Even if something does not fit, openness allows you to finish by yourself! - org
  • Neat with pictures. I somehow stumbled into trouble: it was necessary to convert simple HTML markup with pictures into PDF, so mpdf crashed when there were large numbers of pictures × their size. That is, either it cannot write data directly to a file as it arrives, but stores everything in memory. Because of this, there was an overrun of dedicated 256M on shared hosting. By the way, if someone knows how to enable streaming in this lib - please share. - Bars
  • did not know about this library ... cool and comfortable. - Yoharny Babay

PDFLib in the free version does not support utf-8. If you want it, then buy the paid version.

  • Thanks for the advice. I will look in this direction, but, unfortunately, the employer invests only in the salary of workers ( - org
  • 2
    In such cases it is usually useful for the employer / client to say: “Development of feature A without this library will take n days, and with the library there will be m days. And we can use the library also in projects B , C and D ”, where n >> m . - Nofate
  • I am a freelancer and is not specified in advance ( - org

I used domPdf in my project
Cyrillic - read here