My C# .NET 3.5 application has an option to export text to PDF. I am using ReportingCloud (based on RDL) as generation engine. However, cyrillic texts shown incorrectly in resulting PDF. What means can I use to generate cyrillic PDF correctly? A method to generate UTF8 will also do.
UPD: Particularly, how to embed right fonts into PDF?
I am not familiar with ReportingCloud, so perhaps this is not the easiest answer to your question. But for really great looking PDFs with UTF8 and cyrillic support you could use LaTeX. But it is a language like HTML, just for PDFs. So you have to generate some source code. It is also possible to embed the desired fonts.
Related
I came across the neat little R package slidex() to convert pptx to rmd. However, it does only support "en-US" language encoding.
How do I change the language encoding of an existing .pptx file?
Language tags are scattered all over a PowerPoint file. There are add-ins that can do a pretty thorough job: PPTools LanguageSelector
Personally, I prefer to change the file ending to .Zip, expand the file and use a text editor like NotePad++ to find and replace all language tags (you're looking for tags like lang="en-US"), then rezip. The default Windows Zip utility is not the best for this, it adds a top-level folder that PowerPoint can't parse. WinZip and 7-Zip are better.
If you're using PowerPoint for Windows, save the file as a PowerPoint XML Presentation (*.xml). Do the find and replace on that, then resave as a normal presentation. That avoids the unzip/rezip issue.
Does unity support arabic writing in InputField UI or even GUI Texts ?
I mean if I want to write arabic characters in the InputField, does unity support that ?
There's a free library for supporting Arabic language in Unity. You can download it here
This is part of the readme file. Just add the library and use one of GUIText or 3DText prefabs.
To use the Unity Arabic Support asset inside a script, use: using ArabicSupport;
After using the using statement, use the following method (returns a string): ArabicFixer.Fix(textToBeFixed);
And you're done! You can use the alternative: ArabicFixer(string, tashkeel, hindoNumbers) for more customization options.
No by default but there are libraries/asset packs to make it work.
Just search "Arabic" in the unity store to find them.
Keep in mind that it is really hard to setup TextMeshPro (The addon pretty much everyone uses for crisp text in unity) in Arabic with a different font as most Arabic fonts you find will not have all the characters you need.
Lookup this to see the encoding range you need to put in the font asset creator.
For example you will be able to write letters but only some of the letters will be connected as the font does not have all possible connections and unity wont make them by default.
But I think the Adobe Arabic has all the letters for a start.
It should if you save the script with UTF-8 encoding. Then you should be able to include all unicode characters in there.
short answer : unity doesn't support Arabic or Persian although
there are bunch of plugins on assets store that can buy you some times.
you can find them easily.
I am looking for a way to replace text in an PDF document in my Mac Application. But the problem is that I don't know how. I am thinking of converting the PDF to an HTML file, so I can use stringByReplacingOccurrencesOfString: and then converting it back to an PDF, but I can not find out how.
I also tried to replace the text using CGPDFDocumentRef but I couldn't find a valide method.
Can anyone please help me to solve this issue?
Thanks, David
It is not possible to replace text in PDF using CGPDF* API. PDF -> HTML -> PDF will not work because the double conversion will loose content (PDF and HTML formats are not quite compatible).
The only solution is to find a 3rd party toolkit that supports this functionality.
I'm generating PDF documents with PDFKit and I'd like to have it not embed the standard PDF fonts (Times, Helvetica, Courier) if possible.
Is there a way to accomplish this?
No, there isn't.
Once the PDF is produced, you may call other tools to remove these fonts, e.g. iText
(see here).
I would like to convert pdf, doc files to html files using Cocoa
Please help me in this.
Thanks in advance,
You can convert Word files to HTML using NSAttributedString. You can't do this in pure Cocoa for PDF files; you'll have to use a conversion tool, such as stigi suggested. To do that, use NSTask.
Cocoa's PDFKit framework can convert a PDF file to text, through PDFDocument's -string method for example. Of course this won't copy images or formatting though, and it depends on PDFKit being able to recognize text in the file.
there are a couple of tools for the unix commandline that do such kind of conversions.
check out http://pdftohtml.sourceforge.net/ & http://rtf2html.sourceforge.net/
you may see if there are other tools like this.
but to get back to your question. these command line tools can be called from within your cocoa app (won't work on the iphone) and produce the html result.
check out this link for a guide on how to embed such command line tools within your app.