WOSA/XFS PTR Form解析库—头文件
class AFX_EX_CLASS CNuXfsForm {
public:
CNuXfsForm();
~CNuXfsForm();
/******************************************************************************
Function:
Set parsing Form related parameters.
Input parameters:
1.lpszFormDir:Form file directory
2.lpszFormFileStr: Vertical line split file type (support access subdirectory)
The format is as follows:
*.form|*.wfm|*.xfs|form*.form|form*.wfm|form*.xfs
3.lpszFormKeySetStr: The requirement of the comma division in English is to parse the Form attribute
The format is as follows:
UNIT,POINTSIZE,ALIGNMENT,ORIENTATION,SKEW,VERSION,LANGUAGE,CPI,LPI,SIZE,COPYRIGHT,TITLE,COMMENT,USERPROMPT
4.lpszFieldKeySetStr: the requirement of the comma division in English is to parse the Field attribute
The format is as follows:
POSITION,FOLLOWS,HEADER,FOOTER,SIDE,SIZE,INDEX,TYPE,SCALING,BARCODE,COERCIVITY,CLASS,ACCESS,OVERFLOW,STYLE,CASE,HORIZONTAL,VERTICAL,COLOR,RGBCOLOR,LANGUAGE,FONT,POINTSIZE,CPI,LPI,FORMAT,INITIALVALUE
5.bCheckValidList: Check formlist or medialist is valid when load
6.bWriteFormLog: Write form log when query form or media
Output parameters:
None
Return Value
0:Success
others:WFS_ERR_PTR_...
******************************************************************************/
int NUFRM_SetFormParams(
LPSTR lpszFormDir
, LPSTR lpszFormFileStr
, LPSTR lpszFormKeySetStr
, LPSTR lpszFieldKeySetStr
, bool bCheckValidList = false
, bool bWriteFormLog = false);
/******************************************************************************
Function:
Get the list of forms available on the device..
Input parameters:
None
Output parameters:
1.lpszFormList: Form list
2.lpNumItems: Forms count
Return Value
0:Success
others:WFS_ERR_PTR_...
******************************************************************************/
int NUFRM_PtrInfFormList(
LPSTR lpszFormList
, int *lpNumItems);
/******************************************************************************
Function:
Get the list of medias available on the device..
Input parameters:
None
Output parameters:
1.lpszMediaList: Media list
2.pNumItems: Medias count
Return Value
0:Success
others:WFS_ERR_PTR_...
******************************************************************************/
int NUFRM_PtrInfMediaList(
LPSTR lpszMediaList
, int *lpNumItems);
/******************************************************************************
Function:
Gets the detailed description of the specified form.
Input parameters:
1.lpszFormName:Specified form name(NULL,empty,string)
Output parameters:
1.lpHeader: Form info
2.lpNumFields :Form fields count
Return Value
0:Success
-1:WFS_ERR_PTR_...
******************************************************************************/
int NUFRM_PtrInfQueryForm(
LPSTR lpszFormName
, LPWFSFRMHEADER lpHeader
, int *lpNumFields);
/******************************************************************************
Function:
Gets the detailed description of the specified media.
Input parameters:
1.lpszMediaName:Specified media name(NULL,empty,string)
Output parameters:
1.lpMedia: Media info
Return Value
0:Success
others:WFS_ERR_PTR_...
******************************************************************************/
int NUFRM_PtrInfQueryMedia(
LPSTR lpszMediaName
, LPWFSFRMMEDIA lpMedia);
/******************************************************************************
Function:
Gets detailed information about a single or all field description on the specified form.
Input parameters:
1.lpQueryField:A single or all field on the specified form(NULL,empty,string)
Output parameters:
1.lppFields: Form fields info
Return Value
0:Success
others:WFS_ERR_PTR_...
******************************************************************************/
int NUFRM_PtrInfQueryField(
LPWFSPTRQUERYFIELD lpQueryField
, LPWFSFRMFIELD *lppFields);
/******************************************************************************
Function:
Gets the structured definition information for the form specified for printing.
Input parameters:
1.lpPrintForm:Specified media name(NULL,empty,string)
2.bSortPosition: Whether or not to sort the position
Output parameters:
1.lpPtrForm: Generated structured Form definition information
2.lpPtrMedia: Generated structured Media definition information
Return Value
0:Success
others:WFS_ERR_PTR_...
******************************************************************************/
int NUFRM_PtrCmdPrintForm(
LPWFSPTRPRINTFORM lpPrintForm
, LPWFSPTRFORM lpPtrForm
, LPWFSPTRMEDIA lpPtrMedia
, bool bSortPosition = false);
/******************************************************************************
Function:
Gets the structured definition information for the form specified for printing.
Input parameters:
1.lpReadForm: Specify a form to limit read information(NULL,empty,string)
Output parameters:
1.lpPtrForm: Generated structured Form definition information
2.lpPtrMedia: Generated structured Media definition information
Return Value
0:Success
others:WFS_ERR_PTR_...
******************************************************************************/
int NUFRM_PtrCmdReadForm(
LPWFSPTRREADFORM lpReadForm
, LPWFSPTRFORM lpPtrForm
, LPWFSPTRMEDIA lpPtrMedia);
CNuLog *m_pLog = NULL;
char m_szFormDir[256];
/******************************************************************************
Extra:
******************************************************************************/
int NUFRM_GetPTRFormInfo(
LPSTR lpszFileName
, LPSTR lpszFormName
, LPWFSPTRFORM lpPtrForm
, bool bSortPosition = false);
int NUFRM_GetPTRMediaInfo(
LPSTR lpszFileName
, LPSTR lpszMediaName
, LPWFSPTRMEDIA lpPtrMedia);
int NUFRM_GetPTRFormListField(
LPWFSPTRPRINTFORM lpPrintForm
, LPWFSPTRFORM lpPtrForm
, std::vector<WFSPTRFIELDKEYINDEXVALUE> &listField);
int NUFRM_PTRPrintDoc(
LPWFSPTRPRINTFORM lpPrintForm
, LPWFSPTRFORM lpPtrForm
, LPWFSPTRMEDIA lpPtrMedia
, LPSTR lpszPrinterName
, LPSTR lpszDefaultFont
, float fDefalutPointSize = 10.5f);
int NUFRM_PTRGenerateImage(
LPWFSPTRPRINTFORM lpPrintForm
, LPWFSPTRFORM lpPtrForm
, LPWFSPTRMEDIA lpPtrMedia
, LPSTR lpszCreateFileName
, LPSTR lpszDefaultFont
, float fDefalutPointSize = 10.5f
, int nXmm = 0
, int nYmm = 0
, float fPixScale = 1.0);
};
typedef CNuXfsForm* (__cdecl *CNUXFSFORM)(CNuLog *pLog, char *pcExtra, DWORD dwExtra);
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· winform 绘制太阳,地球,月球 运作规律
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 上周热点回顾(3.3-3.9)