Hi,
I'm using Ruby to pass the following html directly to Prince using stdin:-
However, the output .pdf always includes some strange control (Â) characters:
If I pipe the html in to Prince directly from the command line using the following command:
The resulting PDF is correct:-
Obviously this is a Ruby issue, but I would be grateful if anybody can shed some light on the cause of the problem.
Best Regards,
Carl
I'm using Ruby to pass the following html directly to Prince using stdin:-
<div class="code panel" style="border-style: solid;border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>FTP Policy with retry tags</b></div>
<div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag"><ftpDelivery host='10.1.3.43' port='990' username='espftp' passphrase='lexicon' directory='/' retry-times='5' retry-interval='3'></span>
<span class="code-tag"><connectionTimeout></span>60<span class="code-tag"></connectionTimeout></span>
<span class="code-tag"><transferMode></span>passive<span class="code-tag"></transferMode></span>
<span class="code-tag"><transferType></span>binary<span class="code-tag"></transferType></span>
<span class="code-tag"><verify></span>false<span class="code-tag"></verify></span>
<span class="code-tag"><sslAccept></span>auto<span class="code-tag"></sslAccept></span>
<span class="code-tag"></ftpDelivery></span></pre>
</div>
</div>
However, the output .pdf always includes some strange control (Â) characters:
<ftpDelivery host='10.1.3.43' port='990' username='espftp' passphrase='lexicon' Â Â <connectionTimeout>60</connectionTimeout>
  <transferMode>passive</transferMode>
  <transferType>binary</transferType>
  <verify>false</verify>
  <sslAccept>auto</sslAccept>
</ftpDelivery>
If I pipe the html in to Prince directly from the command line using the following command:
echo '<div class="code panel" style="border-style: solid;border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>FTP Policy with retry tags</b></div>
<div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag"><ftpDelivery host='10.1.3.43' port='990' username='espftp' passphrase='lexicon' directory='/' retry-times='5' retry-interval='3'></span>
<span class="code-tag"><connectionTimeout></span>60<span class="code-tag"></connectionTimeout></span>
<span class="code-tag"><transferMode></span>passive<span class="code-tag"></transferMode></span>
<span class="code-tag"><transferType></span>binary<span class="code-tag"></transferType></span>
<span class="code-tag"><verify></span>false<span class="code-tag"></verify></span>
<span class="code-tag"><sslAccept></span>auto<span class="code-tag"></sslAccept></span>
<span class="code-tag"></ftpDelivery></span></pre>
</div>
</div>' | prince - -i html -o out.pdf
The resulting PDF is correct:-
<ftpDelivery host=10.1.3.43 port=990 username=espftp passphrase=lexicon directory=/ <connectionTimeout>60</connectionTimeout>
<transferMode>passive</transferMode>
<transferType>binary</transferType>
<verify>false</verify>
<sslAccept>auto</sslAccept>
</ftpDelivery>
Obviously this is a Ruby issue, but I would be grateful if anybody can shed some light on the cause of the problem.
Best Regards,
Carl