Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PDF Generation and Mystery Mania
#23
[Image: pdf-Gen-Test2.jpg]

I think I'm getting the hang of this now


Code: (Select All)

'$Include:'pdfGen.bi'

pdfMediaBox 0, 0, 792, 612
'pdfMediaBox 0, 0, 612, 792
pdfAddPage
'pdfLoadFont "F1", PDF_FONT_TIMES_ROMAN
pdfLoadFont "F1", PDF_FONT_COURIER
pdfSetLeading 11

pdfBeginText
pdfSetFontSize "F1", 11
pdfSetPosition 16, 592


' This bit will be altered to read from a text file

t1$(1) = "A PAT Testing Company                                                                            Tel: 01234 098765"
t1$(2) = "32 Acacia Avenue                                                                                  Fax: 01234 987654"
t1$(3) = "Anothertown                                                                                      www.company.co.uk"
t1$(4) = "A County                                                                                  email sales@company.co.uk"
t1$(5) = "ZX99 1ZX                                                                                                          "
t1$(6) = ""
t1$(7) = "Test Instrument : Seaward Supernova              Serial No : x99-0000                Calibration Date : 05/11/2019"
t1$(8) = "-------------------------------------------------------------------------------------------------------------------"

For i = 1 To 8
    pdfAddText t1$(i)
    pdfNextLine
Next

pdfNextLine
pdfNextLine

' the next 2 lines will vary depending on user input
t2$(1) = "Appliance ID      Tested    Comment                      Vis Earth Ins Load Lkge Lead Flash  User        Result"
t2$(2) = "---------------  ----------  -----------                  --- ----- --- ---- ---- ---- -----  ----        ------"

pdfAddText t2$(1)
pdfNextLine
pdfAddText t2$(2)
pdfNextLine

' There will be a loop here to print the results



pdfEndText

pdfGen "pdfGenTest2.pdf"


Print "FINISHED!!"
'System
'$Include:'pdfGen.bm'
Oh look. A sig line :-)
Reply


Messages In This Thread
PDF Generation and Mystery Mania - by justsomeguy - 03-01-2025, 07:17 PM
RE: PDF Generation and Mystery Mania - by bplus - 03-01-2025, 07:22 PM
RE: PDF Generation and Mystery Mania - by Mad Axeman - 03-08-2025, 11:09 PM



Users browsing this thread: 19 Guest(s)