The problem with Russian in PDF form?

0 like 0 dislike
Is there a website. It has an indoor section with orders. There are quite a lot of different documents with simple formatting (agreement) and complex (various forms and shapes). The requirement: to give the site visitors the completed documents to PDF.

Requirements: free library of PHP to re-compile PHP there is no possibility

I found 2 solutions:

  • Simple documents in html to make and surpass to PDF with mpdf
  • Complex shapes to lay out in OpenOffice, exportnet to PDF, generate FDF and glue PDF and FDF using pdftk

With the first no problem. But with the second option more difficult.

First made in the forehead: in OpenOffice spaced document in the field hammered the default values for the test, exportno to PDF. Open the result: the English letters are visible, and instead of Russian — Arabica. But! If you click in a field, then there is normal Russian text.

The network found that it is necessary to embed the fonts. And it is desirable that they were in the format of OTF and Unicode. Found, filled out, when you export set the flag "embed fonts". The result is the same as in the first embodiment.

Began to search further. Written to use for marking only Acrobat Pro. Found this program. Spaced. Drove test data. And for the test directly from an Acrobat generated the FDF file. Now I wonder:

  • if you open the FDF in Adobe Reader, then he swears at security (say I agree) and then it opens the PDF and correctly inserts the data. But this is not enough, because the customer must pay ready non-editable PDF
  • if you use pdftk to cross PDF and FDF from Acrobat, the resulting file field blank. But if you click it, will appear the data from the FDF. Almost what I need.

Also experimented with setting the visibility of fields and mode of "read-only" — nothing happened.

Anyone able to fill PDF forms in Russian using PHP?

PS: I have 2 options: a) complex forms to Severstal in HTML (but there are doubts that all mpdf digest) b) complex forms translated into intermediate format (TeX, SVG), and then to PDF (it's quite hard and long)
by | 8 views

3 Answers

0 like 0 dislike will save you, IMHO.
In particular and (it seems even Javascript supports there)
0 like 0 dislike
Your task is elementary solved by a report generator. For Example, FastReport.NET. Maybe on the fly to generate HTML, PDF and many other formats.
0 like 0 dislike
in pdftk something with the fonts not Russian, and more.
my decision

Related questions

110,608 questions
257,186 answers
32,949 users