• Template with pdf form

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #14450  by ahmed
 
i am build simple form using OpenOffice form deign with arabic values in fields, i notice that when i export the pdf with default option the Arabic values not visible in fields, but when i export the document using the PDF/A-1 (ISO 19005-1:2005) the values appears. so i want to know where the openkm call the OpenOffice API to change the value of "SelectPdfVersion=0" to be "SelectPdfVersion=1".
that means when i use templates associate with PropertyGroups i can enter Arabic data in fields and it will be generation also in pdf .
the current setting in openkm work with English values only in templates with PropertyGroups
 #14481  by pavila
 
If you start OpenOffice with the same user that starts JBoss / OpenKM, the OpenOffice configuration should be the same because it stored this configuration in the user home. Have you tried this?
 #14562  by ahmed
 
hi all, after a lot of search in Google i figure out that the problem is from PDFStamber library that openKM used, it's not support Arabic characters. i working on solution may be solve the problem and wish to me luck :D
 #14580  by ahmed
 
after a lot of goggling i found the answer:
to write Unicode characters to pdf using PDFStamper you must do the following:-
1-download the times.ttf font from any site
2- add the font in your project resource
3- add the font to acrofields using setProprieties function like following:

//u must set the input stream with your file
InputStream input;
OutputStream output;

PdfReader reader = new PdfReader(input);
PdfStamper stamper = new PdfStamper(reader, output);
AcroFields fields = stamper.getAcroFields();
PRAcroForm form = reader.getAcroForm();
BaseFont bf = BaseFont.createFont("/com/openkm/util/times.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);

fields.setFieldProperty("myfieldName","textfont",bf, null);
fields.setField("myfieldName", "احمد حمزة ، وهذا اختبار جديد");
stamper.partialFormFlattening("myfieldName");

stamper.setFormFlattening(true);
stamper.close();
reader.close();
 #14966  by ahmed
 
Yes Time.ttf has Arabic characters, and it work with me.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.