=====Creating PDF files===== //by Richard Russell, October 2007//\\ \\ A popular method for creating a **PDF** (Portable Document Format) file from a Windows application is to use a 'PDF Printer Driver' (or 'Virtual Printer'). This installs like an ordinary printer but rather than outputting to paper it creates a PDF file. There are many such products including:\\ \\ * [[http://sourceforge.net/projects/pdfcreator/|PDF Creator]] (GPL) * [[http://www.bullzip.com/products/pdf/info.php|BullZip PDF Printer]] (Freeware) * [[http://www.cutepdf.com/Products/CutePDF/writer.asp|CutePDF Writer]] (Freeware) * [[http://www.dopdf.com/|doPDF]] (Freeware) * [[http://www.pdf24.org/en/pdf24-creator.htm|PDF24 Creator]] (Freeware) * [[http://www.neevia.com/products/dplt/|Neevia docuPrinter LT]] ($19) * [[http://www.reasoft.com/products/pdfprinter/|ReaSoft PDF Printer]] ($25) * [[http://www.gnostice.com/print2edocOverview.asp|Gnostice Print2eDoc]] ($29) * [[http://www.colorpilot.com/pdfprinterpilot.html|PDF Printer Pilot]] ($29) * [[http://www.soliddocuments.com/products.htm?product=SolidPDFCreator|Solid PDF Creator]] ($29.95) * [[http://www.verypdf.com/pdfcamp/pdfcamp.htm|PDFcamp]] ($30) * [[http://www.polestarsoft.com/|Polestar Virtual Printer]] ($30) * [[http://www.visagesoft.com/easypdf/|eXPert PDF]] ($72) * [[http://www.broadgun-software.com/|pdfMachine]] ($84) * [[http://www.getpdf.com/getpdf.html|GetPDF]] ($89) * [[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:\\ \\ SYS "EndPage", @prthdc% SYS "StartPage", @prthdc% VDU 2,1,30,3 To close the document, after all the pages have been output, send a **VDU 2,1,12,3** as usual.