Hand-coded PDF file
<p>My aim is to write directly the output of my program into a PDF file which is hand-coded. I found this nice tutorial and:</p>

<p><a href="https://brendanzagaeski.appspot.com/0004.html" rel="nofollow">https://brendanzagaeski.appspot.com/0004.html</a></p>

<p>However, it is not possible to display extended ASCII characters/symbols, e.g., ASCII codes 179, ..., 218. I think that the issue arises within the third object (3 0 obj).</p>

<p>Note also that Courier New is used as a font type instead of Times-Roman. Moreover, when I close the PDF file Adobe Reader asks always if I want to save the changes?</p>

<p>To be more precise, the hand-coded PDF Looks like:</p>

<pre><code>%PDF-1.7  
%Ñ€Ô  

1 0 obj  
&lt;&lt;/Type/Catalog/Type/Catalog/Pages 2 0 R&gt;&gt;  
endobj  

2 0 obj  
&lt;&lt;/Type/Pages/Kids [3 0 R]/Count 1/MediaBox [0 0 937 280]&gt;&gt;  
endobj  

3 0 obj  
&lt;&lt;/Type/Page/Parent 2 0 R/Resources&lt;&lt;/Font&lt;&lt;/F1&lt;&lt;/Type/Font/Subtype/Type1/BaseFont/CourierNew&gt;&gt;&gt;&gt;&gt;&gt;/Contents 4 0 R&gt;&gt;  
endobj  

4 0 obj  
&lt;&lt; /Length 153 &gt;&gt;  
stream  
BT/F1 12 Tf 0 266 Td (Here, I want to display extended ASCII-Codes, e.g. code 205. bla bla bla) Tj ET  

endstream  
endobj  

xref  
0 5  
0000000000 65535 f  
0000000015 00000 n  
0000000074 00000 n  
0000000150 00000 n  
0000000283 00000 n  
trailer  
  &lt;&lt;/Root 1 0 R/Size 5&gt;&gt;  
startxref  
338  
%%EOF
</code></pre>

<p>Has anybody a solution? Thanks.</p>