Submitted by Armando on 2016/03/24 17:54
Trying to build an invoice with IQ but it's not working properly.
 
This used to work (slightly simplified for our purpose) but it doesn't anymore, I get weird chars (see bottom of post):
 
<head>
<META name=GENERATOR content="InfoQube 0.9.70a">
<META charset=UTF-8>
<STYLE> body {font-family:Calibri; font-size:12;}table {font-family:Arial Unicode MS; font-size:12;}
ol, ul { margin: 0.5em 3em;  }
</STYLE>
<style type="text/css">
.auto-style1 {
text-align: center;
}
.auto-style2 {
text-align: left;
}
.auto-style3 {
margin-right: 0px;
}
.auto-style4 {
color: #FFFFFF;
background-color: #000000;
}
.auto-style5 {
font-size: 13pt;
}
</style>
</head>
 
<body>
 
<p>{DataBLK}{ItemBLK}</p>
 
<p>&nbsp;</p>
<p><strong>Xxxxxx Xxxxxx</strong><br />
(123) 123-1234<br />
XXX Av. XXX XXXXX app.Y<br />
ThisPlace, Somewhere<br />
1234567<br />
</p>
<p>&nbsp;</p>
<p class="auto-style1" style="height: 22px; width: 675px"><strong>Facture</strong><br />
</p>
<p class="auto-style1" style="width: 675px">N<sup>o</sup> {InvoiceID}</p>
<p class="auto-style2" style="width: 675px">Date : {Date}</p>
<p class="auto-style2">De : XXXXX XXXXX</p>
<p class="auto-style2"><strong>À :</strong> {Parent.Item}<br />
{Parent.Company}<br />
{Parent.address}</p>
<table class="auto-style3" style="width: 675px">
<tr>
<td style="width: 243px" class="auto-style4">DATES</td>
<td style="width: 229px" class="auto-style4">DESCRIPTION</td>
<td style="width: 375px" class="auto-style4">COÛT</td>
</tr>
<tr>
<td rowspan="4" style="width: 243px">Du : {InvoiceStartDate}<br />
au : {InvoiceEndDate}</td>
<td rowspan="4" style="width: 229px">{Notes}</td>
<td style="width: 375px">{Duration} h<br />
à {HrsRate}/h</td>
</tr>
<tr>
<td style="width: 375px">Sous-total<br />
{InvoiceSubTotal} </td>
</tr>
<tr>
<td style="width: 375px">Taxes<br />
{InvoiceTaxes} </td>
</tr>
<tr>
<td style="width: 375px"><strong>Total</strong><br />
{InvoiceTotal} </td>
</tr>
</table>
<p>&nbsp;</p>
<p>Pour toute question, n'hésitez pas à me contacter.</p>
<p>Merci,</p>
<p>&nbsp;</p>
<p>XXXXXXXXXXXXX</p>
<p>{/ItemBLK}{/DataBLK}</p>
 
</body>
 
</html>
 
 
 
 
I get weird characters for every non english chars that are already in the template + a few weird chars at the top of the page. (Note : non english chars that come from IQ fields are OK.)
 
In the table :
 
At the top of the sheet (nothing should be there):
At the bottom :
 
 
What am I doing wrong? Is it  a bug?
Thanks.
 

Comments

Did you try to view the template in the html page ?
The accented characters I see are not compatible with the directive at the top which says it is utf-8 encoded...
 
Pierre_Admin
IQ Designer
 

Armando

2016/03/24 19:29

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Did you try to view the template in the html page ?
The accented characters I see are not compatible with the directive at the top which says it is utf-8 encoded...
 
Pierre_Admin
IQ Designer
 
[/quote]
 
Thanks Pierre.
But how do I get UTF8 compatible chars? I just typed these chars in an HTML editor, with my keyboard (language : English canada, Canadian French keyboard... which I've always used.).
-
Disclaimer: "Testing IQ with the most advanced/complicated IQBase in the world". I.e. slower than average.
Windows 8.1
CPU: Intel i5 2.6ghz

Armando

2016/03/24 20:53

In reply to by Armando

Thanks  for the tip: I solved my problem by working on the  HTML code in the HTML pane directly. For some reasons, Microsoft Web Expression (what I used to edit my template) seems to encode characters in some other way (don't know which one, yet). I'll have to find to find out why... Maybe it's even something else, like my clipboard manager.
 
-
Disclaimer: "Testing IQ with the most advanced/complicated IQBase in the world". I.e. slower than average.
Windows 8.1
CPU: Intel i5 2.6ghz

Armando

2016/03/24 21:17

In reply to by Armando

Oups, it's not solved. The template created in Microsoft Web opens fine in Chrome. But after it goes through IQ's "printing" process (using a template to give form to field data), weird chars appear... So I'm not sure what to do next.
Can you try creating a French HTML template (like an invoice) and use IQ to create a document?
Thanks 
 
[Edit : so, basically the template opens fine anywhere as is(in IQ, Chrome, etc.), but once it's used to create something meaningful with actual data through the  IQ "printing" process, the French chars are "corrupted".]
 
-
Disclaimer: "Testing IQ with the most advanced/complicated IQBase in the world". I.e. slower than average.
Windows 8.1
CPU: Intel i5 2.6ghz

Pierre_Admin

2016/03/24 23:00

In reply to by Armando

Hi Armando,
 
I took the template you posted here, copied it to a new item (while in code view), switched to normal view, fixed the few accented characters and save it as a file. I then selected a few items with accented characters and did a preview > Merge with a template file and clicked on Save and Preview. The merge file opened just fine...
 
Pierre_Admin
IQ Designer
 

Armando

2016/03/25 00:44

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Hi Armando,
 
I took the template you posted here, copied it to a new item (while in code view), switched to normal view, fixed the few accented characters and save it as a file. I then selected a few items with accented characters and did a preview > Merge with a template file and clicked on Save and Preview. The merge file opened just fine...
 
Pierre_Admin
IQ Designer
 
[/quote]
 
I did exactly that and it doesn't work.
 
-Copy HTML code
- Paste it in the HTML pane as code in "HTML code" view
- Switched to normal view and noticed that formatting was wrong, which is weird -- seems like the pane doesn't interpret HTML perfectly?? --, and corrected  the bad chars anyway (they do appear when pasting the code from elsewhere, but not when the template/file is directly opened  from the pane -- not pasted)
- Saved it as a new file.
- Then Selected an invoice to merge its data with  it
 
--> got even more bad chars (e.g. even the data from IQ fields Is all corrupted) + formatting is wrong...
 
 
 I noticed that the HMTL pane modifies my original code: many META tags are removed, CSS styles are removed and other things it seems.
 
The thing is that the HTML template alone opens fine in IQ, chrome, etc. It's perfectly fine. But as soon as it's merged with data, chars get "corrupted".
 
 
 
-
Disclaimer: "Testing IQ with the most advanced/complicated IQBase in the world". I.e. slower than average.
Windows 8.1
CPU: Intel i5 2.6ghz