User Tools

Site Tools


creating_20pdf_20files

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
creating_20pdf_20files [2018/03/31 13:19] – external edit 127.0.0.1creating_20pdf_20files [2024/01/05 00:22] (current) – external edit 127.0.0.1
Line 20: Line 20:
   * [[http://www.go2pdf.com/products.html|Virtual PDF Printer]] ($90)   * [[http://www.go2pdf.com/products.html|Virtual PDF Printer]] ($90)
 \\  The approximate prices are given in US$ and are believed to be correct at the time of writing. In some cases more expensive enhanced or 'professional' versions are also available. I have received recommendations from users for **CutePDF** and **doPDF** (make sure you download the [[http://www.dopdf.com/download/setup/dopdf.exe|latest version]] of the latter).\\ \\  If you use such a program to create a PDF file from your BBC BASIC program there is one small problem - each individual page will come out as a separate document! This happens because traditional BBC BASIC programs (e.g. as written for the BBC Micro or Acorn Archimedes) have no way of indicating the end of the **document**, only the end of a **page**. Therefore //BBC BASIC for Windows// closes the current 'document' at the end of each page and opens a new 'document' at the start of the next page. This isn't apparent when outputting to a real printer, but is when creating a PDF.\\ \\  This is easily solved by replacing the code which you would normally use to indicate the end of a printed page (typically **VDU 2,1,12,3**) with the following code:\\ \\  \\  The approximate prices are given in US$ and are believed to be correct at the time of writing. In some cases more expensive enhanced or 'professional' versions are also available. I have received recommendations from users for **CutePDF** and **doPDF** (make sure you download the [[http://www.dopdf.com/download/setup/dopdf.exe|latest version]] of the latter).\\ \\  If you use such a program to create a PDF file from your BBC BASIC program there is one small problem - each individual page will come out as a separate document! This happens because traditional BBC BASIC programs (e.g. as written for the BBC Micro or Acorn Archimedes) have no way of indicating the end of the **document**, only the end of a **page**. Therefore //BBC BASIC for Windows// closes the current 'document' at the end of each page and opens a new 'document' at the start of the next page. This isn't apparent when outputting to a real printer, but is when creating a PDF.\\ \\  This is easily solved by replacing the code which you would normally use to indicate the end of a printed page (typically **VDU 2,1,12,3**) with the following code:\\ \\ 
 +<code bb4w>
         SYS "EndPage", @prthdc%         SYS "EndPage", @prthdc%
         SYS "StartPage", @prthdc%         SYS "StartPage", @prthdc%
         VDU 2,1,30,3         VDU 2,1,30,3
 +</code>
 To close the document, after all the pages have been output, send a **VDU 2,1,12,3** as usual. To close the document, after all the pages have been output, send a **VDU 2,1,12,3** as usual.
creating_20pdf_20files.1522502353.txt.gz · Last modified: 2024/01/05 00:18 (external edit)