NReco PhantomJs with arabic characters - phantomjs

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" />

Related

wkhtmltopdf not printing ℃ in pdf

I'm converting html to pdf using wkhtmltopdf. wkhtmltopdf not printing ℃ (&#x2103) 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.

WebStorm HTML files are showing TypeScript errors for HTML elements

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)

Trouble displaying test results in browser with Mocha, Chai, and webdriver.io

I am using Webdriver.io with Mocha and Chai. I've written several tests that work great from the command line. It opens the Chrome browser, runs the tests, and displays the resultsin the command line. However I am having issues getting the results of the tests to display in the browser view (have a presentation that I would like to show the tests in the browser view). I'm using the mocha html template for viewing tests in the browser, but it only displays "passes: 0failures: 0duration: 0s" in the upper right. I've copied the html file to the first file in my testing structure and changed the paths to the js and css files. I don't see anything in here that references webdriver.io, is that the missing piece?
<!DOCTYPE html>
<html>
<head>
<title>Mocha</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./node_modules/mocha/mocha.css" />
</head>
<body>
<div id="mocha"></div>
<script src="./node_modules/mocha/mocha.js"></script>
<script src="./node_modules/chai/chai.js"></script>
<script>mocha.setup('bdd');</script>
<script src="./test/specs/createNewProduct.js"></script>
<script>
mocha.run();
</script>
</body>
</html>
I'm opening the file by right clicking on it and opening with Chrome.
Hi I am not clear understand what you want to achieve. But have look to https://github.com/webdriverio-boneyard/wdio-allure-reporter
It is generate beautiful reports for wdio

Link to a html file within a repository from trac wiki

I am attempting to link from my wiki to web documentation within the source repository. This functionality I think is provided by using "export" links, e.g.
[export:path/to/file/index.html]
(after setting [browser] render_unsafe_content = yes)
However, when I do this I get the following browser error:
This page contains the following errors:
error on line 17 at column 10: Opening and ending tag mismatch: link line 0 and head
Below is a rendering of the page up to the first error.
(followed by a small snippet of the html page I'm trying to display).
I'm using trac v 1.1.
(see also this related question: How to link to html file in Trac)
UPDATE:
It seems using export does work with other html files, specifically, there's no problem with an xhtml document starting:
<!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>
but I am seeing issues with a (valid) html5 document starting:
<!DOCTYPE html>
<html lang="en">
<head>
which I think trac is attempting to parse as xml and then failing.
To create a hyperlink to a file within your repository you can simply use the following wiki syntax:
[browser:<path> <label>]
Where path is the path to the file within your repository and label is the text to be displayed for the link.

Exporting PDF > HTML with Acrobat Pro, all special chars showing ? despite apparent UTF-8 encoding.

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?