Re: Printer_Lib
Posted: Wed Oct 09, 2013 9:18 pm
So it should be Printer_Lib.res?
I changed and did not see any diference
I changed and did not see any diference
Code: Select all
Enumeration
#logo
EndEnumeration
IrsNbr.s = "000001/2013"
IRSheader.s = "Relatório de Assistência nº: " + IrsNbr.s
OPT$ = "ORIENTATION = " + Str(#DMORIENT_PORTRAIT) + ", "
OPT$ + "PAPERSIZE = " + Str(#DMPAPER_A4)
LoadImage(#logo, "AFVCR - logo IRS.png")
If Print_OpenPrinter(Print_GetDefaultPrinter(), OPT$)
Print_Image(#logo, 20, 10, 141, 67)
Print_StartPrinting(IrsNbr.s)
Print_Font("trebuchet ms", 12, #PB_Font_Bold)
Print_SetTextColor(#Black)
Print_Text(100, 10, IRSheader.s)
Print_Font("trebuchet ms", 8)
Print_Text(20, 30, IRSheader.s)
Print_Line(20, 40, 180, 0)
Print_StopPrinting()
Else
MessageRequester("", "no printer available")
EndIf
Code: Select all
Enumeration
#logo
EndEnumeration
IrsNbr.s = "000001/2013"
IRSheader.s = "Relatório de Assistência nº: " + IrsNbr.s
OPT$ = "ORIENTATION = " + Str(#DMORIENT_PORTRAIT) + ", "
OPT$ + "PAPERSIZE = " + Str(#DMPAPER_A4)
UsePNGImageDecoder()
LoadImage(#logo, "AFVCR - logo IRS.png")
If Print_OpenPrinter(Print_GetDefaultPrinter(), OPT$)
Print_Image(#logo, 20, 10, 141, 67)
Print_StartPrinting(IrsNbr.s)
Print_Font("trebuchet ms", 12, #PB_Font_Bold)
Print_SetTextColor(#Black)
Print_Text(100, 10, IRSheader.s)
Print_Font("trebuchet ms", 8)
Print_Text(20, 30, IRSheader.s)
Print_Line(20, 40, 180, 0)
Print_StopPrinting()
Else
MessageRequester("", "no printer available")
EndIf
Code: Select all
Enumeration
#Logo
EndEnumeration
CreateImage(#Logo,533,253,24)
If StartDrawing(ImageOutput(#Logo))
Box(0,0,533,253,RGB(056,180,074))
StopDrawing()
EndIf
sIrsNbr.s = "000001/2013"
sIRSheader.s = "Relatório de Assistência nº: " + sIrsNbr
sOPT.s = "ORIENTATION = " + Str(#DMORIENT_PORTRAIT) + ", "
sOPT + "PAPERSIZE = " + Str(#DMPAPER_A4)
;UsePNGImageDecoder()
;LoadImage(#logo, "AFVCR - logo IRS.png")
If Print_OpenPrinter(Print_GetDefaultPrinter(), sOPT)
Print_StartPrinting(sIrsNbr)
Print_Image(#Logo, 20, 10, 141, 67)
Print_Font("trebuchet ms", 12, #PB_Font_Bold)
Print_SetTextColor(#Black)
Print_Text(100, 10, sIRSheader)
Print_Font("trebuchet ms", 8)
Print_Text(20, 30, sIRSheader)
Print_Line(20, 40, 180, 0)
Print_StopPrinting()
Else
MessageRequester("", "no printer available")
EndIf
It should be ....\Residents\Printer_Lib_Res.resSo it should be Printer_Lib.res?
I don't see a log file either, if I use Print_SetDebug(#True) for the above code.I don't see any log file in the source directory.
Code: Select all
Printer-Lib Version V1.10
PureBasic Version 520
Printer : CutePDF Writer
OpenPrinter_()=1
Print_SetTextAlign(0)
SetTextAlign_(DB211445,0)=0
Print_SetBkMode(1)
SetBkMode_(DB211445,1)=2
Print_SetLineColor(0)
Print_CreatePen(12200,0,0,0,0)
ExtCreatePen_(12200,5,13FF00,0,0)=8F5008C1
Print_CreateBrush(0)
CreateSolidBrush_(0)=BA10140F
Print_CreatePen(12200,0,0,0,0)
ExtCreatePen_(12200,5,13FF08,0,0)=61501AD8
ipprint_Image(0,20,10,141,67,13369376)
IsImage(0)=20379328
UseImage(0)=1627720779
GetDeviceCaps_()=#RC_BITBLT,#RC_BITMAP64,#RC_DI_BITMAP,#RC_DIBTODEV,#RC_STRETCHBLT,#RC_STRETCHDIB
ImageWidth=141
ImageHeight=67
ImageDepth=32
Using #RC_STRETCHBLT method
CreateCompatibleDC_(0)=-1878980415
SelectObject_(-1878980415,1627720779)=25493519
StretchBlt_(-618589115,472,236,3331,1583,-1878980415,0,0,141,67,13369376)=0
ipprint_Line(20,40,200,40)
LineTo_()=1
Might depend on the depth of the tree.mine got saved in the source / exe folder...