wkhtmltopdf --encoding utf-8 is not working for --footer-html.
I am using the following command. Both HTML files are also in utf8 format.
wkhtmltopdf --dpi 120 -O Portrait --encoding 'utf-8' --footer-html /tmp/testFooter.html /tmp/testMain.html /tmp/testPDF.pdf
Both files have french characters. But in pdf footer have bad characters.
<html>
<head>
<title></title>
</head>
<body>
<div style="width:95%;font-size:9pt;font-family:Arial;">
<div style="border-top: 1px solid black;width: 100%;text-align: center;">
test - Guérin 691BANNE - FRANCE - SA au capital 0 Euros -737 729 - Téléphone : 86 03</div></div>
</body>
</html>
Following image is output
Try adding the following line in the HTML head element of the footer:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Make sure you have specific font installed there. I need Hindi (Indian Language) on my PDF files. putting meta tag had not solved my problem. So i installed hindi fonts on my debian box by
sudo apt-get install fonts-indic
Related
I'm converting html to pdf using wkhtmltopdf. wkhtmltopdf not printing ℃ (℃) in pdf instead it prints dodgy character. Html file displaying ℃ but missing in pdf. I have got http-equiv="Content-Type" content="text/html; charset=UTF-8" in html file. Please suggest any ideas.
I installed a fresh copy of WebStorm and opened up an existing Angular project.
When I open up any HTML file in the project the IDE shows 'Cannot find div' for all div tags in the .html file. For a few seconds the IDE is fine, then it shows a '2.5.3 Typescript' tab with a list of TypeScript errors.
Some Typescript tab errors:
Error:(1, 2) TS2304: Cannot find name 'div'.
Error:(3, 4) TS2304: Cannot find name 'div'.
Error:(3, 9) TS2304: Cannot find name 'ngIf'.
I've tried invalidating the cache and restarting. I've tried disabling TSLint. I've tried injecting language for some of the attributes/tags.
Even index.html throws a bunch of TypeScript errors.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="">
</head>
<body>
</body>
</html>
I expect no red squiggly marks in the .html file since it is all valid.
It works fine in VS Code.
Known issue, WEB-36373 is fixed in 2018.3.3.
For now, I can suggest turning Angular language service off in Settings | Languages & Frameworks | TypeScript (all the angular functionality will still be available)
Generating a report in c# using a wonderful tool NReco.PdfGenerator (with PhantomJs as engine) bumped into an issue with arabic symbols.
HTML layout is normally rendered in browser. But generating a PDF I got http://image.prntscr.com/image/73feca61ced346a094e2c652da4fea59.png
HTML has
Any ideas are welcomed
First of all ensure that you have the following meta tag in your HTML <head> section:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
I am trying to upload a file using Behat. Therefore I wrote this simple HTML page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<form method="post" enctype="multipart/form-data">
<input type="file" name="file" id="file" /><br />
<input type="submit" />
</form>
</body>
</html>
and a simple Behat feature:
Feature: test
Scenario: Some Test
Given I am on "/upload.php"
And I attach the file "/path/to/tile" to "file"
When the I attach the file ... to ... phrase is executed, the selenium 2 driver generates a curl request and sends it to PhantomJS: http://localhost:4444/wd/hub/session/5b9a8630-ed8e-11e4-956f-956a9ce75127/element/:wdc:1430215640681/value with params: {"value":["\/path\/to\/file"]}
The request does not terminate unless aborting it and PhantomJS does not react on the request in any way.
I already searched through the net and found several threads saying that it does work and several saying that does not work including an issue on github (https://github.com/detro/ghostdriver/issues/282) which was closed and reopend multiple times.
Versions:
PhantomJS: 2.0.0
Behat: 3.0.15
Mink: 1.6.1
Mink-Selenium2-Driver: 1.2.0
Does anyone know a working solution for this problem?
Could this behaviour exist due to inability to upload files that is a known bug with PhantomJS v 2.0.0?
Basically, a change made in Qt 4.8 and incorporated subsequently in Qt 5.0 prevented clicking on file input elements that were not caused by user gestures.
The solution is discussed further in the issue thread.
To quote, you have to comment one if condition in
/src/qt/qtwebkit/Source/WebCore/html/FileInputType.cpp
//if (!ScriptController::processingUserGesture())
// return;
then compile the binary.
I have a set of PDFs that I am exporting to HTML files using the HTML 4.01 export option. When I open the files in SublimeText or Chrome, all special characters are showing as a ?. The declared encoding is UTF-8:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html40/strict.dtd">
<!-- Created from PDF via Acrobat SaveAsXML -->
<!-- Mapping table version: 28-February-2003 -->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
The problem persists if I use the SublimeText "Save with encoding-" option, and save with UTF-8.
The odd thing is that this only happening with some PDFs. Others are saving with the correct encoding, but there is no difference in the export process. Is there anything I can check for in the PDF files themselves, or in the export process, to look into this?