I am having issue with character encoding for displaying text files in UIWebView. I am using utf8 encoding but if i create a text file using ansi format then if characters appears as boxes. Is there any way to generalize this for all text files
Related
In my HTML page, 2 diff chart is available that's the way I convert full page as an image and after it saves as pdf using jspdf.
I need set header or footer before it update in html2Canvas and jspdf.
but how can I add header and footer in pdf?
You don't add headers and footers in PDF. Read more about PDF, it is a low level standardized format, where the primitive operations are something like move to coordinate x=340, y=450 (in some unit, perhaps tenth of millimeters or typographical points) and change font to Helvetica 10 and show the a letter. Read the PDF standard.
You may generate PDF from some higher level text format. I recommend reading about LaTeX and Lout and many other such document processors. You could consider generating some LaTeX or Lout file, then converting it to PDF (by running some pdflatex or lout process).
You could use a PDF generating library such as JagPDF and many others.
You might find HTML to PDF converters. Most web browsers have one. Look also into pandoc.
I am generating one PDF in ruby on rails
filename is abc.html.haml
the file contains Japanese characters that I have copied from a word document.
Now the problem is that some Japanese characters in pdf are displayed with bold style but I have not added any Style or CSS for the characters.
This makes my PDF look uneven some characters are normal some are bold.
If anyone can help me
Thank you in advance
As it can be seen in screenshot some characters are bold
I'm trying to manipulate and modify a large number of eps files output by a web service. I have the code in python to interface with the server, and to edit the images to within about 99% of where I want them.
My issue deals with trying to display special characters. I've tried outputting the desired unicode character, Ψ, directly into the eps file, but this is displayed as different characters in both Preview for Mac and Adobe Illustrator. From some googling, it seems like eps doesn't accept unicode characters. Fair enough...
My current solution is to try to change the font in the eps files. This works when I want to display the Ψ as a single character. I just switch the font, and then switch back. As below:
/Symbol findfont 10.5 scalefont setfont
-9.1 36.1557 moveto (Y) show
/Helvetica-Bold findfont 10.5 scalefont setfont
Where I'm having a problem is when I want to display a title on each image. The title would include a mix of Helvetica-Light and Symbol fonts, I would want it to display as ABC1-Ψ123. I can't figure out how to switch the font of a single character within a larger block of text. Currently the eps files are written as shown:
/Helvetica-Light findfont 12 scalefont setfont
-43.093 304.224 moveto (ABC1-Y123) show
I'd appreciate any help.
I am using Tesseract for text recognition.
How can I simply recognize padding between text and create e.g. pdf or .doc file with the same padding?
Let's say that the source page contains 3 columns with some text (like a news paper). How can I recognize this text with appropriate padding and margin to each other and to page?
Maybe you can suggest example or library that does the same or just algorithm?
when i specify static data in a label and preview it through internal preview of ireport it displays all chineese characters. But when i try to export it PDF preview it is not displaying chineese characters rather that only blank space is shown.