Special character in DOMPDF - dompdf

We are copying content from word doc in CKEDITOR in Drupal. In generated pdf "?" is coming for some character.
Also at some places content is overlapping.
When same is seen in website, its appearing fine.
Any help in this?
Thanks

Related

Is there any way to convert ckeditor html content to ms word document?

I have a Laravel project where I need to create a doc/docx document based on user input in Ckeditor. I have previously worked with PHPword where I can convert simple text input to a docx document. But the problem with ckeditor is it gives you html with inline css (which i need) and PHPWORD can not convert this to a docx.
I also tried to convert the html to word by xml but no luck. I know there is a paid tool called phpdocx but I am looking for a free solution.
Just a note, I can actually convert the html to pdf. But again, there is no solution from pdf to doc.
So, any help in converting the html to word or pdf to word?
thanks

Rotativa Issue printing RAW HTML

(More specific Giorgio Bozio)
I have been using Rotativa for the last year to print simple html to pdf and its been working fantastic. Very happy with product, but now recently i have been trying to do something a little more advance and i keep having the same issue.
Normally i would send Rotativa a simple invoice view (Predefined HTML) with model data populated via Razor and this worked well, but now i am trying to implement template's for my invoices. Customers can create their own template layouts with a custom 3rd party form designer and then upload its template file into my site. I take this file and parse it and generate the elements of the invoice with stringbuilder and div tags. I then send the generated HTML to the view that uses a #HTML.Raw() to populate the invoice html. Rotativa then takes this View and generates a pdf, but when it generates the pdf its quality of the text is horrible and blurry. Thus it generates the template correctly, but does some sort of shrinking or something to make the text not look crisp.
I have tried everything, from playing with custom switches to playing with the dimensions of the html.
When i copy the generated html to a view and just generate the pdf plainly then it prints fine, but as soon as i push the html to the view with HTML.Raw i seem to land up with fussy text.
Giorgio Bozio, does Rotativa have a issue with Html.Raw? or can you perhaps open a dialog with me to try and resolve this issue? Really hope you can help me...or someone can help me. Desperate and dont really want to change Rotativa for something else.
Please help.
Resolved Text printing issue by removing background-color definitions on Div containers.
Resolved extra blank page printing issue by reducing PageHeight on Rotativa Customswitches
:-)

Google Search Appliance: Result Encoding

I got some Problems with the Google Search Appliance, File Shares and German Special Charaters like "ä, ö, ü" in the Results page.
I did a lot of googling, and in Stackoverflow I couldn't find only one Question which wasn't answered.
We are working with Internet Explorer 8, but with Internet Explorer 10, we are facing the same Problem.
As long as there are none of those special Characters like ä,ö,ü, etc, the URL is rendered as
a href="file://///group.server.ch/Directory/"
with Escaped Urls and works fine.
If it's a Intranet Link which starts with "http://", it works with those special Characters too.
For Example the word "Ablösung", "ö" is Escaped with %C3%B6, which is UTF-8:
In a HTML Link, this is working (in IE shown as "Abl%C3%B6sung", but working)
In a File:////-Link, it's rendered wrongly. (In IE it's shown as "Abl¶sung", not working)
If i copy and save the Result Page, edit the HTML and change the Escaped Character to ISO 8859-1, where the "ö" is %F6: "Abl%F6sung", it's working fine (shown as "Ablösung")
The Problem now is that I'm not able to change the Encoding to ISO 8859-1 in the Google Search Appliance.
I tried the following:
In the XSLT there is the Part, where the "file://///"-Part of the URL is concatted:
<xsl:when test="$protocol='nfs' or $protocol='smb'">
<xsl:value-of disable-output-escaping='yes' select="concat('file://///',$temp_url)"/>
</xsl:when>
Changed "disable-output-escaping" to "no"
Changed "file://///" to "file://"
Set The "oe"-Param in the Search Query (which should change the Encoding of the Result) to "latin-1" or "ISO-8859-1"
All this did not change anything in the Result Encoding.
Now my questions:
Am I doing something wrong in the Configuration?
Are there other options to change the Encoding for File-Share-Links?
Or was the URL already crarwled and stored in a "wrong way" (with %C3%B6..) and I have to change something with the Crawling? (Although I couldn't find a lot of possible settings there).
Or are there any settings in the Internet Explorer to interpret the UTF-8 as ISO-8859-1?
As there should be a lot of Users with those Latin Characters using the GSA, I cannot imagine that I'm the only one with those Problems.
Any suggestions?
The issue is most likely
http://support.microsoft.com/kb/941052
The default frontend deals with this problem by invoking the function fixFileLinks(), which changes the link URL to Unicode string.
If you are developing your own frontend you need to run the same function to make sure the file:// links are clickable.

ckeditor escapes all text - how can I prevent it from doing so

I dont want the ckeditor to escape text written. I use the editor such that customers can write their their own mailtemplates, and I give them code snippets they can paste in the around in the text in the editor to merge in dynamic data, ala ${customer.name}.
The text is then persisted to database and retrieved again other places in code and filled with data through Freemarker. And here the problem amerge - Freemarker uses < and > characters, but the ckeditor escapes them. How can I configure ckeditor to not do this?
thanks in advance
CKeditor is creating HTML, so the < and > characters are reserved, and if it wasn't escaping them, the text wouldn't display.
Personally, I would put a translator between what the browser sends to the server and what is being sent to FreeMarker, either when the template is stored, or when it's rendered. If your users are familiar with FreeMarker, continue to allow them to use > and <, but then unescape them before trying to render them.

What is the RTF syntax for a hyperlink?

HTML is to y as RTF is to _______?
The equivalent of the following HTML:
Google
for an RTF file is:
{\field{\*\fldinst HYPERLINK "http://www.google.com/"}{\fldrslt Google}}
which results in a link:
Google
but without additional style information, will appear unformatted:
Google
This will show the hyperlink in the usual blue, with underline:
{\colortbl ;\red0\green0\blue238;}
{\field{\*\fldinst HYPERLINK "URL"}{\fldrslt{\ul\cf1Text to display}}}
The last article works fine.
I even took it further to display multiple links (and replaced \par to \line tags in order to stay in the same paragraph).
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\colortbl ;\red0\green0\blue255;}
{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs22
{\field{\*\fldinst{HYPERLINK "http://www.google.com"}}{\fldrslt{\ul\cf1This is a Google URL}}}\f0\fs22\line
{\field{\*\fldinst{HYPERLINK "http://www.google.com"}}{\fldrslt{\ul\cf1This is a Second URL}}}\f0\fs22\line
}
I don't know much about what your trying to do, but If I open and save an rtf document, with just the http://www.google.com link in it, and view it with notepad I get this:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\colortbl ;\red0\green0\blue255;}
{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs22{\field{\*\fldinst{HYPERLINK "http://www.google.com"}}{\fldrslt{\ul\cf1 http://www.google.com}}}\f0\fs22\par
\par
}

Resources