Re: Printer_Lib
Posted: Thu Oct 10, 2013 11:19 am
The log file is only needed in case of problems anyway... Any location will be good as long we know where it is
Code: Select all
StretchBlt_(-618589115,472,236,3331,1583,-1878980415,0,0,141,67,13369376)=0
Code: Select all
Printer-Lib Version V1.10
PureBasic Version 520
Printer : PDF-XChange Printer 2012
OpenPrinter_()=1
Print_SetTextAlign(0)
SetTextAlign_(5E216176,0)=0
Print_SetBkMode(1)
SetBkMode_(5E216176,1)=2
Print_SetLineColor(0)
Print_CreatePen(12200,0,0,0,0)
ExtCreatePen_(12200,2,18FEF8,0,0)=4E506432
Print_CreateBrush(0)
CreateSolidBrush_(0)=C510467B
Print_CreatePen(12200,0,0,0,0)
ExtCreatePen_(12200,2,18FF00,0,0)=EB5016A6
ipprint_Image(0,20,10,141,67,13369376)
IsImage(0)=32338848
UseImage(0)=-1140505175
GetDeviceCaps_()=#RC_BITBLT,#RC_BITMAP64,#RC_DI_BITMAP,#RC_DIBTODEV,#RC_STRETCHBLT,#RC_STRETCHDIB
ImageWidth=533
ImageHeight=253
ImageDepth=32
Using #RC_STRETCHBLT method
CreateCompatibleDC_(0)=453075751
SelectObject_(453075751,-1140505175)=25493519
StretchBlt_(1579245942,236,118,1665,791,453075751,0,0,533,253,13369376)=1
ipprint_Line(20,40,200,40)
LineTo_()=1
MSDN wrote:Remarks
StretchBlt stretches or compresses the source bitmap in memory and then copies the result to the destination rectangle. This bitmap can be either a compatible bitmap (DDB) or the output from CreateDIBSection. The color data for pattern or destination pixels is merged after the stretching or compression occurs.
When an enhanced metafile is being recorded, an error occurs (and the function returns FALSE) if the source device context identifies an enhanced-metafile device context.
If the specified raster operation requires a brush, the system uses the brush currently selected into the destination device context.
The destination coordinates are transformed by using the transformation currently specified for the destination device context; the source coordinates are transformed by using the transformation currently specified for the source device context.
If the source transformation has a rotation or shear, an error occurs.
Code: Select all
Printer-Lib Version V1.10
PureBasic Version 520
Printer : doPDF v7
OpenPrinter_()=1
Print_SetTextAlign(0)
SetTextAlign_(56211922,0)=0
Print_SetBkMode(1)
SetBkMode_(56211922,1)=2
Print_SetLineColor(0)
Print_CreatePen(12200,0,0,0,0)
ExtCreatePen_(12200,2,13FF00,0,0)=40500E28
Print_CreateBrush(0)
CreateSolidBrush_(0)=BC10062C
Print_CreatePen(12200,0,0,0,0)
ExtCreatePen_(12200,2,13FF08,0,0)=3C5013D3
ipprint_Image(0,20,10,141,67,13369376)
IsImage(0)=19461824
UseImage(0)=-989524775
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)=1090588200
SelectObject_(1090588200,-989524775)=25493519
StretchBlt_(1445009698,236,118,1665,791,1090588200,0,0,141,67,13369376)=0
ipprint_Line(20,40,200,40)
LineTo_()=1
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)
Print_SetDebug(#True)
UsePNGImageDecoder()
LoadImage(#logo, "AFVCR - logo IRS.png")
If Print_OpenPrinter(Print_GetDefaultPrinter(), OPT$)
Print_Image(#logo, 20, 10, 37, 17)
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)
Print_SetDebug(#True)
UsePNGImageDecoder()
LoadImage(#logo, "AFVCR - logo IRS.png")
If Print_OpenPrinter(Print_GetDefaultPrinter(), OPT$)
;Print_Image(#logo, 20, 10, 37, 17) ; < - Wrong / will be ignored and not printed !!!
If Print_StartPrinting(IrsNbr.s)
Print_Image(#logo, 20, 10, 37, 17) ; < - Belongs here
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()
EndIf
Else
MessageRequester("", "no printer available")
EndIf
Thank You guys... For nowEnumeration
#logo
EndEnumeration
IrsNbr.s = "000002/2013"
IRSheader.s = "Relatório de Assistência nº: " + IrsNbr.s
OPT$ = "ORIENTATION = " + Str(#DMORIENT_PORTRAIT) + ", "
OPT$ + "PAPERSIZE = " + Str(#DMPAPER_A4)
Print_SetDebug(#True)
UsePNGImageDecoder()
LoadImage(#logo, "AFVCR - logo IRS.png")
If Print_OpenPrinter(Print_GetDefaultPrinter(), OPT$)
Print_StartPrinting(IrsNbr.s) < -- This line was after the print image command
Print_Image(#logo, 20, 10, 37, 17)
Print_Font("trebuchet ms", 12, #PB_Font_Bold)
Print_SetTextColor(#Black)
Print_Text(100, 10, IRSheader.s)
Print_Font("trebuchet ms",
Print_Text(20, 30, IRSheader.s)
Print_Line(20, 40, 180, 0)
Print_StopPrinting()
Else
MessageRequester("", "no printer available")
EndIf