Moderator: IDEAL Software Support
IDEAL Software Support wrote:... I might be wrong, but as far as I remember you just need to set the PageHeight and PageWidth properties (NOT the DevPaperHeight/-Width properties!) and there you go. Since this a few years ago, please let us know if this helps.
IDEAL Software Support wrote:...Setting PRINT_NO_AUTO_PAGE_DIMS causes that the properties PageHeight and PageWidth are without function for printing. In this case this would be counterproductive.
IDEAL Software Support wrote:...I might be wrong, but as far as I remember you just need to set the PageHeight and PageWidth properties (NOT the DevPaperHeight/-Width properties!) and there you go. Since this a few years ago, please let us know if this helps.
#DEFINE V3 .F.
#IF V3
    #INCLUDE VPE3.H
    #DEFINE VUNIT_FACTOR_MM10 -1  && just a DUMMY-Constant not used in VPE3
    m.lcPRS    = "EPSON_TM-T88IV_RECEIPT3.PRS"
#ELSE
    #INCLUDE VPE.H
    m.lcPRS    = "EPSON_TM-T88IV_RECEIPT6.PRS"
#ENDIF
m.lcDevice       = "EPSON TM-T88IV Receipt"
m.lnVSpacing   = 500   &&  5cm vertical spacing between lines
m.lnDrawLines = 7     &&  seven lines with a 5cm spacing
#IF V3
   with m.oForm.oVPE
#ELSE
   with m.oForm2.oVPE
#ENDIF
   if .isOpen()
      .closeDoc()
   endif
   
   .openDoc()
   *-- not in V.3
   if .VPEVersion >= 5
      .UnitTransformation = VUNIT_FACTOR_MM10
   endif
   
   .SetupPrinter(m.lcPRS,2)          && Force printer to show dialog
   *.Device       = m.lcDevice    && or alternatively set Device without SetupPrinter(..)
   .PageHeight    = 4000             && Optionally try to force PageHeight/width to specific dimensions
   .PageWidth     = 800
   .nLeftMargin    = 40                && Set margins
   .nRightMargin   = .PageWidth - .nLeftMargin
   .nTopMargin     = 0
   .nBottomMargin   = .PageHeight
       
   .VPEWrite(50, 200, VFREE, VFREE, "Testreport")
   .VPEWrite(50, VBOTTOM, VFREE, VFREE, "PageHeight: "+trans(.pageHeight))
   .VPEWrite(50, VBOTTOM, VFREE, VFREE, "PageWidth: "+trans(.pageWidth))
   .VPEWrite(50, VBOTTOM, VFREE, VFREE, "VPE-Version: "+trans(.VPEVersion))
   
   m.lnTop = 0
   for m.lnI = 1 to 7
      m.lnTop = m.lnTop + m.lnVSpacing
      .Line(VLEFTMARGIN, m.lnTop, -300, m.lnTop)
      .Line(.nRightMargin-300, m.lnTop, .nRightMargin, m.lnTop)
      .TextAlignment = ALIGN_CENTER
      .Write(.nLeftMargin+300, lnTop-20, .nRightMargin-300, VFREE, trans(round(m.lnTop/100,2)))
   endfor &&* m.lnI = 1 to 10
   .PrintDoc(.F.)
endwith
IDEAL Software Support wrote:First of all, to make sure there are no side-effects, remove the call to SetupPrinter().
   hDoc = ::VpeOpenDoc(hwnd, "Sample Application", VPE_GRIDBUTTON);
   const VpeCoord page_width = 8;
   const VpeCoord page_height = 5;
   VpeSetDevice(hDoc, "EPSON TM-T88IV Receipt");
   VpeSetPageWidth(hDoc, page_width);
   VpeSetPageHeight(hDoc, page_height);
   VpeSetOutRect(hDoc, 0, 0, page_width, page_height);
   VpeLine(hDoc, 0, 0, page_width, 0);
   VpeLine(hDoc, 0, page_height, page_width, page_height);
   VpePrint(hDoc, 1, 1, "Hello World!");
Install Version ATM_304E
EPSON TM-T88IV Receipt3 Printer Driver
Version 5.0.4.0
Epson Status API
Version 3.7.0.1
IDEAL Software Support wrote:We re-activated our EPSON TM-T88IV and wrote some test code: ....
It works as it should.
    m.lnPageWidth = 8
    m.lnPageHeight= 31
   if .isOpen()
      .CloseDoc()
   endif
   
   .OpenDoc()
   
   .Device = "EPSON TM-T88IV Receipt"
   
   .PageWidth = m.lnPageWidth
   .PageHeight= m.lnPageHeight
   .SetOutRect(0,0,m.lnPageWidth, m.lnPageHeight)
   
   .VPELine(0, 0, m.lnPageWidth, 0)
   .VPELine(0, m.lnPageHeight, m.lnPageWidth, m.lnPageHeight)   
   .VPEPrint(1,1, "Hello World")      
   .PrintDoc(.F.)
IDEAL Software Support wrote:What version of the printer driver are you using on what operating system version? Is your Windows 32- or 64-bit?
We are using WinXP 32-bit, SP3, the printer driver version dialog reports: Install Version ATM_304E EPSON TM-T88IV Receipt3 Printer Driver
Version 5.0.4.0 Epson Status API Version 3.7.0.1
Version installieren
APD Ver4.51
EPSON TM-T88IV ReceiptE4
Version 5, 0, 15, 0
EPSON Status API
Version 4, 50, 0, 0
IDEAL Software Support wrote:... Just for informational purposes: what edition, version and release of VPE are you using?...
IDEAL Software Support wrote:We re-examined this problem and found a solution.....
Users browsing this forum: No registered users and 15 guests