Arabic Fonts Disconnected in PDF file Using Pentaho 5.3 - pentaho-report-designer

We are using Pentaho 5.3 and we are trying to generate arabic report.
We installed all required fonts and stored in DB. From DB i am reading and printing in report. From preview it is coming correct and if we export to excel also coming correct. If we generate PDF Arabic letters are disconnected like below. We downloaded the adobe multi language support and tried getting the same space letters disconnected. Is there any setting in pentaho side to set?

There is some kind of workaround, not perfect but it did a job for me.
Master report - set complex-text = true
set Encoding to UTF-8
all labels, text boxes and other text containing controls must have alignment set to left or right - center won't do (report is crashing if so) (!?)
As you said, use font that supports Arabic (Arial or so)

Related

Keep text format when copy/paste from Angular Application

I've realized that when I try to copy/paste a text from an Angular Application to any text editor software (ie Microsoft Word), all the text loses the original format.
I'm using as example the angular material website: https://material.angular.io/
When I copy the text and past in Microsoft Word:
Thats means, the pasted text lost the center alignment, the color and de font type.
Is there a way to keep the website format? I know that the font used by Angular Material is different from text editor, but there are another things that could be mantained (i.e. alignment, color, etc).
I've started a project using Angular 8 + Angular Material and I'm facing the same problem.
Well, you're not likely to get a straight copy/paste action to do what you're requesting.
Why it doesn't work as you expect:
Copy & Paste out of MS Word for example and you'll get Rich Text where all the formatting is part of the data payload. When you copy this to the clipboard all that extra styling metadata goes along with the text. If you paste that data INTO a rich text editor (not a straight text input) like Wordpress's Admin that editor package translates the text metadata that you can't see into equivalent HTML styling.
However, When you copy from HTML (in your browsers) all you're getting is the text without all the "rich" formatting. This happens because a browser uses outside context like DOM position, tag type, and CSS to style the HTML content into what is presented for you to see.
Rich text copy for just YOU
There are multiple browser plug-ins for Chrome and Firefox that will intercept your copy request, create formatting and then paste that to the clipboard. Just ask Google for recommendations.
Rich text copy for all users of a project
This, unfortunately, is more complicated. You will need to write code to do the following (this answer has a good example):
Figure out what the user is trying to copy (usually mapped to selected text).
Convert that content into rich text format. The example above simply copies the HTML but that won't get styling applied by external CSS. Packages like Quill MIGHT give you the option to get rich text back out.
Copy your converted text to the user's local clipboard. You shouldn't hijack browser commands to do this which is why you frequently see a "copy to clipboard" button to do this action. You can move content to the user's clipboard using the Clipboard API in most modern browsers.
Oh and you'll need the user's permission to do all this since proactively interacting with the user's clipboard presents a pretty massive security issue.

How to Open PDF in Browser and modify it and save it?

I am thinking about opening a PDF file with some editable fields in the browser , by which i can modify the PDF file / fill information etc and then save that PDF FORM
Please guide me in a right direction ?
I think in your case Rad PDF can work. It is a PDF Viewer and Editor for ASP.NET by which you can open the PDF with editable fields in browser and can even modify the PDF and save it.
Check the link:- https://www.radpdf.com/demo/easy-integration/
and another one is below:-
https://code.msdn.microsoft.com/PDF-Editor-to-Edit-PDF-5fb73b8d
Hope it will work in your case.
Thanks
You cannot. Simple.
PDFs are edited by the native app, in your case may be Chrome, Safari and Internet Explorer. You do not have control on anything that happens when the user edits the PDF in a native app context.
Pdf documents come in many flavors (standards). One of them (FDF) matches your usecase very closely. This particular standard allows you to edit a pdf form, on completion (or some other event) it would send the data back to a server, collect a response, and modify the pdf with the incoming data.
Keep in mind though that this standard is not often used. There may be a good reason for that (not a lot of libraries support it).

Crystal Reports shows barcode ONLY locally

I use Crystal Reports to show an .rpt file in an asp.net page.
When I run both at server, the CR's preview on design software and the WebPage(IE) where the CR viewer is embedded, the reports shows the barcode and can be printed.
(the barcode is a function Bar128AB( *BarTextIn*, *Subset* ) )
BUT when I run it from another computer or from another browser(Firefox, Chrome) on the same server, the barcode shows the input string(BarTextIn) from Bar128AB function and not the result(final barcode) of the function.
The font which is used to represent the barcode is Code 128AB HR, which has restricted embeddability, but I don't mind for exporting it in PDF, just view and print it.
HOW can I fix it?
How can the rest browsers(Firefox, Chrome) on the server show the barcode properly?
How can another computer show the barcode properly?
You need to install a couple of packages in order to show the barcode properly.
Install the latest package of crystal reports
Install this patch for the font with fsType value 0 to achieve installation
Also according to this thread you can try to print the page and see if barcode its works
Try to install Code 128AB HR font on another computer and then to run the report there.
Is it working now? If it is, it means that your solutions need the font to be installed on any client (and I think it is).
If you think this is not the right solution for you, you could turn into javascript barcode tools (this is one).

crystal report arabic fonts with asp.net

I create website displays Crystal Reports build with asp.net v4
When running the Report Display works and appears correctly but when you print or export to pdf file
Shows the formation of the Arabic words and the words stick together there is a single font without this problem is # Arial Unicode MS
But inappropriate Is there another Font or other things to resolve this problem thankful for your help.
For your data fields in crystal reports, right click the field and select format object.
Format your text to be displayed by selecting options like Can Grow, Keep text together.

Crystal Reports VS 2008 Different Wrapping Behavior

I have a text box which is 7.5" wide and I set Can Grow. Inside the textbox I have placed a TEXT database field. I set the field to use the RTF format. When I export the report to PDF on the developer machine I am able to get the word wrapping where it should be (after the finagling with the right margin). However, when I export the report on the server, I get word wrapping about an inch sooner than on the development machine.
So here is some more information: the PDF of the report is generated by an ASP.NET application on both the development machine (from within VS 2008) and the server; I am using the Crystal Reports VS 2008 runtime.
I have tried a few ideas so far:
I found out that Wordpad does not save the page margins into the RTF document. It always uses the last used settings for the page margins which is 1.25" L-R and 1" T-B.
I tried editing the RTF source and adding the appropiate page margins: \margl720\margr720\margt720\margb720 which sets all margins to 720 twips (0.5").
I tried setting the Wordpad defaults for the page margins to 0.5". This is different for each user though. I have the Application Pool for the ASP.NET application running as a specific user. I tried setting it under that user and no change. Is it possible that the Crystal Report is being generated under a different user? Or that Crystal Reports always uses a specific user for this information?
After the settings on the server had no effect, I set the margins on the development machine back to the default and re-ran the report. This causes the report to have the same problem as on the server. So it has to be something with the Wordpad page margins.
So the question is: how do I get these settings set for the server? Or how can I figure out under which user the Crystal Report is being generated?
It turns out it had to do with the printer drive as Paul suggested. To fix the issue I changed the report to use No Printer. This did not solve the weird wrapping of the RTF by Crystal Reports. To fix that I made the text box that the field was in wider than the page. I had to find how far off the page by trial and error.

Resources