Hi Everyone,
I have this project I am working on. Its just printing on various
custom sizes of pre-formated paper certificates, over 60 of them.
My job is to print the Name, BirthDate, StartDate, etc on these pre-formerted
forms.
The issue now is that when I print x-axis measurement always comes short with about 1 inch.
The Y-axis measure just fine.
Has anyone come across this issues? Any pointers would be appreciated.
Best regards,
I have this project I am working on. Its just printing on various
custom sizes of pre-formated paper certificates, over 60 of them.
My job is to print the Name, BirthDate, StartDate, etc on these pre-formerted
forms.
The issue now is that when I print x-axis measurement always comes short with about 1 inch.
The Y-axis measure just fine.
Code:
Method ReportCertificateOfCompetencyInBanksmanSlinger(ByVal nCbHndl As Long) As Long Local LineSpacing!,iHandle%,Row!,TopMargin!,PageSize!,PageNumber& Local detailline As Asciiz * 200 Local sBatchNo As String Local hpix As Long Local sTempImageFile As String LineSpacing = .2 TopMargin = .5 PAGESIZE = 8.25 ihandle% = dpStartDoc(0,"Mega-Net CharkinERP - Print Certificate of Competency in Banksman/Slinger","",%DDOC_INCH, _ %DDOC_PAPER_CUSTOM, %DDOC_PORTRAIT, %DDOC_SYSTEM_DEFAULT, %DDOC_BIN_AUTO Or %DDOC_ALLOWSMTP Or %DDOC_ALLOWSAVE Or %DDOC_ZOOMFIT) If ihandle < 1 Then MsgBox "Could not StartDoc. Error number" + Str$(Ihandle),,FuncName$ Exit Method End If dpPaperSize iHandle%, 5.9,8.25 ROW = PAGESIZE 'force new heading ReportsInformation() sBatchNo = VD_GetText(nCbHndl, %ID_FRMCERTIFICATEOFCOMPETENCYINRIGGINGSLINGERRPTDLG_TXTBATCHNO) slSEL "SELECT * FROM tblDPRRegistration WHERE BatchNo = '" + sBatchNo + "'" Do While slGetRow() sTempImageFile=GuidTxt$(Guid$) + ".jpg" 'change 2 slPutFile sTempImageFile, slFN("Picture"), "C" '25th column 'change 3 If ROW => PAGESIZE Then If PageNumber Then 'If first page don't need a new page dpNewPage iHandle%, %DDOC_PAPER_CUSTOM, %DDOC_PORTRAIT, %DDOC_BIN_AUTO End If Incr PageNumber dpText IHandle%, 4.3,1.5, %DDOC_LEFT, "" + slFN("CertificateNo") dpFont ihandle%, %DDOC_FONTNORMAL + %DDOC_FONTBOLD, 20, %vbBlack, "Arial" dpText IHandle%, 3.0, 3.0, %DDOC_CENTER, "" + slFN("FirstName") & " " & slFN("Surname") & " " & slFN("Othernames") dpFont ihandle%, %DDOC_FONTNORMAL + %DDOC_FONTBOLD, 12, %vbBlack, "Arial" dpText IHandle%, 4.2,3.4, %DDOC_LEFT, "" + NigeriaDate(slFN("BirthDate")) dpText IHandle%, 1.6,5.55, %DDOC_LEFT, "" + NigeriaDate(slFN("CourseStartDate")) dpText IHandle%, 3.1,5.55, %DDOC_LEFT, "" + NigeriaDate(slFN("CourseEndDate")) dpText IHandle%, 2.5,6.1, %DDOC_LEFT, "" + NigeriaDate(slFN("CourseEndDate")) hpix = dpAddGraphic(ihandle%, sTempImageFile+$Nul) Kill sTempImageFile 'change 5 If hpix Then dpDrawGraphic ihandle%, hpix,4.5,5.2,5.5,6.5 Else ? "image not found",%MB_SYSTEMMODAL,Exe.Name$ End If ROW = ROW + LineSpacing * 2 End If ROW = ROW + LineSpacing 'increment line counter Loop dpEndDoc iHandle%, %DDOC_END_VIEW + %DDOC_END_PRINT End Method
Best regards,
Comment