Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
posprintdll
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yunpeng.song
posprintdll
Commits
b206e195
Commit
b206e195
authored
Oct 19, 2018
by
yunpeng.song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加打印图片功能
parent
79266932
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
16 deletions
+31
-16
LoadDll.cpp
+22
-16
LoadDll.h
+2
-0
fmposdll.cpp
+6
-0
fmsdll.def
+1
-0
No files found.
LoadDll.cpp
View file @
b206e195
...
...
@@ -700,20 +700,6 @@ bool _LoadPosdll(void)
BPLA_PrintMaxiEx
=
(
mBPLA_PrintMaxiEx
)
GetProcAddress
(
g_bplaLog
,
"BPLA_PrintMaxiEx"
);
POS_S_DownloadAndPrintBmp
VC_POS_S_DownloadAndPrintBmp
=
NULL
;
POS_S_PrintBmpInRAM
VC_POS_S_PrintBmpInRAM
=
NULL
;
POS_S_PrintBmpInFlash
VC_POS_S_PrintBmpInFlash
=
NULL
;
POS_S_SetBarcode
VC_POS_S_SetBarcode
=
NULL
;
POS_S_SetAlignMode
VC_POS_S_SetAlignMode
=
NULL
;
/*******只支持页打印模式(P)或标签打印模式(L)的函数*******/
POS_PL_SetArea
VC_POS_PL_SetArea
=
NULL
;
POS_PL_TextOut
VC_POS_PL_TextOut
=
NULL
;
if
(
BPLA_PrintMaxiEx
==
NULL
)
{
return
false
;
...
...
@@ -1206,7 +1192,7 @@ bool _UnloadLogdll(void)
return
false
;
}
FreeLibrary
(
g_hLog
);
VC_Log_WriteLog
(
1
,
"%s"
,
"LogDLL卸载完成"
);
//
VC_Log_WriteLog(1,"%s","LogDLL卸载完成");
return
true
;
}
...
...
@@ -1844,7 +1830,8 @@ void GetProfilePath(char *CONFIGFILE)
ptrlen
=
ptr
-
path
;
memcpy
(
&
path
[
ptrlen
+
1
],
"printer.ini"
,
12
);
path
[
ptrlen
+
12
]
=
0
;
strcpy_s
(
CONFIGFILE
,(
size_t
)
strlen
(
CONFIGFILE
),
path
);
strcpy_s
(
CONFIGFILE
,
256
,
path
);
//strcpy(CONFIGFILE,path);
printf
(
"配置文件路径: %s
\n
"
,
CONFIGFILE
);
}
...
...
@@ -2383,4 +2370,22 @@ void _CloseDoc()
void
_FreeLine
()
{
VC_POS_FeedLine
();
}
bool
_PrintBmp
(
char
pszPath
[],
int
nOrgx
,
int
nMode
,
int
alignMode
)
{
VC_Log_WriteLog
(
1
,
"图片路径: %s %d"
,
pszPath
,
alignMode
);
VC_POS_S_SetAlignMode
(
alignMode
);
int
result
=
VC_POS_S_DownloadAndPrintBmp
(
pszPath
,
nOrgx
,
nMode
);
if
(
result
==
POS_SUCCESS
)
{
VC_Log_WriteLog
(
1
,
"打印图片成功"
);
VC_POS_FeedLine
();
return
true
;
}
else
{
VC_Log_WriteLog
(
1
,
"打印图片失败 %d "
,
result
);
return
false
;
}
}
\ No newline at end of file
LoadDll.h
View file @
b206e195
...
...
@@ -392,6 +392,8 @@ bool _PrintLine(char data[], int fontType,int fontStyle ,int width,int height,in
bool
_PrintBarCode
(
char
data
[],
int
type
,
int
leftMargin
,
int
fontType
,
int
width
,
int
height
,
int
position
);
//打印条码
bool
_PrintQRCode
(
char
data
[],
int
type
,
int
leftMargin
,
int
width
);
//打印行
bool
_PrintBmp
(
char
pszPath
[],
int
nOrgx
,
int
nMode
,
int
alignMode
);
void
_FreeLine
();
void
_InPrint2dcode
(
char
data
[]);
void
OnClosePort
();
...
...
fmposdll.cpp
View file @
b206e195
...
...
@@ -178,3 +178,9 @@ extern "C" bool __declspec(dllexport)PrintQRCode(char data[], int type, int lef
return
_PrintQRCode
(
data
,
type
,
leftMargin
,
width
);
//打印行
}
extern
"C"
bool
__declspec
(
dllexport
)
PrintBmp
(
char
pszPath
[],
int
nOrgx
,
int
nMode
,
int
alignMode
)
{
VC_Log_WriteLog
(
1
,
pszPath
);
return
_PrintBmp
(
pszPath
,
nOrgx
,
nMode
,
alignMode
);
//打印图片
}
fmsdll.def
View file @
b206e195
...
...
@@ -14,3 +14,4 @@ EXPORTS
TSCWinPrintln @12
TSCWinPrintPage @13
TSCInit @14
PrintBmp @15
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment