topic
stringlengths
1
63
text
stringlengths
1
577k
printer Function EnumPrinters with fwh
Friend,This?[code:4uy7ok7d] #define PRINTER_STATUS_OK 0 #define PRINTER_STATUS_PAUSED 1 #define PRINTER_STATUS_ERROR 2 #define PRINTER_STATUS_PENDING_DELETION 4 #define PRINTER_STATUS_PAPER_JAM 8 #define PRINTER_STATUS_PAPER_OUT 16 #define PRINTER_STATUS_MANUAL_FEED 32 #define PRINTER_STATUS_PAPER_PROBLEM 64 #define PRINTER_STATUS_OFFLINE 128 #define PRINTER_STATUS_IO_ACTIVE 256 #define PRINTER_STATUS_BUSY 512 #define PRINTER_STATUS_PRINTING 1024 #define PRINTER_STATUS_OUTPUT_BIN_FULL 2048 #define PRINTER_STATUS_NOT_AVAILABLE 4096 #define PRINTER_STATUS_WAITING 8192 #define PRINTER_STATUS_PROCESSING 16384 #define PRINTER_STATUS_INITIALIZING 32768 #define PRINTER_STATUS_WARMING_UP 65536 #define PRINTER_STATUS_TONER_LOW 131072 #define PRINTER_STATUS_NO_TONER 262144 #define PRINTER_STATUS_PAGE_PUNT 524288 #define PRINTER_STATUS_USER_INTERVENTION 1048576 #define PRINTER_STATUS_OUT_OF_MEMORY 2097152 #define PRINTER_STATUS_DOOR_OPEN 4194304 #define PRINTER_STATUS_SERVER_UNKNOWN 8388608 #define PRINTER_STATUS_POWER_SAVE 16777216 [/code:4uy7ok7d] Example: [code:4uy7ok7d] MsgRun&#40; isprint&#40; "LPT1" &#41;, "Printer Status", &#123;|| SysWait&#40;3&#41; &#125; &#41; or if IsPrint&#40; "LPT1" &#41; = "Impressora Sem Papel" ? "Put more paper in print!" endif [/code:4uy7ok7d] Code: [code:4uy7ok7d] function IsPrint&#40; QuePrinter &#41; LOCAL nStatus DEFAULT QuePrinter &#58;= "LPT1&#58;" nStatus &#58;= PrnStatus&#40; QuePrinter &#41; if nStatus < 1 ; return "Impressora OK" elseif nStatus = 1 ; return "Impressora Pausada" elseif nStatus = 2 ; return "Impressora com Erro" elseif nStatus = 4 ; return "Impressora Deletando" elseif nStatus = 8 ; return "Impressora em Modo Bandeja" elseif nStatus = 16 ; return "Impressora Sem Papel" elseif nStatus = 32 ; return "Impressora em Modo Manual" elseif nStatus = 64 ; return "Impressora com Problema no Papel" elseif nStatus = 128 ; return "Impressora OffLine" elseif nStatus = 256 ; return "Impressora com IO Ativo" elseif nStatus = 512 ; return "Impressora Ocupada" elseif nStatus = 1024 ; return "Impressora Imprimindo" elseif nStatus = 2048 ; return "Impressora Memoria Lotada" elseif nStatus = 4096 ; return "Impressora Nao Instalada" elseif nStatus = 8192 ; return "Impressora Aguardando" elseif nStatus = 16384 ; return "Impressora Processando" elseif nStatus = 32768 ; return "Impressora Inicializando" elseif nStatus = 65536 ; return "Impressora em Atencao" elseif nStatus = 131072 ; return "Impressora Toner Baixo" elseif nStatus = 262144 ; return "Impressora Sem Toner" elseif nStatus = 524288 ; return "Impressora PAGE_PUNT" elseif nStatus = 1048576 ; return "Impressora Intervencao do Usuario" elseif nStatus = 2097152 ; return "Impressora Sem Memoria" elseif nStatus = 4194304 ; return "Impressora Tampa Aberta" elseif nStatus = 8388608 ; return "Impressora Servidor Desconhecido" elseif nStatus = 16777217 ; return "Impressora POWER_SAVE" endif [/code:4uy7ok7d]Translate to your language the code below.
printer Function EnumPrinters with fwh
Thank you Rochinha.Are the tests only possible for LPT1?Regards,Otto
printer Function EnumPrinters with fwh
OttoWorks with all printer local, network and virtual drivers.[code:c5vc4rwz] Function main&#40;&#41; // With fisical printer MsgRun&#40; isprint&#40; "LPT1" &#41;, "Printer Status", &#123;|| SysWait&#40;3&#41; &#125; &#41; // With a virtual printer driver MsgRun&#40; isprint&#40; "PDF4U Adobe PDF Creator" &#41;, "Printer Status", &#123;|| SysWait&#40;3&#41; &#125; &#41; // With network printer mapped in my machine MsgRun&#40; isprint&#40; "HP Deskjet D2300 series" &#41;, "Printer Status", &#123;|| SysWait&#40;3&#41; &#125; &#41; return &#46;t&#46; [/code:c5vc4rwz]
printer Function EnumPrinters with fwh
[color=blue:35vguwy8][b:35vguwy8]Good night. When news of a new Information is now printing a full 100% Without external libraries with BORLAND C + + & Tasm32 All Files pregnancy program. See all the information here <!-- m --><a class="postlink" href="http://fwh.livesystem.net">http://fwh.livesystem.net</a><!-- m --> Good luck hathal.[/b:35vguwy8][/color:35vguwy8]
printer Function EnumPrinters with fwh
Hello , were can i find the function prnstatus ?Thanks.
printer Function EnumPrinters with fwh
In Fivewin WINAPI.Code PRINTDC.C:[code:le3shc10] #define ENDDOC _ENDDOC #define DRAFTMODE _DRAFTMODE #define STARTDOC _STARTDOC #include <WinTen&#46;h> #include <Windows&#46;h> #ifndef __FLAT__ #include <Print&#46;h> #endif #include <CommDlg&#46;h> #include <ClipApi&#46;h> typedef struct &#123; WORD vlen; BYTE data&#91;10&#93;; &#125; ESCDATA; BOOL IsWin95&#40; void &#41;; static BOOL CALLBACK PrnSetupHkProc&#40;HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar&#41;; static void SendFile&#40;HDC, LPSTR&#41;; typedef struct &#123; WORD wSize; BYTE bData&#91;2&#93;; &#125; PASSTHROUGHSTRUCT, FAR *LPPTS; extern HINSTANCE GetInstance&#40; void &#41;; static far PRINTDLG pd; static far BOOL bInit = FALSE; static far RECT rtMargin = &#123; 2500, 2500, 2500, 2500 &#125;; //----------------------------------------------------------------------------// static void PrinterInit&#40; void &#41; &#123; if&#40; ! bInit &#41; &#123; bInit = TRUE; _bset&#40; &#40; char * &#41; &pd, 0, sizeof&#40; PRINTDLG &#41; &#41;; pd&#46;lStructSize = sizeof&#40; PRINTDLG &#41;; pd&#46;hwndOwner = GetActiveWindow&#40;&#41;; pd&#46;Flags = PD_RETURNDEFAULT ; pd&#46;nFromPage = 1; pd&#46;nToPage = 1; pd&#46;nMinPage = 1; pd&#46;nMaxPage = 65535; pd&#46;nCopies = 1; PrintDlg&#40; &pd &#41;; &#125; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER PRINTERINIT&#40; PARAMS &#41; // #else CLIPPER PRINTERINI&#40; PARAMS &#41; //T #endif &#123; bInit = FALSE; &#125; //----------------------------------------------------------------------------// CLIPPER PRINTEREND&#40; PARAMS &#41; &#123; if&#40; bInit &#41; &#123; if&#40; pd&#46;hDevMode != NULL &#41; &#123; GlobalFree&#40; pd&#46;hDevMode &#41;; pd&#46;hDevMode = NULL; &#125; if&#40; pd&#46;hDevNames != NULL &#41; &#123; GlobalFree&#40; pd&#46;hDevNames &#41;; pd&#46;hDevNames = NULL; &#125; bInit = FALSE; &#125; _ret&#40;&#41;; &#125; //----------------------------------------------------------------------------// #ifdef __FLAT__ CLIPPER GETPRINTDC&#40; PARAMS &#41; // &#40; hWndOwner, bSel, bPage &#41; --> hDC &#123; BOOL bSel = _parl&#40; 2 &#41;; BOOL bPage = _parl&#40; 3 &#41;; PrinterInit&#40;&#41;; pd&#46;hwndOwner = &#40; HWND &#41; _parnl&#40; 1 &#41;; pd&#46;Flags = PD_ALLPAGES | PD_RETURNDC | PD_HIDEPRINTTOFILE; pd&#46;Flags &= bSel ? ~PD_NOSELECTION &#58; ~PD_SELECTION; pd&#46;Flags |= bSel ? PD_SELECTION &#58; PD_NOSELECTION; if&#40; bSel || !bPage &#41; pd&#46;nFromPage = pd&#46;nToPage = 1; else pd&#46;Flags |= bPage ? PD_PAGENUMS &#58; 0; _retnl&#40; &#40; LONG &#41; &#40; PrintDlg&#40; &pd &#41; ? pd&#46;hDC &#58; 0 &#41; &#41;; &#125; #else CLIPPER GETPRINTDC&#40; PARAMS &#41; // &#40; hWndOwner &#41; --> hDC &#123; PrinterInit&#40;&#41;; pd&#46;hwndOwner = &#40; HWND &#41; _parnl&#40; 1 &#41;; pd&#46;Flags = PD_RETURNDC | PD_USEDEVMODECOPIES | PD_HIDEPRINTTOFILE | PD_NOSELECTION ; _retnl&#40; &#40; LONG &#41; &#40; PrintDlg&#40; &pd &#41; ? pd&#46;hDC &#58; 0 &#41; &#41;; &#125; #endif //----------------------------------------------------------------------------// #define WF_WINNT 0x4000 #ifdef __HARBOUR__ CLIPPER PRINTERSETUP&#40; PARAMS &#41; // &#40; hWndOwner &#41; --> nil #else CLIPPER PRINTERSET&#40; PARAMS &#41; // up&#40; hWndOwner &#41; --> nil #endif &#123; PrinterInit&#40;&#41;; pd&#46;hwndOwner = IF&#40; PCOUNT&#40;&#41; == 0, GetActiveWindow&#40;&#41;, &#40; HWND &#41; _parnl&#40; 1 &#41; &#41;; pd&#46;Flags = PD_PRINTSETUP | PD_USEDEVMODECOPIES; #ifndef __FLAT__ if&#40; IsWin95&#40;&#41; || GetWinFlags&#40;&#41; & WF_WINNT &#41; &#123; #endif pd&#46;Flags = pd&#46;Flags | PD_ENABLESETUPHOOK; #ifndef __FLAT__ pd&#46;lpfnSetupHook = PrnSetupHkProc; #else pd&#46;lpfnSetupHook = &#40; LPPRINTHOOKPROC &#41; PrnSetupHkProc; #endif #ifndef __FLAT__ &#125; #endif _retnl&#40; &#40; LONG &#41; &#40; PrintDlg&#40; &pd &#41; ? pd&#46;hDC &#58; 0 &#41; &#41;; &#125; //----------------------------------------------------------------------------// static BOOL CALLBACK PrnSetupHkProc&#40;HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar&#41; &#123; return FALSE; &#125; //----------------------------------------------------------------------------// #ifdef __FLAT__ CLIPPER PAGESETUP&#40; PARAMS &#41; &#123; LPDEVNAMES lpDevNames; LPDEVMODE lpDevMode; PAGESETUPDLG psd; rtMargin&#46;top = IF&#40; ISNUM&#40; 2 &#41;, _parni&#40; 2 &#41;, rtMargin&#46;top &#41;; rtMargin&#46;left = IF&#40; ISNUM&#40; 3 &#41;, _parni&#40; 3 &#41;, rtMargin&#46;left &#41;; rtMargin&#46;right = IF&#40; ISNUM&#40; 4 &#41;, _parni&#40; 4 &#41;, rtMargin&#46;right &#41;; rtMargin&#46;bottom = IF&#40; ISNUM&#40; 5 &#41;, _parni&#40; 5 &#41;, rtMargin&#46;bottom &#41;; PrinterInit&#40;&#41;; lpDevNames = &#40; LPDEVNAMES &#41; GlobalLock&#40; pd&#46;hDevNames &#41;; lpDevMode = &#40; LPDEVMODE &#41; GlobalLock&#40; pd&#46;hDevMode &#41;; _bset&#40; &#40; char * &#41; &psd, 0, sizeof&#40; PAGESETUPDLG &#41; &#41;; psd&#46;lStructSize = sizeof&#40; PAGESETUPDLG &#41;; psd&#46;hwndOwner = IF&#40; PCOUNT&#40;&#41; == 0, GetActiveWindow&#40;&#41;, &#40; HWND &#41; _parnl&#40; 1 &#41; &#41;; psd&#46;hDevNames = lpDevNames; psd&#46;hDevMode = lpDevMode; psd&#46;rtMargin = rtMargin; #ifndef __FLAT__ if&#40; IsWin95&#40;&#41; || GetWinFlags&#40;&#41; & WF_WINNT &#41; &#123; #endif psd&#46;Flags = PSD_MARGINS | PSD_INHUNDREDTHSOFMILLIMETERS | PSD_ENABLEPAGESETUPHOOK; #ifndef __FLAT__ psd&#46;lpfnPageSetupHook = PrnSetupHkProc; #else psd&#46;lpfnPageSetupHook = &#40; LPPAGESETUPHOOK &#41; PrnSetupHkProc; #endif #ifndef __FLAT__ &#125; #endif if&#40; PageSetupDlg&#40; &psd &#41; &#41;; &#123; pd&#46;hDevNames = psd&#46;hDevNames; pd&#46;hDevMode = psd&#46;hDevMode; rtMargin = psd&#46;rtMargin; &#125; GlobalUnlock&#40; pd&#46;hDevNames &#41;; GlobalUnlock&#40; pd&#46;hDevMode &#41;; &#125; #endif //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER PAGEGETMARGINS&#40; PARAMS &#41; #else CLIPPER PAGEGETMAR&#40; PARAMS &#41; // GINS&#40;&#41; #endif &#123; _reta&#40; 4 &#41;; #ifdef __XPP__ #define _storni&#40; x, y, z &#41; STORNI&#40; x, params, y, z &#41; #endif _storni&#40; rtMargin&#46;top, -1, 1 &#41;; _storni&#40; rtMargin&#46;left, -1, 2 &#41;; _storni&#40; rtMargin&#46;right, -1, 3 &#41;; _storni&#40; rtMargin&#46;bottom, -1, 4 &#41;; &#125; //----------------------------------------------------------------------------// #undef STARTDOC CLIPPER STARTDOC&#40; PARAMS &#41; &#123; DOCINFO info; char szDocName&#91; 32 &#93;; int iLen = MIN&#40; 31, _parclen&#40; 2 &#41; &#41;; _bcopy&#40; szDocName, _parc&#40; 2 &#41;, iLen &#41;; szDocName&#91; iLen &#93; = 0; info&#46;cbSize = sizeof&#40; DOCINFO &#41;; info&#46;lpszDocName = IF&#40; ISCHAR&#40; 2 &#41;, szDocName, "" &#41;; info&#46;lpszOutput = IF&#40; ISCHAR&#40; 3 &#41;, _parc&#40; 3 &#41;, 0 &#41;; #ifdef __FLAT__ info&#46;lpszDatatype = 0; info&#46;fwType = 0; #endif _retni&#40; StartDoc&#40; &#40; HDC &#41; _parnl&#40; 1 &#41;, // hDC printer device &info &#41; &#41;; &#125; //----------------------------------------------------------------------------// #undef ENDDOC CLIPPER ENDDOC&#40; PARAMS &#41; &#123; _retnl&#40; &#40; LONG &#41; EndDoc&#40; &#40; HDC &#41; _parnl&#40; 1 &#41; &#41; &#41;; // hDC printer device &#125; //----------------------------------------------------------------------------// CLIPPER STARTPAGE&#40; PARAMS &#41; &#123; _retnl&#40; &#40; LONG &#41; StartPage&#40; &#40; HDC &#41; _parnl&#40; 1 &#41; &#41; &#41;; // hDC printer device &#125; //----------------------------------------------------------------------------// CLIPPER ENDPAGE&#40; PARAMS &#41; &#123; _retnl&#40; &#40; LONG &#41; EndPage&#40; &#40; HDC &#41; _parnl&#40; 1 &#41; &#41; &#41;; // hDC printer device &#125; //----------------------------------------------------------------------------// CLIPPER ESCAPE&#40; PARAMS &#41; // &#40; hDC, nEscape, cInput, @cOutPut &#41; --> nReturn &#123; BYTE * pBuffer = &#40; BYTE * &#41; IF&#40; PCOUNT&#40;&#41; == 4, _xgrab&#40; _parclen&#40; 3 &#41; &#41;, 0 &#41;; _retni&#40; Escape&#40; &#40; HDC &#41; _parnl&#40; 1 &#41;, _parni&#40; 2 &#41;, _parclen&#40; 3 &#41;, _parc&#40; 3 &#41;, pBuffer &#41; &#41;; if&#40; pBuffer &#41; &#123; _storclen&#40; &#40; char * &#41; pBuffer, _parclen&#40; 3 &#41;, 4 &#41;; _xfree&#40; pBuffer &#41;; &#125; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER GETPRINTDEFAULT&#40; PARAMS &#41; // &#40; hWndOwner &#41; --> nil #else CLIPPER GETPRINTDE&#40; PARAMS &#41; // FAULT&#40; hWndOwner &#41; --> nil #endif &#123; LPDEVNAMES lpDevNames; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; if&#40; pd&#46;hDevNames &#41; &#123; lpDevNames = &#40;LPDEVNAMES&#41; GlobalLock&#40; pd&#46;hDevNames &#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; _retnl&#40; &#40; LONG &#41; CreateDC&#40; &#40; LPSTR &#41; lpDevNames + lpDevNames->wDriverOffset, &#40; LPSTR &#41; lpDevNames + lpDevNames->wDeviceOffset, &#40; LPSTR &#41; lpDevNames + lpDevNames->wOutputOffset, lpDevMode &#41; &#41;; GlobalUnlock&#40; pd&#46;hDevNames &#41;; GlobalUnlock&#40; pd&#46;hDevMode &#41;; &#125; else _retnl&#40; 0 &#41;; &#125; //----------------------------------------------------------------------------// CLIPPER PRNOFFSET&#40; PARAMS &#41; // &#40; hDC&#41; --> aPoint &#123; POINT pt; pt&#46;y = 0; pt&#46;x = 0; Escape&#40; &#40; HDC &#41; _parnl&#40; 1 &#41;, GETPRINTINGOFFSET, NULL, NULL, &#40; LPPOINT &#41; &pt &#41; ; _reta&#40; 2 &#41;; #ifdef __FLAT__ #ifndef __HARBOUR__ #define _storni&#40; x, y, z &#41; STORNI&#40; x, params, y, z &#41; #endif #endif _storni&#40; pt&#46;y, -1, 2 &#41;; _storni&#40; pt&#46;x, -1, 1 &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __FLAT__ #ifdef __HARBOUR__ CLIPPER PRNSETCOLLATE&#40; PARAMS &#41; // &#40; hDC &#41; --> lSuccess #else CLIPPER PRNSETCOLL&#40; PARAMS &#41; // ATE&#40; hDC &#41; --> lSuccess #endif &#123; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; if &#40; _parl&#40; 1 &#41; &#41; lpDevMode->dmCollate = DMCOLLATE_TRUE; else lpDevMode->dmCollate = DMCOLLATE_FALSE; GlobalUnlock&#40; pd&#46;hDevMode &#41;; _retl&#40; TRUE &#41;; &#125; #endif //----------------------------------------------------------------------------// CLIPPER RESETDC&#40; PARAMS &#41; // hDC --> lSuccess &#123; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40; LPDEVMODE &#41; GlobalLock&#40; pd&#46;hDevMode &#41;; _retl&#40; &#40; BOOL &#41; ResetDC&#40; &#40; HDC &#41; _parnl&#40; 1 &#41;, lpDevMode &#41; &#41;; GlobalUnlock&#40; pd&#46;hDevMode &#41;; &#125; //----------------------------------------------------------------------------// CLIPPER PRNGETSIZE&#40; PARAMS &#41; // &#40; hDC&#41; --> aPoint &#123; POINT pt; pt&#46;y = 0; pt&#46;x = 0; Escape&#40; &#40; HDC &#41; _parnl&#40; 1 &#41;, GETPHYSPAGESIZE, NULL, NULL, &#40; LPPOINT &#41; &pt &#41; ; _reta&#40; 2 &#41;; _storni&#40; pt&#46;y, -1, 2 &#41;; _storni&#40; pt&#46;x, -1, 1 &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER PRNLANDSCAPE&#40; PARAMS &#41; // &#40;hDC&#41; --> lSuccess #else CLIPPER PRNLANDSCA&#40; PARAMS &#41; // PE&#40;hDC&#41; --> lSuccess #endif &#123; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; lpDevMode->dmOrientation = DMORIENT_LANDSCAPE; GlobalUnlock&#40; pd&#46;hDevMode &#41;; _retl&#40; TRUE &#41;; &#125; //----------------------------------------------------------------------------// CLIPPER PRNDUPLEX&#40; PARAMS &#41; // &#40; nValue &#41; --> nOldValue &#123; LPDEVMODE lpDevMode; int dmDuplex; PrinterInit&#40;&#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; dmDuplex = lpDevMode->dmDuplex; if&#40; PCOUNT&#40;&#41; > 0 &#41; lpDevMode->dmDuplex = _parni&#40; 1 &#41;; _retni&#40; dmDuplex &#41;; GlobalUnlock&#40; pd&#46;hDevMode &#41;; &#125; //----------------------------------------------------------------------------// CLIPPER PRNSETSIZE&#40; PARAMS &#41; &#123; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; lpDevMode->dmFields = lpDevMode->dmFields | DM_PAPERSIZE | DM_PAPERLENGTH | DM_PAPERWIDTH; lpDevMode->dmPaperSize = DMPAPER_USER; lpDevMode->dmPaperWidth = _parnl&#40; 1 &#41;; lpDevMode->dmPaperLength = _parnl&#40; 2 &#41;; GlobalUnlock&#40; pd&#46;hDevMode &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER PRNPORTRAIT&#40; PARAMS &#41; // &#40;&#41; --> lSuccess #else CLIPPER PRNPORTRAI&#40; PARAMS &#41; // T&#40;&#41; --> lSuccess #endif &#123; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; lpDevMode->dmOrientation = DMORIENT_PORTRAIT; GlobalUnlock&#40; pd&#46;hDevMode &#41;; _retl&#40; TRUE &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER PRNGETORIENTATION&#40; PARAMS &#41; // &#40;&#41; --> nOldOrient #else CLIPPER PRNGETORIE&#40; PARAMS &#41; // NTATION&#40;&#41; --> nOldOrient #endif &#123; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; _retni&#40; lpDevMode->dmOrientation &#41;; GlobalUnlock&#40; pd&#46;hDevMode &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER PRNSETCOPIES&#40; PARAMS &#41; // &#40; nCopies &#41; --> lSuccess #else CLIPPER PRNSETCOPI&#40; PARAMS &#41; // ES&#40; nCopies &#41; --> lSuccess #endif &#123; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; lpDevMode->dmCopies = _parni&#40; 1 &#41;; if&#40; PCOUNT&#40;&#41; == 2 &#41; // Compatibility with previous syntax! lpDevMode->dmCopies = _parni&#40; 2 &#41;; GlobalUnlock&#40; pd&#46;hDevMode &#41;; _retl&#40; TRUE &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER PRNGETPAGES&#40; PARAMS &#41; // &#123; nFrom, nTo &#125; #else CLIPPER PRNGETPAGE&#40; PARAMS &#41; // S&#40;&#41; --> &#123;nFrom, nTo&#125; #endif &#123; PrinterInit&#40;&#41;; _reta&#40; 2 &#41;; #ifdef __XPP__ #define _storni&#40; x, y, z &#41; STORNI&#40; x, params, y, z &#41; #endif _storni&#40; pd&#46;nFromPage, -1, 1 &#41;; _storni&#40; pd&#46;nToPage, -1, 2 &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER PRNGETCOPIES&#40; PARAMS &#41; // --> nCopies #else CLIPPER PRNGETCOPI&#40; PARAMS &#41; // ES&#40;&#41; --> nCopies #endif &#123; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; _retni&#40; lpDevMode->dmCopies&#41;; GlobalUnlock&#40; pd&#46;hDevMode &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER PRNGETPAGNUMS&#40; PARAMS &#41; // --> lPageNums #else CLIPPER PRNGETPAGN&#40; PARAMS &#41; // UMS&#40;&#41; --> lPageNums #endif &#123; PrinterInit&#40;&#41;; _retl&#40; pd&#46;Flags & PD_PAGENUMS &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER PRNGETSELECTION&#40; PARAMS &#41; // --> lSelection #else CLIPPER PRNGETSELE&#40; PARAMS &#41; // CTION&#40;&#41; --> lSelection #endif &#123; PrinterInit&#40;&#41;; _retl&#40; pd&#46;Flags & PD_SELECTION &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __FLAT__ #ifdef __HARBOUR__ CLIPPER PRNGETCOLLATE&#40; PARAMS &#41; // --> lCollate #else CLIPPER PRNGETCOLL&#40; PARAMS &#41; // ATE&#40;&#41; --> lCollate #endif &#123; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40; LPDEVMODE &#41; GlobalLock&#40; pd&#46;hDevMode &#41;; _retl&#40; lpDevMode->dmCollate &#41;; GlobalUnlock&#40; pd&#46;hDevMode &#41;; &#125; #endif //----------------------------------------------------------------------------// CLIPPER PRINTERESC&#40; PARAMS &#41; // &#40; hDC, cText &#41; --> lSuccess &#123; ESCDATA Data; Data&#46;vlen = _parclen&#40;2&#41;; _bcopy&#40; &#40; char * &#41; Data&#46;data, _parc&#40;2&#41;, _parclen&#40;2&#41; &#41;; _retni&#40; Escape&#40; &#40; HDC &#41; _parni&#40; 1 &#41;, PASSTHROUGH, NULL, &#40;LPSTR&#41; &Data, NULL &#41; &#41;; &#125; //----------------------------------------------------------------------------// CLIPPER PRNGETNAME&#40; PARAMS &#41; // &#40;&#41; --> cPrinter &#123; LPDEVNAMES lpDevNames; PrinterInit&#40;&#41;; lpDevNames = &#40;LPDEVNAMES&#41; GlobalLock&#40; pd&#46;hDevNames &#41;; _retc&#40; &#40; LPSTR &#41; lpDevNames + lpDevNames->wDeviceOffset &#41;; GlobalUnlock&#40; pd&#46;hDevNames &#41;; &#125; //----------------------------------------------------------------------------// CLIPPER PRNGETPORT&#40; PARAMS &#41; // &#40;&#41; --> cPort &#123; LPDEVNAMES lpDevNames; PrinterInit&#40;&#41;; lpDevNames = &#40;LPDEVNAMES&#41; GlobalLock&#40; pd&#46;hDevNames &#41;; _retc&#40; &#40; LPSTR &#41; lpDevNames + lpDevNames->wOutputOffset &#41;; GlobalUnlock&#40; pd&#46;hDevNames &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER PRNGETDRIVE&#40; PARAMS &#41; // &#40;&#41; --> cDriver #else CLIPPER PRNGETDRIV&#40; PARAMS &#41; // ER &#40;&#41; --> cDriver #endif &#123; LPDEVNAMES lpDevNames; PrinterInit&#40;&#41;; lpDevNames = &#40;LPDEVNAMES&#41; GlobalLock&#40; pd&#46;hDevNames &#41;; _retc&#40; &#40; LPSTR &#41; lpDevNames + lpDevNames->wDriverOffset &#41;; GlobalUnlock&#40; pd&#46;hDevNames &#41;; &#125; //----------------------------------------------------------------------------// CLIPPER PRNSETPAGE&#40; PARAMS &#41; &#123; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; lpDevMode->dmPaperSize = _parni&#40; 1 &#41;; GlobalUnlock&#40; pd&#46;hDevMode &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER PRNBINSOURCE&#40; PARAMS &#41; //&#40; nBin &#41; #else CLIPPER PRNBINSOUR&#40; PARAMS &#41; //CE&#40; nBin &#41; #endif &#123; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; _retni&#40; &#40; LONG &#41; lpDevMode->dmDefaultSource &#41;; if &#40; PCOUNT&#40;&#41; > 0 &#41; &#123; lpDevMode->dmDefaultSource = _parni&#40; 1 &#41;; &#125; GlobalUnlock&#40; pd&#46;hDevMode &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ CLIPPER IMPORTRAWFILE&#40; PARAMS &#41; // &#40;hDC, cFile&#41; --> lMode #else CLIPPER IMPORTRAWF&#40; PARAMS &#41; // ile&#40;hDC, cFile&#41; --> lMode #endif &#123; int iEsc; iEsc = PASSTHROUGH; if &#40; Escape&#40; &#40; HDC &#41; _parnl&#40; 1 &#41;, QUERYESCSUPPORT, sizeof&#40;int&#41;, &#40;LPSTR&#41;&iEsc, NULL&#41;&#41; &#123; iEsc = EPSPRINTING; if &#40;Escape&#40; &#40; HDC &#41; _parnl&#40; 1 &#41;, QUERYESCSUPPORT, sizeof&#40;int&#41;, &#40;LPSTR&#41;&iEsc, NULL&#41;&#41; &#123; iEsc = 1; Escape&#40; &#40; HDC &#41; _parnl&#40; 1 &#41;, EPSPRINTING, sizeof&#40;int&#41;, &#40;LPSTR&#41;&iEsc, NULL&#41;; &#125; #ifndef __FLAT__ SendFile&#40; &#40; HDC &#41; _parnl&#40; 1 &#41;, &#40;LPSTR&#41; _parc&#40; 2 &#41;&#41;; #endif &#125; &#125; //----------------------------------------------------------------------------// #define BUFSIZE 2048 #ifndef __FLAT__ static void SendFile&#40;HDC hPrnDC, LPSTR szFile&#41; &#123; static LPPTS lpPTS=NULL; // Pointer to PASSTHROUGHSTRUCT OFSTRUCT ofs; HFILE hFile; hFile = OpenFile&#40;&#40;LPSTR&#41; szFile, &ofs, OF_READ&#41;; if &#40;hFile == HFILE_ERROR&#41; &#123; _retni&#40;0&#41;; return; &#125; if &#40;!lpPTS && !&#40;lpPTS = &#40;LPPTS&#41;GlobalLock&#40;GlobalAlloc&#40;GPTR, sizeof&#40;WORD&#41; + BUFSIZE&#41;&#41;&#41;&#41; &#123; _retni&#40;0&#41;; return; &#125; do &#123; lpPTS->wSize = _lread&#40;hFile, lpPTS->bData, BUFSIZE&#41;; Escape&#40;hPrnDC, PASSTHROUGH, NULL, &#40;LPSTR&#41;lpPTS, NULL&#41;; &#125; while &#40;&#40;lpPTS->wSize == BUFSIZE&#41;&#41;; _lclose&#40;hFile&#41;; _retni&#40;1&#41;; &#125; #endif //----------------------------------------------------------------------------// #undef DRAFTMODE CLIPPER DRAFTMODE&#40; PARAMS &#41; // lMode &#123; LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; lpDevMode->dmFields = lpDevMode->dmFields | DM_PRINTQUALITY; lpDevMode->dmPrintQuality = IF&#40; _parl&#40; 1 &#41;, -1, -4 &#41;; GlobalUnlock&#40; pd&#46;hDevMode &#41;; &#125; //----------------------------------------------------------------------------// CLIPPER SPOOLFILE&#40; PARAMS &#41; &#123; #ifndef __FLAT__ _retni&#40; SpoolFile&#40; _parc&#40; 1 &#41;, _parc&#40; 2 &#41;, _parc&#40; 3 &#41;, _parc&#40; 4 &#41; &#41; &#41;; #endif &#125; //----------------------------------------------------------------------------// CLIPPER devMODE&#40; PARAMS &#41; // lMode &#123; /* LPDEVMODE lpDevMode; PrinterInit&#40;&#41;; lpDevMode = &#40;LPDEVMODE&#41; GlobalLock&#40; pd&#46;hDevMode &#41;; if&#40; PCOUNT&#40;&#41; &#41; &#123; lpDevMode->dmDeviceName = _parc&#40; 1, 1 &#41;; lpDevMode->dmSpecVersion = _parni&#40; 1, 2 &#41;; lpDevMode->dm&#46;&#46;&#46; &#125; _reta&#40; 26 &#41;; _storc&#40; lpDevMode->dmDeviceName, -1, 1 &#41;; _storni&#40; lpDevMode->dmSpecVersion, -1, 2 &#41;; _storni&#40; lpDevMode->dmDriverVersion, -1, 3 &#41;; _stornl&#40; lpDevMode->dmSpecVersion, -1, 2 &#41;; // use stornl for 4 bytes BCHAR dmDeviceName&#91;CCHDEVICENAME&#93;; WORD dmSpecVersion; WORD dmDriverVersion; WORD dmSize; WORD dmDriverExtra; DWORD dmFields; short dmOrientation; short dmPaperSize; short dmPaperLength; short dmPaperWidth; short dmScale; short dmCopies; short dmDefaultSource; short dmPrintQuality; short dmColor; short dmDuplex; short dmYResolution; short dmTTOption; short dmCollate; BCHAR dmFormName&#91;CCHFORMNAME&#93;; WORD dmLogPixels; DWORD dmBitsPerPel; DWORD dmPelsWidth; DWORD dmPelsHeight; DWORD dmDisplayFlags; DWORD dmDisplayFrequency; GlobalUnlock&#40; pd&#46;hDevMode &#41;; */ &#125; //----------------------------------------------------------------------------// CLIPPER COMDLGXERR&#40; PARAMS &#41; // &#40;&#41; --> nError &#123; _retnl&#40; CommDlgExtendedError&#40;&#41; &#41;; &#125; //----------------------------------------------------------------------------// #ifdef __HARBOUR__ static int CALLBACK EnumFamCallBack&#40; LOGFONT FAR * lpnlf, TEXTMETRIC FAR * lpntm, int FontType, LPARAM lParam &#41; &#123; #ifndef __FLAT__ _putsym&#40; _SymEVAL &#41;; _xpushm&#40; &#40; PCLIPVAR &#41; lParam &#41;; _reta&#40; 14 &#41;; // LOGFONT elements _stornl&#40; lpnlf->lfHeight, -1, 1 &#41;; _stornl&#40; lpnlf->lfWidth, -1, 2 &#41;; _stornl&#40; lpnlf->lfEscapement, -1, 3 &#41;; _stornl&#40; lpnlf->lfOrientation, -1, 4 &#41;; _stornl&#40; lpnlf->lfWeight, -1, 5 &#41;; _stornl&#40; lpnlf->lfItalic, -1, 6 &#41;; _stornl&#40; lpnlf->lfUnderline, -1, 7 &#41;; _stornl&#40; lpnlf->lfStrikeOut, -1, 8 &#41;; _stornl&#40; lpnlf->lfCharSet, -1, 9 &#41;; _stornl&#40; lpnlf->lfOutPrecision, -1, 10 &#41;; _stornl&#40; lpnlf->lfClipPrecision, -1, 11 &#41;; _stornl&#40; lpnlf->lfQuality, -1, 12 &#41;; _stornl&#40; lpnlf->lfPitchAndFamily, -1, 13 &#41;; _storc&#40; lpnlf->lfFaceName, -1, 14 &#41;; _xpushm&#40; _eval &#41;; _reta&#40; 20 &#41;; // TEXTMETRICS elements _stornl&#40; lpntm->tmHeight, -1, 1 &#41;; _stornl&#40; lpntm->tmAscent, -1, 2 &#41;; _stornl&#40; lpntm->tmDescent, -1, 3 &#41;; _stornl&#40; lpntm->tmInternalLeading, -1, 4 &#41;; _stornl&#40; lpntm->tmExternalLeading, -1, 5 &#41;; _stornl&#40; lpntm->tmAveCharWidth, -1, 6 &#41;; _stornl&#40; lpntm->tmMaxCharWidth, -1, 7 &#41;; _stornl&#40; lpntm->tmWeight, -1, 8 &#41;; _stornl&#40; lpntm->tmItalic, -1, 9 &#41;; _stornl&#40; lpntm->tmUnderlined, -1, 10 &#41;; _stornl&#40; lpntm->tmStruckOut, -1, 11 &#41;; _stornl&#40; lpntm->tmFirstChar, -1, 12 &#41;; _stornl&#40; lpntm->tmLastChar, -1, 13 &#41;; _stornl&#40; lpntm->tmDefaultChar, -1, 14 &#41;; _stornl&#40; lpntm->tmBreakChar, -1, 15 &#41;; _stornl&#40; lpntm->tmPitchAndFamily, -1, 16 &#41;; _stornl&#40; lpntm->tmCharSet, -1, 17 &#41;; _stornl&#40; lpntm->tmOverhang, -1, 18 &#41;; _stornl&#40; lpntm->tmDigitizedAspectX, -1, 19 &#41;; _stornl&#40; lpntm->tmDigitizedAspectY, -1, 20 &#41;; _xpushm&#40; _eval &#41;; _PutLN&#40; FontType &#41;; _xEval&#40; 3 &#41;; return _parnl&#40; -1 &#41;; #else return 0; #endif &#125; #ifdef __HARBOUR__ CLIPPER ENUMFONTFAMILIES&#40; PARAMS &#41; // &#40; hDC, cFamily, bCallBack &#41; #else CLIPPER ENUMFONTFA&#40; PARAMS &#41; // MILIES&#40; hDC, cFamily, bCallBack &#41; #endif &#123; FONTENUMPROC lpEnumFamCallBack = &#40; FONTENUMPROC &#41; MakeProcInstance&#40; &#40; FARPROC &#41; EnumFamCallBack, GetInstance&#40;&#41; &#41;; #ifndef __FLAT__ LPVOID bCallBack = &#40; LPVOID &#41; _param&#40; 3, 0xFFFF &#41;; #else LPARAM bCallBack; #endif EnumFontFamilies&#40; &#40; HDC &#41; _parnl&#40; 1 &#41;, IF&#40; ISCHAR&#40; 2 &#41;, _parc&#40; 2 &#41;, NULL &#41;, lpEnumFamCallBack, bCallBack &#41;; // &#40; LPARAM &#41; aFontCount &#41;; FreeProcInstance&#40; &#40; FARPROC &#41; lpEnumFamCallBack &#41;; &#125; #endif //----------------------------------------------------------------------------// #ifdef __FLAT__ CLIPPER PRNSTATUS&#40; PARAMS &#41; // cPrinter or cPrinterServer --> nStatus &#123; HANDLE hPrinter = NULL; DWORD cBytesNeeded = 0, cBytesUsed = 0, status = 0; PRINTER_INFO_2 * pPrinterInfo = NULL; if&#40; OpenPrinter&#40; _parc&#40; 1 &#41;, &hPrinter, NULL &#41; &#41; &#123; GetPrinter&#40; hPrinter, 2, NULL, 0, &cBytesNeeded &#41;; pPrinterInfo = &#40; PRINTER_INFO_2 * &#41; _xgrab&#40; cBytesNeeded &#41;; GetPrinter&#40; hPrinter, 2, &#40; unsigned char * &#41; pPrinterInfo, cBytesNeeded, &cBytesUsed &#41;; _retnl&#40; pPrinterInfo->Status &#41;; _xfree&#40; pPrinterInfo &#41;; ClosePrinter&#40; hPrinter &#41;; &#125; else _retnl&#40; PRINTER_STATUS_NOT_AVAILABLE &#41;; &#125; #endif //----------------------------------------------------------------------------// [/code:le3shc10]
printer Function EnumPrinters with fwh
A detailed explanation of the library prn_info.lib Library consists of the following files 1 - P_INFO.PRG the experiment. 2 - SRC\P_INFO.PRG Choice of language. 3 -SRC\CPRN_L.ASM file a library. There are the following Funcion 1 - ALL_PRINTER_NAME() Show all printers available. 2 - PRINTER_INFO() read the data with any ball PORT whether LPTx or comX or LAN or USB or BLOTOOTH OR WiFI. Return Matrix len record 193 - P_Status( nStatus,nlang) Return status printer.First career special language 1 ENGLISH.2 ARABIC.3 Brasil. It is possible to add any language you want and then re-translate the file How test program: -- 1 - Choose the printer. 2 - push key Start Loop Info After the info provides primitive presentation of information. If start printer will note that the number of jobs changed.Download is available to upholding .hathal.
printer and Matricial or Jet of Paint
Hi, Does he have as knowing the installed printer and Matricial or Jet of Paint? Clemerson
printer and Matricial or Jet of Paint
Clemerson, I have the same problem: in my program I must know each printer type (inkjet, laser, dot matrix...). Based on printer type I must printer with tprinter or tdosprn or file and so on... I don't found a function to detect this information, then I created a printer database were I mark the printer type. If the selected printer isn't on database I search for keywords in the name like "LASER", "INK", "LX", "LQ" and I suppose the type... Regards Maurilio
printer and Matricial or Jet of Paint
Maurilio, >If the selected printer isn't on database I search for keywords in the name like "LASER", "INK", "LX", "LQ" and I suppose the type... I like that! You are giving your program a tiny bit of intelligence. Good idea. James
printer and Matricial or Jet of Paint
Today I do almost equal to you, I thought that FWH had some function. Clemerson
printer class printimage
[code=fw:28dvojfs]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH..\SAMPLES\PRNIMAG1.PRG</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Image.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oDlg, oImage, lSetAlpha := .T., cTitle, oFont<br /><br />   <span style="color: #B900B9;">// SetAlpha( .f. )</span><br /><br />   SkinButtons<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   cTitle := FWDESCRIPTION + <span style="color: #ff0000;">": .JPG, .JIF, .GIF, .BMP, .DIB, .RLE, .TGA, .PCX."</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont  <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span>  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-12</span> BOLD<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">22</span>, <span style="color: #000000;">60</span> <span style="color: #0000ff;">TITLE</span> cTitle ;<br />      COLORS CLR_BLACK, CLR_WHITE TRANSPARENT <span style="color: #0000ff;">FONT</span> oFont<br /><br />   oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br />   @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">IMAGE</span> oImage <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SCROLL</span> <span style="color: #B900B9;">// ADJUST</span><br /><br />   oImage:<span style="color: #0000ff;">Progress</span><span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">1</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Select Image"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span>  ;<br />      <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> GetImage<span style="color: #000000;">&#40;</span> oImage <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">2</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">ACTION</span> PrintImage<span style="color: #000000;">&#40;</span> oImage <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">3</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Copy"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg  ;<br />      <span style="color: #0000ff;">ACTION</span> oImage:<span style="color: #000000;">CopyToClipboard</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">4</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Paste"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">LoadFromClipboard</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oImage:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">5</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Save"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg  ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">SaveImage</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SAVED.JPG"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">25</span> <span style="color: #000000;">&#41;</span>, ;<br />               <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"saved as saved.jpg"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">6</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CANCEL<br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">23</span> <span style="color: #0000ff;">CHECKBOX</span> oImage:<span style="color: #000000;">lStretch</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Stretch"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">ScrollAdjust</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oImage:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">11</span>, <span style="color: #000000;">23</span> <span style="color: #0000ff;">CHECKBOX</span> lSetAlpha <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Set Alpha Channel"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">90</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> SetAlpha<span style="color: #000000;">&#40;</span> lSetAlpha <span style="color: #000000;">&#41;</span>, oImage:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />   oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> GetImage<span style="color: #000000;">&#40;</span> oImage <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> gcFile := cGetFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Bitmap (*.bmp)| *.bmp|"</span> +         ;<br />                              <span style="color: #ff0000;">"DIB   (*.dib)| *.dib|"</span> +         ;<br />                              <span style="color: #ff0000;">"PCX   (*.pcx)| *.pcx|"</span> +         ;<br />                              <span style="color: #ff0000;">"JPEG  (*.jpg)| *.jpg|"</span> +         ;<br />                              <span style="color: #ff0000;">"GIF   (*.gif)| *.gif|"</span> +         ;<br />                              <span style="color: #ff0000;">"TARGA (*.tga)| *.tga|"</span> +         ;<br />                              <span style="color: #ff0000;">"RLE   (*.rle)| *.rle|"</span> +         ;<br />                              <span style="color: #ff0000;">"All Files (*.*)| *.*"</span>            ;<br />                            , <span style="color: #ff0000;">"Please select a image file"</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">IF</span> .NOT. EMPTY<span style="color: #000000;">&#40;</span> gcFile <span style="color: #000000;">&#41;</span> .AND. File<span style="color: #000000;">&#40;</span> gcFile <span style="color: #000000;">&#41;</span><br /><br />      oImage:<span style="color: #000000;">LoadBmp</span><span style="color: #000000;">&#40;</span> gcFile <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">ENDIF</span><br /><br />   <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> PrintImage<span style="color: #000000;">&#40;</span> oImage <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oPrn<br /><br />   <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Image Printing"</span> PREVIEW <span style="color: #0000ff;">MODAL</span><br /><br />   oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#41;</span><br />   oPrn:<span style="color: #000000;">SetPortrait</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">PAGE</span><br /><br />      oPrn:<span style="color: #000000;">PrintImage</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span>, oImage <span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #B900B9;">/*<br />      // oPrn:SayImage( nLinLogo, nColLogo, "LOGO.JPG", nLargLogo, nAltLogo )<br /><br />      //@  nLinLogo, nColLogo PRINT TO oPrn IMAGE "LOGO.JPG" SIZE nLargLogo, nAltLogo LASTROW nRow<br />      */</span><br /><br />   <span style="color: #0000ff;">ENDPAGE</span><br /><br />   <span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// FIN / END</span><br /> </div>[/code:28dvojfs] [url:28dvojfs]https&#58;//fivetechsoft&#46;com/forums/viewtopic&#46;php?f=3&t=39420&p=235319&hilit=PRINTIMAGE#p235319[/url:28dvojfs] [url:28dvojfs]https&#58;//fivetechsoft&#46;com/forums/viewtopic&#46;php?f=3&t=32881&p=193499&hilit=PRINTIMAGE#p193499[/url:28dvojfs] Regards, saludos.
printer class printimage
today I have this Error [code=fw:1ffjwv7r]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">18</span><span style="color: #000000;">-04</span><span style="color: #000000;">-2023</span>, <span style="color: #000000;">12</span>:<span style="color: #000000;">22</span>:<span style="color: #000000;">49</span><br />&nbsp; &nbsp;Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1004</span> &nbsp;No exported <span style="color: #00C800;">method</span>: <span style="color: #000000;">PRINTIMAGE</span><br />&nbsp; &nbsp;Args:<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = U &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">1.00</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">1.00</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> = C &nbsp; .\<span style="color: #0000ff;">images</span>\logo.jpg &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">9.50</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">4.50</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span> = L &nbsp; .F.<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span> = O &nbsp; TPRINTER<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">9</span><span style="color: #000000;">&#93;</span> = L &nbsp; .F.<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp;<span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span> = L &nbsp; .F.<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp;<span style="color: #000000;">11</span><span style="color: #000000;">&#93;</span> = C &nbsp; CM<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp;<span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span> = C &nbsp; R<br /><br />Stack Calls<br />===========<br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> PRINTIMAGE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\ut_preview.prg => PRNIMAGE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">409</span> <span style="color: #000000;">&#41;</span></div>[/code:1ffjwv7r] I cal this method with [b:1ffjwv7r] oPrn:PrintImage( nRow,nCol,cImage,nWidth,nBottom,; lStretch, nAlpha, lTransp, lGray,; cUnits, cAlign)[/b:1ffjwv7r] where is the error ?
printer class printimage
Note-1: We need not use oImage for printing. We can straight away use the image source, viz, filename, resource or any source of image. Note-2: TImage requires 'freeimage.dll'. Better to use TBitmap or TXImage instead so that our application runs without freeimage.dll. This is a simple sample to print images. [code=fw:7t1c05vv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oPrn<br /><br />   <span style="color: #00C800;">PRINT</span> oPrn PREVIEW<br />   <span style="color: #0000ff;">PAGE</span><br />   @ <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">IMAGE</span> ;<br />         <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\o</span>lga1.jpg"</span> ;<br />         <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">3</span>,<span style="color: #000000;">4</span> INCHES<br /><br />   @ <span style="color: #000000;">5.3</span>,<span style="color: #000000;">1</span> <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">IMAGE</span> ;<br />         <span style="color: #ff0000;">"https://www.jesmondfruitbarn.com.au/wp-content/uploads/2016/10/Jesmond-Fruit-Barn-Oranges.jpg"</span> ;<br />         <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">4</span>,<span style="color: #000000;">4</span> INCHES<br /><br />   <span style="color: #0000ff;">ENDPAGE</span><br />   <span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> </div>[/code:7t1c05vv] [url=https&#58;//imageshack&#46;com/i/pn1SOBnMp:7t1c05vv][img:7t1c05vv]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq70/923/1SOBnM&#46;png[/img:7t1c05vv][/url:7t1c05vv]
printer class printimage
WOW() very good mister Rao. Regards, saludos.
printer class printimage
[quote="nageswaragunupudi":5qp5oq5g]Note-1: We need not use oImage for printing. We can straight away use the image source, viz, filename, resource or any source of image. Note-2: TImage requires 'freeimage.dll'. Better to use TBitmap or TXImage instead so that our application runs without freeimage.dll. This is a simple sample to print images. [code=fw:5qp5oq5g]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oPrn<br /><br />   <span style="color: #00C800;">PRINT</span> oPrn PREVIEW<br />   <span style="color: #0000ff;">PAGE</span><br />   @ <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">IMAGE</span> ;<br />         <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\o</span>lga1.jpg"</span> ;<br />         <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">3</span>,<span style="color: #000000;">4</span> INCHES<br /><br />   @ <span style="color: #000000;">5.3</span>,<span style="color: #000000;">1</span> <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">IMAGE</span> ;<br />         <span style="color: #ff0000;">"https://www.jesmondfruitbarn.com.au/wp-content/uploads/2016/10/Jesmond-Fruit-Barn-Oranges.jpg"</span> ;<br />         <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">4</span>,<span style="color: #000000;">4</span> INCHES<br /><br />   <span style="color: #0000ff;">ENDPAGE</span><br />   <span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> </div>[/code:5qp5oq5g] [/quote:5qp5oq5g] Sorry Nages I need to print an Image with Border or not with Border and I have the x,y and sizes on cm I made: I have nTop,nLeft,nRight,nBottom on cm meausure nTop:= 0.10 nLeft := 0.50 nRight:= 1 nBottom:=1 [code=fw:5qp5oq5g]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> PrintImage<span style="color: #000000;">&#40;</span>nTop,nLeft,nRight,nBottom,cFile,oPrn<span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">local</span> lStretch :=.f.<br />    <span style="color: #00C800;">local</span> nAlpha:=<span style="color: #000000;">0</span><br />    <span style="color: #00C800;">local</span> lTransp:= .f.<br />    <span style="color: #00C800;">local</span> lGray  := .f.<br /><br />    <span style="color: #00C800;">local</span>  aDes:=oPrn:<span style="color: #000000;">Cmtr2Pix</span><span style="color: #000000;">&#40;</span>nTop, nLeft<span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">local</span>  aHas:=oPrn:<span style="color: #000000;">Cmtr2Pix</span><span style="color: #000000;">&#40;</span>nBottom,nRight<span style="color: #000000;">&#41;</span><br /><br /> oPrn:<span style="color: #000000;">PrintImage</span><span style="color: #000000;">&#40;</span> aDes<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, aDes<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,cFile,aDes<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aDes<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>, lStretch, nAlpha, lTransp, lGray <span style="color: #000000;">&#41;</span><br /><br />  <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:5qp5oq5g] [b:5qp5oq5g]and I have this error[/b:5qp5oq5g] [img:5qp5oq5g]https&#58;//i&#46;postimg&#46;cc/N0jJXYQs/ki&#46;png[/img:5qp5oq5g] and I need to have the possibilty to show image with box or not
printer class printimage
Sorry my error <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> [img:tozx87bq]https&#58;//i&#46;postimg&#46;cc/mDkj6Sn7/io&#46;png[/img:tozx87bq] Corrected!!! How make Image with Box ?
printer class printimage
If you need to use CM, you just use "CM" instead of "INCHES" in the above command. There is no need to create new functions for this.
printer class printimage
[quote="nageswaragunupudi":23hadjxu]If you need to use CM, you just use "CM" instead of "INCHES" in the above command. There is no need to create new functions for this.[/quote:23hadjxu] ok How I can make to insert an image on a box sample I use for a text [code=fw:23hadjxu]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">IF</span> lBorder<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPrn:<span style="color: #000000;">Box</span><span style="color: #000000;">&#40;</span>X, Y, Z, K,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> nColorBordo, SetBorder<span style="color: #000000;">&#40;</span>nSizeBordo<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, nBackcolor, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span>cText, &nbsp;oFnt, nColorFont, SetAlign<span style="color: #000000;">&#40;</span>nAlignOriz,nAlignVert<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"CM"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPrn:<span style="color: #000000;">Box</span><span style="color: #000000;">&#40;</span>X, Y, Z, K,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> CLR_WHITE, <span style="color: #000000;">1</span> <span style="color: #000000;">&#125;</span>, CLR_WHITE, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span>cText, &nbsp;oFnt, nColorFont, SetAlign<span style="color: #000000;">&#40;</span>nAlignOriz,nAlignVert<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"CM"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:23hadjxu] How Make the same for the image ?
printer preview does not display anything
Dear friends, strangely don't work the print preview <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> For "samples\testprn2" the compile with buildx.bat is ok (without errors) at run time don't display nothing, but the program is present in process of taskmanager I Use bcc55, xharbour 1.1.0 and fwh 8.11 on Vista Business SP1 How solve it? Many thanks in advance.
printer preview does not display anything
Ugo Maybe check your prev32.dll it might be damaged or a problem with it HTH Richard
printer preview does not display anything
[quote="Richard Chidiak":yy0ov5z0]Maybe check your prev32.dll it might be damaged or a problem with it[/quote:yy0ov5z0] Dear Richard, thanks for your replay. I'm don't able to test if it is damaged, but i've replace it with the original of the 8.11 version, without result. Can I do other test?
printer preview does not display anything
I think it needs to be placed in the windows/system folder.
printer preview does not display anything
Ugo, Please build and test FWH\samples\TestPrn2.prg Thanks
printer trouble
Hi all, i have the following problem with the FiveWin printer commands. I want to print to a specified printer. To find the correct name i called the function aPrinters := aGetPrinters(). Here the content of aPrinter: --------------------------- Microsoft XPS Document Writer Microsoft Office Document Image Writer HPLaser Adobe PDF --------------------------- If i use the name 'HpLaser' and try to print on it nothing happens. [code:4uteh2dr]#include "FiveWin&#46;ch" //////////////// PROCEDURE Main() //////////////// LOCAL aPrinter &#58;= {} LOCAL cPrinter &#58;= "" LOCAL cMsg &#58;= "available printers&#58;" + CRLF aPrinter &#58;= aGetPrinters() for each cPrinter in aPrinter cMsg += CRLF + cPrinter TryPrint( cPrinter ) next ? cMsg RETURN ///////////////////////////////////// STATIC PROCEDURE TryPrint( cPrinter ) ///////////////////////////////////// LOCAL oPrn if !MsgYesNo( "Start printing to" + CRLF + "'" + cPrinter + "'" ) RETURN endif // PRINT oPrn NAME OemToAnsi( "test&#46;pdf" ) FROM USER PRINT oPrn NAME OemToAnsi( "test&#46;pdf" ) TO cPrinter oPrn&#58;StartPage() oPrn&#58;Say( 50, 50, "Test print to '" + PrnGetName() + "'" ) oPrn&#58;EndPage() oPrn&#58;End() RETURN [/code:4uteh2dr] If i use Print .... FROM USER and choose 'HPlaser' in the printer select dialog it prints fine? Am i doing something wrong? Regards, Detlef
printer trouble
In the meanwhile i found out that using [code:1bdsuuht] oPrn &#58;= TPrinter()&#58;New( "test&#46;pdf", &#46;f&#46;, &#46;f&#46;, cPrinter, &#46;f&#46;, &#46;f&#46; )[/code:1bdsuuht]works ok but [code:1bdsuuht] PRINT oPrn NAME OemToAnsi( "test&#46;pdf" ) TO cPrinter[/code:1bdsuuht]fails. I think that this is caused in [b:1bdsuuht]function PrintBegin( cDoc, lUser, lPreview, xModel, lModal, lSelection )[/b:1bdsuuht] of tPrinter class. May be that the GetProfString() calls don't give the desired results? Regards, Detlef
printer trouble
Detlef Which fwh version are you using ? and what os Vista or xp ? see the topic below, this is an outstanding problem hopefully fixed in 9.01 Antonio ? <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=14132">viewtopic.php?f=3&t=14132</a><!-- l --> HTH Richard
printer trouble
Detlef, Could you please try it with FWH 9.01 ? thanks
printer trouble
Richard, Antonio i'm using FWH 8.12 and Windows XP. I'll download and change to FWH 9.01 and inform you if it works. Regards, Detlef
printer trouble
Richard and Antonio, with FWH 9.01 my problem is solved. can now use [code:3s74k495]PRINT oPrn NAME OemToAnsi( "test&#46;pdf" ) TO cPrinter [/code:3s74k495] and its working fine. No need to call [i:3s74k495][color=#0000FF:3s74k495]oPrn := TPrinter():New( "test.pdf", .f., .f., cPrinter, .f., .f. )[/color:3s74k495][/i:3s74k495] Thanks and regards, Detlef
printing ""Strichlisten""
Hello, [img:2pph6pjw]http&#58;//www&#46;atzwanger-software&#46;com/fw/strichlisteallg&#46;jpg[/img:2pph6pjw] here we often use tallylists for recording. You make strokes lengthwise and then for 5 you draw a diagonal line on the four strokes. This is how it works. Here is a report I made with EasyReport. Best regards, Otto [img:2pph6pjw]http&#58;//www&#46;atzwanger-software&#46;com/fw/strichliste&#46;jpg[/img:2pph6pjw]
printing ""Strichlisten""
Really nice. Many compliments.
printing ""Strichlisten""
Very nice. Please also explain how did you draw the lines.
printing ""Strichlisten""
perhaps the beds ?
printing ""Strichlisten""
Hello, there is not much code necessary. For the strokes I use bitmaps. This is the code: [code=fw:hziiqxxj]<div class="fw" id="{CB}" style="font-family: monospace;"><br />PRINTAREA <span style="color: #000000;">4</span> <span style="color: #0000ff;">OF</span> oVRD ;<br />               ITEMIDS    <span style="color: #000000;">&#123;</span>   <span style="color: #000000;">30</span>,<span style="color: #000000;">40</span>,<span style="color: #000000;">50</span>,<span style="color: #000000;">60</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">20</span><span style="color: #000000;">&#125;</span> ;<br />               ITEMVALUES <span style="color: #000000;">&#123;</span>     <span style="color: #ff0000;">".<span style="color: #000000;">\B</span>MP8<span style="color: #000000;">\S</span>trokes<span style="color: #000000;">\"</span>+ALLTRIM( str(INT(nSumc30)))+"</span>.jpg<span style="color: #ff0000;">",;<br />                                "</span>.\BMP8\Strokes\<span style="color: #ff0000;">"+ALLTRIM( str(INT(nSumc40 )))+"</span>.jpg<span style="color: #ff0000;">",;<br />                                "</span>.\BMP8\Strokes\<span style="color: #ff0000;">"+ALLTRIM( str(INT(nSumc50 )))+"</span>.jpg<span style="color: #ff0000;">",;<br />                                "</span>.\BMP8\Strokes\<span style="color: #ff0000;">"+ALLTRIM( str(INT(nSumc60 )))+"</span>.jpg<span style="color: #ff0000;">",;<br />                                "</span>.\BMP8\Strokes\<span style="color: #ff0000;">"+ALLTRIM( str(INT(nSumc70 )))+"</span>.jpg<span style="color: #ff0000;">",;<br />                                "</span>Summe<span style="color: #ff0000;">","</span><span style="color: #ff0000;">" }<br /></span></div>[/code:hziiqxxj] [img:hziiqxxj]http&#58;//www&#46;atzwanger-software&#46;com/fw/strokevrd&#46;jpg[/img:hziiqxxj] Best regards, Otto
printing bar code pdf417
I need help with printing bar code PDF417 font from the program. Thank you for any help.
printing bar code pdf417
Not sure if this will help but you can try using a PDF417 font.... [url:1xbo5zk4]http&#58;//grandzebu&#46;net/informatique/codbar-en/pdf417&#46;htm[/url:1xbo5zk4]
printing constants
Hello, I am working on a routine where the user can design his own prints. While testing some things I saw the next strange behaviors: [list:2tecz6cz]When I set the oPrn:setPaperName("A4") and ask the GetPrintableWidth() and GetPrintableHeight() I get values like 576 and 813. When I set the oPrn:setPaperName("A3") and ask the GetPrintableWidth() and GetPrintableHeight() I get values like 559 and 783, which is smaller than on A4. When I look at System Preferences and than Printers/scanners I can change the prefered papersize from A4 to A3 When I then ask the GetPrintableWidth() and GetPrintableHeight() I get values like 806 and 1155, which seems more correct[/list:u:2tecz6cz] Question: how can i check which prefered papersize is active on the users computer. Or how do I get the right values on every computer. Futhermore, how can I print an image borderless. Now I have set: oPrn:SetLeftMargin(0) oPrn:SetRightMargin(0) oPrn:SetTopMargin(0) oPrn:SetbottomMargin(0) But when I start an image at 0,0 and width and height on GetPrintableWidth() and GetPrintableHeight() the image is not at the edge of the paper. I can't change this in the printer menu, aspecialy as I save the print as pdf.
printing constants
Dear René, FiveMac uses a NSPrintInfo object to manage the printer: [url:7ngrj30m]https&#58;//developer&#46;apple&#46;com/documentation/appkit/nsprintinfo[/url:7ngrj30m] FiveMac code: [url:7ngrj30m]https&#58;//github&#46;com/FiveTechSoft/fivemac/blob/23636eb7ad3e9aea7122cd4014fcec076e7e9392/source/winapi/printers&#46;m[/url:7ngrj30m] Here you have all the methods that the class provides, maybe another method may help you better with what you need: [url:7ngrj30m]https&#58;//github&#46;com/adobe-flash/crossbridge/blob/master/gnustep/core/gui/Source/NSPrintInfo&#46;m[/url:7ngrj30m]
printing constants
Change this function in printers.m : [code=fw:3twh3cae]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> PRNSETPAPERNAME <span style="color: #000000;">&#41;</span> <br /><span style="color: #000000;">&#123;</span><br />&nbsp;NSString * string = hb_NSSTRING_par<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp;NSPrintInfo * pi = <span style="color: #000000;">&#40;</span> NSPrintInfo * &nbsp;<span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; <br />&nbsp;<span style="color: #000000;">&#91;</span> <span style="color: #000000;">&#91;</span>pi dictionary<span style="color: #000000;">&#93;</span> setObject: <span style="color: #000000;">string</span> forKey: <span style="color: #000000;">NSPrintPaperName</span><span style="color: #000000;">&#93;</span>;<br /><span style="color: #B900B9;">// FIXME: Should this change the orientation?</span><br />&nbsp;<span style="color: #000000;">&#91;</span> <span style="color: #000000;">&#91;</span> pi dictionary<span style="color: #000000;">&#93;</span> setObject: <span style="color: #000000;">&#91;</span> NSValue valueWithSize:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span>NSPrintInfo sizeForPaperName: <span style="color: #000000;">string</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span> forKey: <span style="color: #000000;">NSPrintPaperSize</span><span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <br /><span style="color: #B900B9;">// [ pi setPaperName : string ] ;</span><br />&nbsp; &nbsp; <br /><span style="color: #000000;">&#125;</span><br /><br />&nbsp;</div>[/code:3twh3cae] code test : [code=fw:3twh3cae]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;oprn:<span style="color: #000000;">setPaperName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A5"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;? &nbsp;nHeight := oPrn:<span style="color: #000000;">GetPrintableHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? &nbsp;nWidth &nbsp;:= oPrn:<span style="color: #000000;">GetPrintableWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oprn:<span style="color: #000000;">setPaperName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A3"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;? &nbsp;nHeight := oPrn:<span style="color: #000000;">GetPrintableHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? &nbsp;nWidth &nbsp;:= oPrn:<span style="color: #000000;">GetPrintableWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oprn:<span style="color: #000000;">setPaperName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A4"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;? &nbsp;nHeight := oPrn:<span style="color: #000000;">GetPrintableHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? &nbsp;nWidth &nbsp;:= oPrn:<span style="color: #000000;">GetPrintableWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:3twh3cae] my result : a5->550x 401 a3->1190x842 a4->797x577
printing constants
Hello Antonio and Manuel, thank you for your reply. Do I need a new lib for this, because I have replaced the function in printers.m but now get the next results: A5 > 566 400 A3 > 566 400 A4 > 813 576 So it seems in my case the A3 size does not work properly? And your printsizes are different than mine, so it is printer dependent. How to set printing borderless?
printing from .exe running as a service
I have an exe loaded as a service on NT. Many thanks to the help received from this forum in creating exe's to run as a service. Now, I need this application to print to the default printer. My application uses the tprinter class and the Fivewin report class. During the print attempt I receive the following message. MsgStop( "There are no printers installed!" + CRLF + ; "Please exit this application and install a printer." ) This comes from the printer.prg (tprinter class) from the following lines of code. if ::hDC != 0 aOffset := PrnOffset( ::hDC ) ::nXOffset := aOffset[1] ::nYOffset := aOffset[2] ::nOrient := ::GetOrientation() elseif ComDlgXErr() != 0 MsgStop( "There are no printers installed!" + CRLF + ; "Please exit this application and install a printer." ) ::nXOffset := 0 ::nYOffset := 0 else ::nXOffset := 0 ::nYOffset := 0 ::nOrient := DMORIENT_PORTRAIT endif My question is, how can I utilize the printer class from an application running as a service? Or, how can I "install" a printer which will be available to services that are running? Thanks in advance.
printing from .exe running as a service
Can you tell me how you make the application run as a service?
printing from .exe running as a service
Check out this site. <!-- m --><a class="postlink" href="http://www.iopus.com/guides/srvany.htm">http://www.iopus.com/guides/srvany.htm</a><!-- m -->
printing from .exe running as a service
Don, Search google for this phrase, "printing from windows service" and look at the first article listed. I think it will answer your question. James
printing from .exe running as a service
Thanks. Currently I perform my printing using a .pdf tool that I think you may have alerted me about. Image2PDF.dll -- works wonderfully. I use the FWH report object - modified 2 lines of code to control the location and names of the .emf files, and then convert to .pdf documents and deliver via the web. I will checkout your link as well.
printing from .exe running as a service
Don, thanks for your help. I make the application right, but now i've a problem ... I've installed the exe as a service with the srvany. Into the .prg i use these functions : //------------------------------ Function ServiceProcess( mode ) //------------------------------ Local nProcessId := 0 Default mode := 0 nProcessId := GCP( ) If Abs( nProcessId ) > 0 RSProcess( nProcessId, mode ) Endif RETURN //---------------------------------------------------- DLL32 FUNCTION RSProcess(npID AS LONG ,; nMode AS LONG ) AS LONG ; FROM "RegisterServiceProcess" LIB "kernel32.DLL" //---------------------------------------------------- //---------------------------------------------------- DLL32 FUNCTION GCP() AS LONG; FROM "GetCurrentProcessId" LIB "kernel32.dll" //---------------------------------------------------- ... and in then Function Main() ServiceProcess(1) Well, it's allright, but when i try to start the service, i've got an error message : (error 1053 : service is not responding) (windows 2003 server). Curiously, the application starts (i make a log file in the app and really works), but the service ends and the application is out! Thanks ... and sorry for my english ! <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->
printing from .exe running as a service
I think the .exe which is spawned by the service should run continously controlled by some sort of loop or timer. I usually terminate the .exe via a 'trigger' such as writing a txt file from another process to instruct the loop to end. Note that the srvany.exe service process simply loads yourapplication.exe automatically, upon server startup. It does not continously load the application. If you terminate the .exe the service may still continue to run. Terminating the service will terminate your .exe, but terminating your .exe will not terminate the service necessarily. I use the service (srvany.exe) as a method to automatically load an exe process upon server startup.
printing in color
I am a non professional fivetech userI program the print jobs with ' print oprn...'How can I print fonts in colors??Thanks for any helpJosé Deschutter, Belgium
printing in color
Jose, Class TPrinter Method Say() supports the use of colors: [code:zgw7tfmz] METHOD Say( nRow, nCol, cText, oFont,; nWidth, nClrText, nBkMode, nPad ) CLASS TPrinter [/code:zgw7tfmz] where nClrText is the desired color to use: oPrinter:Say( 2, 2, "Hello world", oFont, 100, CLR_RED ) There are some predefined colors CLR_... or you can specify the one that you want using: nRGB( nRedValue, nGreenValue, nBlueValue ) i.e.: nRGB( 128, 100, 50 )
printing jpg-file
Hello, Maintaining a FW program (active from +/- 2000) , i have to change a emf-file , see also mine previous posts. With the help from Uwe , i have now a EMF file , converted from a pfd file obtained from the client. Now , i try to change the program as : # ifdef TEST oPrn:SayImage(0,0,"b:\test\mclskop.jpg") # else oPrn:ImportWMF(MCLSKOP) # endif Where the jpg-file is scanned ( full page) . nView shows as print dimensions : 21.009 x 29.705 cm , A4 format Paint 1191 x 1684 px Printing this file i expect that this dimensions are respected . The result is a litle image in the topleft corner Providing dimension parameters nWidth,nHeight (in pixels) does'n change nothing Can an image file be used to print for this purposes ? Frank
printing jpg-file
oPrn:SayImage( 0, 0, oImage , oPrn:nHorzres() , oPrn:nVertres() )
printing on portrait or landscape paper
Hello, While printing we can set the oriantation of the paper to portrait or landscape. But the number of rows we can print stay the same, Look at this sample. As you change oPrn:SetPagOrientation(0) to oPrn:SetPagOrientation(1) there are still 37 lines on the paper, but the spacing between the lines is smaller. Also the code to print the pagenumber does not work. [code=fw:19zvkx9w]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> RK_TestPrint<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">LOCAL</span> nPage := <span style="color: #000000;">1</span><br /><span style="color: #00C800;">LOCAL</span> nCol := <span style="color: #000000;">28</span>    && the column we start printing<br /><span style="color: #00C800;">LOCAL</span> nRow := <span style="color: #000000;">1</span> && the row we start printing<br /><span style="color: #00C800;">LOCAL</span> cText := <span style="color: #ff0000;">''</span><br /><span style="color: #00C800;">LOCAL</span> oPrn:=TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">SetLeftMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetRightMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetTopMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetbottomMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">setPaperName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A4"</span><span style="color: #000000;">&#41;</span><br />*oPrn:<span style="color: #000000;">AutoPage</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetPagOrientation</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">StartPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">FOR</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span><br />    cText := <span style="color: #ff0000;">'This is line: '</span> + ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>nRow<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />    @ nRow, <span style="color: #000000;">28</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> cText <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">20</span> <br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>Arial,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />    nRow++<br /><br />    <span style="color: #00C800;">IF</span> nRow > oPrn:<span style="color: #000000;">LastRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-2</span><br />        @ oPrn:<span style="color: #000000;">LastRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">450</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'page '</span> + ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>nPage<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">20</span> <br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>Arial,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />        nPage++<br />        nRow := <span style="color: #000000;">1</span><br />        oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        oPrn:<span style="color: #000000;">StartPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">NEXT</span><br /><br /><br />oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:19zvkx9w] Can we change the number of lines that are printed on the paper OR change the spacing between the lines.
printing on portrait or landscape paper
Change method setpagOrinetation () to this [code=fw:uyv6ob0a]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> SetPagOrientation<span style="color: #000000;">&#40;</span> nOrientation <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPrinter<br /><br />    PrnInfoPagSetOrientation<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPrnInfo</span>, nOrientation <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">if</span> nOrientation == <span style="color: #000000;">0</span><br />       ::<span style="color: #000000;">nRowsPerPage</span> := <span style="color: #000000;">40</span><br />    elseif nOrientation == <span style="color: #000000;">1</span><br />       ::<span style="color: #000000;">nRowsPerPage</span> := <span style="color: #000000;">20</span><br />    <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:uyv6ob0a] See if nRowperpage is good in 20 for you. And new method ... [code=fw:uyv6ob0a]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">METHOD</span> GetPagOrientation<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> PrnInfoPagGetOrientation<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hPrnInfo</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:uyv6ob0a] [code=fw:uyv6ob0a]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> PRNINFOPAGGETORIENTATION<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />  NSPrintInfo * pi = <span style="color: #000000;">&#40;</span> NSPrintInfo *   <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />  NSInteger nOrientation = pi.orientation ;<br />  hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> HB_LONG <span style="color: #000000;">&#41;</span> nOrientation <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /> </div>[/code:uyv6ob0a]
printing on portrait or landscape paper
Hello Manuel, This looks good I think. But how if we print in a large fontsize? Is it possible to set the nSetrowPerPage just like set PageOrientation?
printing on portrait or landscape paper
[quote="plantenkennis":3j62eea8]Hello Manuel, This looks good I think. But how if we print in a large fontsize? Is it possible to set the nSetrowPerPage just like set PageOrientation?[/quote:3j62eea8] Yes of course. You can adjust the number of lines you want both horizontally and vertically. LastRow will be ::nRowsPerPage - 1 . ... oPrn:SetPagOrientation(0) oPrn:nRowsPerPage := 33 ----
printing on portrait or landscape paper
Hello Manuel, That looks perfect. I assume I need a new lib for this function? I dod not see one on BitBucket...
printing on portrait or landscape paper
Right now, I have problems with bitbucket ,I have uploaded the changes to repository but libs not upload . for the moment you can use it directly on your code. [code=fw:xfp1v5a9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">local</span> nOrinetation := <span style="color: #000000;">0</span><br />.....<br />oPrn:<span style="color: #000000;">SetTopMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetbottomMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">setPaperName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A4"</span><span style="color: #000000;">&#41;</span><br />*oPrn:<span style="color: #000000;">AutoPage</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /><br />nOrientation := <span style="color: #000000;">1</span> <br />oPrn:<span style="color: #000000;">SetPagOrientation</span><span style="color: #000000;">&#40;</span> nOrientation<span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">if</span> nOrientation == <span style="color: #000000;">0</span><br />       oPrn:<span style="color: #000000;">nRowsPerPage</span> := <span style="color: #000000;">40</span>  <span style="color: #B900B9;">// your rows</span><br />    elseif nOrientation == <span style="color: #000000;">1</span><br />       oprn:<span style="color: #000000;">nRowsPerPage</span> := <span style="color: #000000;">20</span> <span style="color: #B900B9;">// your rows </span><br />    <span style="color: #00C800;">endif</span><br />...........<br /><br /> </div>[/code:xfp1v5a9] I'm sorry for the problems. regards. //-------------- edit -------------------- New libs is uploaded , make a copy of the previous ones and check that you do not create problems.
printing on portrait or landscape paper
Hello Manuel, Thank you very much, with the new libs it works perfect. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Another question: Can we also set the papersize to A5 or A3 (portrait and landscape)?
printing on portrait or landscape paper
good post!
printing several pages
Hello Antonio, I have a printroutine that prints several pages with plantinformation. On every page I want to have the information on the same place. The number of pages is depending on the length of an array. I had a working function, but now I have a new printer and everything shifts to other position. How can i make a print working on every printer the same. [code=fw:2301kqto]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">PUBLIC</span> nPage<br /><span style="color: #00C800;">PUBLIC</span> nPagePx := <span style="color: #000000;">815</span><br /><br /><span style="color: #00C800;">PUBLIC</span> oPrn:=TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">SetLeftMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetRightMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetTopMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetbottomMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetPaperName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A4"</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">AutoPage</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">pageWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-56</span> , <span style="color: #000000;">&#40;</span>oPrn:<span style="color: #000000;">pageHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> * LEN<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">FOR</span> nPage = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; nRow := <span style="color: #000000;">56</span> + <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>nPage<span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>*nPagePx<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> cLatijnNaam <span style="color: #0000ff;">OF</span> oPrn <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">480</span>, <span style="color: #000000;">40</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oSay:<span style="color: #000000;">setTextColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">51</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; @ nRow<span style="color: #000000;">+30</span>, <span style="color: #000000;">285</span> <span style="color: #0000ff;">IMAGE</span> oImg <span style="color: #0000ff;">OF</span> oPrn <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">250</span> FILENAME cFoto<br />&nbsp; &nbsp; &nbsp; &nbsp; oImg:<span style="color: #000000;">SetFrame</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">NEXT</span><br />oPrn:<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:2301kqto] IF I vary nPagePx I can make it work, but I think this is depending on the printer installed. I want it to work with every printer/computer
printing several pages
This code may help us: [url:3ikzkfdg]https&#58;//github&#46;com/frohoff/jdk8u-jdk/blob/master/src/macosx/native/sun/awt/CPrinterJob&#46;m[/url:3ikzkfdg]
printing several pages
Hello Antonio, I am sorry, but I don't understand this code. (I speak English, but not French <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> ) I hope you can make me an exaple on how to use this.
printing several pages
Please add this line and test it with different printers and let me know what you get: oPrn:AutoPage(.T.) [b:z132972z]MsgInfo( oPrn:pageHeight() )[/b:z132972z] oPrn:SetSize( oPrn:pageWidth()-56 , (oPrn:pageHeight()) * LEN(aPrintArray))
printing several pages
Hello Antonio, With several printers I get the same output: [b:1nodqyzv]841[/b:1nodqyzv]. According to my calculation that should be right, because I think 10 mm = 28,33 px. So an A4 paper of 210*297 mm gives (21*28,33) 595 px width and (29,7*28,33) 841 height. But if I use these numbers to set a new page, it doesn't fit...
printing several pages
How many elements of aPrintArray would you like to fit in one page ? I think it is the logic of your code what fails <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
printing several pages
Hello Antonio, The number of elements that I want to print on a page very every page. But some elements always comes back on all the pages. I have made a little sample that shows the problem. If you click 'print' and browse through the pages in the preview you can see that all the lines shifts a bit every page. When I increase or decrease the value [b:2mssdxr7]nPagePx[/b:2mssdxr7] I can make it not to shift as much, but I don't think that this is a good solution. As I told before, on one printer the value of [b:2mssdxr7]819[/b:2mssdxr7] works great, on another printer I have to decrease it to [b:2mssdxr7]813[/b:2mssdxr7]. [code=fw:2mssdxr7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveMac.ch"</span><br /><br />*a test program <span style="color: #00C800;">for</span> printing multiple pages <br />*made by René Koot<br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oDlg<br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Dialog"</span><br />   <br />   @ <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"print"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> RK_PrintTest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #0000ff;">DEFINE</span> MSGBAR <span style="color: #0000ff;">OF</span> oDlg<br />   <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br />   <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span>   <br /><br />*************************************************<br /><br /><span style="color: #00C800;">FUNCTION</span> RK_PrintTest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">LOCAL</span> nCol := <span style="color: #000000;">28</span><br /><span style="color: #00C800;">LOCAL</span> nRow := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nRowHeight := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> n<br /><span style="color: #00C800;">LOCAL</span> oSay, oImg<br /><br /><span style="color: #00C800;">LOCAL</span> aPrintArray<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><br /><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_1'</span>, <span style="color: #ff0000;">'Line2_1'</span>, <span style="color: #ff0000;">'Line3_1'</span>, <span style="color: #ff0000;">'Line4_1'</span>, <span style="color: #ff0000;">'Line5_1'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_2'</span>, <span style="color: #ff0000;">'Line2_2'</span>, <span style="color: #ff0000;">'Line3_2'</span>, <span style="color: #ff0000;">'Line4_2'</span>, <span style="color: #ff0000;">'Line5_2'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_3'</span>, <span style="color: #ff0000;">'Line2_3'</span>, <span style="color: #ff0000;">'Line3_3'</span>, <span style="color: #ff0000;">'Line4_3'</span>, <span style="color: #ff0000;">'Line5_3'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_4'</span>, <span style="color: #ff0000;">'Line2_4'</span>, <span style="color: #ff0000;">'Line3_4'</span>, <span style="color: #ff0000;">'Line4_4'</span>, <span style="color: #ff0000;">'Line5_4'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_5'</span>, <span style="color: #ff0000;">'Line2_5'</span>, <span style="color: #ff0000;">'Line3_5'</span>, <span style="color: #ff0000;">'Line4_5'</span>, <span style="color: #ff0000;">'Line5_5'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_6'</span>, <span style="color: #ff0000;">'Line2_6'</span>, <span style="color: #ff0000;">'Line3_6'</span>, <span style="color: #ff0000;">'Line4_6'</span>, <span style="color: #ff0000;">'Line5_6'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_7'</span>, <span style="color: #ff0000;">'Line2_7'</span>, <span style="color: #ff0000;">'Line3_1'</span>, <span style="color: #ff0000;">'Line4_1'</span>, <span style="color: #ff0000;">'Line5_1'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_8'</span>, <span style="color: #ff0000;">'Line2_8'</span>, <span style="color: #ff0000;">'Line3_2'</span>, <span style="color: #ff0000;">'Line4_2'</span>, <span style="color: #ff0000;">'Line5_2'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_9'</span>, <span style="color: #ff0000;">'Line2_9'</span>, <span style="color: #ff0000;">'Line3_3'</span>, <span style="color: #ff0000;">'Line4_3'</span>, <span style="color: #ff0000;">'Line5_3'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_10'</span>, <span style="color: #ff0000;">'Line2_10'</span>, <span style="color: #ff0000;">'Line3_4'</span>, <span style="color: #ff0000;">'Line4_4'</span>, <span style="color: #ff0000;">'Line5_4'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_11'</span>, <span style="color: #ff0000;">'Line2_11'</span>, <span style="color: #ff0000;">'Line3_5'</span>, <span style="color: #ff0000;">'Line4_5'</span>, <span style="color: #ff0000;">'Line5_5'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_12'</span>, <span style="color: #ff0000;">'Line2_12'</span>, <span style="color: #ff0000;">'Line3_6'</span>, <span style="color: #ff0000;">'Line4_6'</span>, <span style="color: #ff0000;">'Line5_6'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_13'</span>, <span style="color: #ff0000;">'Line2_13'</span>, <span style="color: #ff0000;">'Line3_1'</span>, <span style="color: #ff0000;">'Line4_1'</span>, <span style="color: #ff0000;">'Line5_1'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_14'</span>, <span style="color: #ff0000;">'Line2_14'</span>, <span style="color: #ff0000;">'Line3_2'</span>, <span style="color: #ff0000;">'Line4_2'</span>, <span style="color: #ff0000;">'Line5_2'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_15'</span>, <span style="color: #ff0000;">'Line2_15'</span>, <span style="color: #ff0000;">'Line3_3'</span>, <span style="color: #ff0000;">'Line4_3'</span>, <span style="color: #ff0000;">'Line5_3'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_16'</span>, <span style="color: #ff0000;">'Line2_16'</span>, <span style="color: #ff0000;">'Line3_4'</span>, <span style="color: #ff0000;">'Line4_4'</span>, <span style="color: #ff0000;">'Line5_4'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_17'</span>, <span style="color: #ff0000;">'Line2_17'</span>, <span style="color: #ff0000;">'Line3_5'</span>, <span style="color: #ff0000;">'Line4_5'</span>, <span style="color: #ff0000;">'Line5_5'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_18'</span>, <span style="color: #ff0000;">'Line2_18'</span>, <span style="color: #ff0000;">'Line3_6'</span>, <span style="color: #ff0000;">'Line4_6'</span>, <span style="color: #ff0000;">'Line5_6'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">PUBLIC</span> nPage<br /><span style="color: #00C800;">PUBLIC</span> nPagePx := <span style="color: #000000;">813</span><br /><br /><span style="color: #00C800;">PUBLIC</span> oPrn:=TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">SetLeftMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetRightMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetTopMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetbottomMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetPaperName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A4"</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">AutoPage</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">pageWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-56</span> , <span style="color: #000000;">&#40;</span>oPrn:<span style="color: #000000;">pageHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-28</span><span style="color: #000000;">&#41;</span> * LEN<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">FOR</span> nPage = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#41;</span><br />    cFoto := <span style="color: #ff0000;">"write.png"</span><br />    nRow := <span style="color: #000000;">56</span> + <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>nPage<span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>*nPagePx<span style="color: #000000;">&#41;</span><br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">480</span>, <span style="color: #000000;">40</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />        oSay:<span style="color: #000000;">setTextColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">51</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />    @ nRow<span style="color: #000000;">+30</span>, <span style="color: #000000;">285</span> <span style="color: #0000ff;">IMAGE</span> oImg <span style="color: #0000ff;">OF</span> oPrn <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">250</span> FILENAME cFoto<br />        oImg:<span style="color: #000000;">SetFrame</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    nRow := nRow + <span style="color: #000000;">300</span><br />    <br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />    nRow := nRow + <span style="color: #000000;">30</span><br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />    nRow := nRow + <span style="color: #000000;">30</span><br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />    nRow := nRow + <span style="color: #000000;">30</span><br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />    nRow := nRow + <span style="color: #000000;">30</span><br />    <br />    RK_PrintFooter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">NEXT</span><br /><br />oPrn:<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />*************************************************<br /><br /><span style="color: #00C800;">FUNCTION</span> RK_PrintFooter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    @ <span style="color: #000000;">780</span> + <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>nPage<span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>*nPagePx<span style="color: #000000;">&#41;</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">0169</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">' Copyright: Plantenkennis versie '</span> <span style="color: #0000ff;">OF</span> oPrn <span style="color: #0000ff;">SIZE</span> oPrn:<span style="color: #000000;">pageWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>- <span style="color: #000000;">112</span>, <span style="color: #000000;">20</span> <br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />    @ <span style="color: #000000;">780</span> + <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>nPage<span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>*nPagePx<span style="color: #000000;">&#41;</span>, <span style="color: #000000;">450</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'page '</span> + ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>nPage<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn <span style="color: #0000ff;">SIZE</span> oPrn:<span style="color: #000000;">pageWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>- <span style="color: #000000;">112</span>, <span style="color: #000000;">20</span> <br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />*************************************************<br /><br /><span style="color: #00C800;">function</span> PrinterPaint<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />*somehow this <span style="color: #00C800;">function</span> is needed <span style="color: #00C800;">for</span> printing<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /> </div>[/code:2mssdxr7] I hope you have a solution for this, maybe I don't see an important setting?
printing several pages
Hello Antonio, Did you have any time to look at my printing sample and how to get everything on the same position every page?
printing several pages
René, I am checking it
printing several pages
René, This way I am able to properly print on the first page though I get an empty (and undesired) second page: Anyhow, using this code I am unable to print more than one page... [code=fw:3btk2jps]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveMac.ch"</span><br /><br /><span style="color: #00C800;">static</span> oPrn<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Printer test"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">Print</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> <span style="color: #00C800;">Print</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oPrn = TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oPrn:<span style="color: #000000;">SetLeftMargin</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oPrn:<span style="color: #000000;">SetRightMargin</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oPrn:<span style="color: #000000;">SetTopMargin</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oPrn:<span style="color: #000000;">SetBottomMargin</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oPrn:<span style="color: #000000;">SetPaperName</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A4"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oPrn:<span style="color: #000000;">AutoPage</span><span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oPrn:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">PageWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oPrn:<span style="color: #000000;">PageHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">60</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oPrn:<span style="color: #000000;">Run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> PrinterPaint<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nStep, n, nLine := <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;nStep = <span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">PageHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">60</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">30</span> <span style="color: #B900B9;">// 30 lines </span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n = <span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> oPrn:<span style="color: #000000;">PageHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> STEP nStep<br />&nbsp; &nbsp; &nbsp; @ n, <span style="color: #000000;">0</span> <span style="color: #0000ff;">SAY</span> Str<span style="color: #000000;">&#40;</span> nLine++ <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn<br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:3btk2jps]
printing several pages
Hello Antonio, According to the sample 'testprint' we have to set pageHeight() to the height of the desired pages. As long as we set this to the height of one page there will never be a next page. Is it not possible to build in some functions like StartPage() and EndPage() that starts and ends a page with settings set by pageheight()?
printing several pages
René, Manuel Alvarez and I are reading Apple documentation about it: [url:3pqw406w]https&#58;//developer&#46;apple&#46;com/library/archive/documentation/Cocoa/Conceptual/Printing/osxp_pagination/osxp_pagination&#46;html[/url:3pqw406w] We may need some time to implement StartPage() and EndPage(). In the meantime, if you can keep using your current solution, that would be fine. Thanks
printing several pages
René, Manuel has implemented a new Class TPrinter Method GetASizePrintable() that is working great! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Here you have an example printing X pages: [code=fw:3kuxsfjs]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivemac.ch"</span><br /><br /><span style="color: #00C800;">static</span> oPrn<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Printer test"</span><br /><br />   @ <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">Print</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> <span style="color: #00C800;">Print</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> aSize<br /><br />   oPrn = TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oPrn:<span style="color: #000000;">SetLeftMargin</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   oPrn:<span style="color: #000000;">SetRightMargin</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   oPrn:<span style="color: #000000;">SetTopMargin</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   oPrn:<span style="color: #000000;">SetBottomMargin</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   oPrn:<span style="color: #000000;">SetPaperName</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A4"</span> <span style="color: #000000;">&#41;</span><br />   oPrn:<span style="color: #000000;">AutoPage</span><span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br /><br />   aSize = oPrn:<span style="color: #000000;">GetASizePrintable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oPrn:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> aSize<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aSize<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> * <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// 3 pages</span><br /><br />   oPrn:<span style="color: #000000;">Run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> PrinterPaint<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> nStep, n, nLine := <span style="color: #000000;">1</span><br />   <span style="color: #00C800;">local</span> nHeight := oPrn:<span style="color: #000000;">GetaSizePrintable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> * <span style="color: #000000;">3</span> <span style="color: #B900B9;">// 3 pages</span><br /><br />   nStep = nHeight / <span style="color: #000000;">&#40;</span> <span style="color: #000000;">30</span> * <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// 30 lines * 3 pages</span><br /><br />   <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nHeight STEP nStep<br />      @ n, <span style="color: #000000;">0</span> <span style="color: #0000ff;">SAY</span> Str<span style="color: #000000;">&#40;</span> nLine++ <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn<br />   <span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3kuxsfjs] Please download the new FiveMac libs from here: [url:3kuxsfjs]https&#58;//bitbucket&#46;org/fivetech/fivemac/src/master/lib/[/url:3kuxsfjs] [img:3kuxsfjs]https&#58;//bitbucket&#46;org/fivetech/screenshots/downloads/Screenshot%202018-10-04%20at%2012&#46;53&#46;18&#46;png[/img:3kuxsfjs]
printing several pages
René, We already have a first implementation of Class TPrinter Methods() StartPage() and EndPage(). Here you have an example of use. Hopefully the modified Class TPrinter does not break your existing code: printer.prg // A new example of the FiveMac enhanced Class TPrinter [code=fw:3gxim4ch]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveMac.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Printer test"</span><br /><br />   @ <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">Print</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> <span style="color: #00C800;">Print</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> n, oPrn := TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">10</span> <span style="color: #B900B9;">// ten pages</span><br />      oPrn:<span style="color: #000000;">StartPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <br />         oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">250</span>, <span style="color: #ff0000;">"Header "</span> + Alltrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">nPages</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">LastRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">250</span>, <span style="color: #ff0000;">"- Page "</span> + Alltrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">nPages</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" -"</span> <span style="color: #000000;">&#41;</span><br /><br />      oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br /><br />   oPrn:<span style="color: #000000;">Run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3gxim4ch] Updated FiveMac libraries are available from here: [url:3gxim4ch]https&#58;//bitbucket&#46;org/fivetech/fivemac/src/master/lib/[/url:3gxim4ch]
printing several pages
Hello Manuel and Antonio, Thank you very much for all this work. I think with some addaptions this will work great. For now I miss the following: [list:357fkfqc] setting fontname -size and -color of the say printing images[/list:u:357fkfqc] If this is build in I can work with the new Class TPrinter.
printing several pages
René, Class TPrinter Method Say() enhanced to use colors and fonts: [code=fw:t5gbeidc]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> nRow, nCol, cText, nClrText, nClrBack, cFontName, nFontSize <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPrinter<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oSay<br /><br />&nbsp; &nbsp;@ ::<span style="color: #000000;">RowPos</span><span style="color: #000000;">&#40;</span> nRow <span style="color: #000000;">&#41;</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> cText <span style="color: #0000ff;">OF</span> <span style="color: #00C800;">Self</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nClrText != <span style="color: #00C800;">nil</span> ..and. nClrBack != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; oSay:<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> nClrText, nClrBack <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> cFontName != <span style="color: #00C800;">nil</span> .and. nFontSize != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; oSay:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> cFontName, nFontSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:t5gbeidc] FiveMac updated libs available from: [url:t5gbeidc]https&#58;//bitbucket&#46;org/fivetech/fivemac/src/master/lib/[/url:t5gbeidc]
printing several pages
Hello Antonio and Manuel, Thank you for all your effort sofar. I will test this in the next few days.
printing several pages
Hello Manuel and Antoni, I have tested the new class TPrinter and method Say. There are a few things that are not working like it should be: [list:1vbt3v41] When I use oPrn:Say( nRow, nCol, 'This is a very long line to see if it all prints') the text is not printed as far as 'This is a very'. So we should be able to set the length of the oPrnSay. I can't get the fontname- size and color to work. We should be able to set the height of the Row to print so we can differ in linespaces if needed. [/list:u:1vbt3v41] I have some printouts that i want to be able to make. First there is a plantlist that can be viewed by this link: [url:1vbt3v41]http&#58;//www&#46;plantenkennis&#46;com/FiveMac/plantlist&#46;pdf[/url:1vbt3v41] As you can se I first print a header with a line and underneath some colums. This all comes from an array Than I have a leaflet. This is one page for each plant with the name and characteristics of the plant and an image: [url:1vbt3v41]http&#58;//www&#46;plantenkennis&#46;com/FiveMac/plant_leaflet&#46;pdf[/url:1vbt3v41] At last I have a flowering scheme where you can see in what month what colors are bloming: [url:1vbt3v41]http&#58;//www&#46;plantenkennis&#46;com/FiveMac/plant_flowering_scheme&#46;pdf[/url:1vbt3v41] For this I used next code: [code=fw:1vbt3v41]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> RK_PrintGrafiek<span style="color: #000000;">&#40;</span>cPrintTitel<span style="color: #000000;">&#41;</span><br />* <span style="color: #0000ff;">to</span> <span style="color: #00C800;">print</span> a raster with flowering periods<br />* date: <span style="color: #000000;">20</span><span style="color: #000000;">-06</span><span style="color: #000000;">-2017</span><br /><br /><span style="color: #00C800;">LOCAL</span> nCol := <span style="color: #000000;">28</span><br /><span style="color: #00C800;">LOCAL</span> nRow := <span style="color: #000000;">56</span><br /><span style="color: #00C800;">LOCAL</span> nRowHeight := <span style="color: #000000;">18</span><br /><span style="color: #00C800;">LOCAL</span> n<br /><span style="color: #00C800;">LOCAL</span> nAantalPlanten := <span style="color: #000000;">0</span><br /><br /><span style="color: #00C800;">LOCAL</span> oSay<br /><br /><span style="color: #00C800;">LOCAL</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">LOCAL</span> aKleur<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">218</span>, <span style="color: #000000;">185</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && abrikoos<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>        && blauw<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">164</span>, <span style="color: #000000;">96</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>     && brons<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">217</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && creme<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>      && geel<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>        && groen<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">162</span>, <span style="color: #000000;">200</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && lila<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">224</span>, <span style="color: #000000;">176</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && mauve<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">165</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>      && oranje<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">170</span>, <span style="color: #000000;">0</span> ,<span style="color: #000000;">255</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>      && paars<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>      && purper<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>        && rood<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">203</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && roze<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">238</span>, <span style="color: #000000;">130</span>, <span style="color: #000000;">238</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && violet<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">230</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && wit<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">114</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && zalm<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> ,<span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>          && zwart<br /><br /><span style="color: #00C800;">PUBLIC</span> oPrn:=TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">PUBLIC</span> nPage := <span style="color: #000000;">1</span>       && paginanummer onderaan<br /><span style="color: #00C800;">PUBLIC</span> nPages       && het totaal aantal pagina<span style="color: #ff0000;">'s<br />PUBLIC nPagePx := 819<br /><br />    IF ROUND(LEN(aPrintArray)/35,0) < LEN(aPrintArray)/35<br />        nPages := ROUND(LEN(aPrintArray)/35,0)+1<br />    ELSE<br />        nPages := ROUND(LEN(aPrintArray)/35,0)<br />    ENDIF<br /><br />oPrn:SetLeftMargin(0)<br />oPrn:SetRightMargin(0)<br />oPrn:SetTopMargin(0)<br />oPrn:SetbottomMargin(0)<br />oPrn:setPaperName("A4")<br />oPrn:AutoPage(.F.)<br />oPrn:setSize( oPrn:pageWidth()-56 , ( oPrn:pageHeight()-28) *nPages )<br /><br />@ nRow, nCol SAY oSay PROMPT cPrintTitel OF oPrn SIZE 450, 20<br />    oSay:Setfont("Arial",12 )<br />    <br />nRow := nRow + 2*nRowHeight<br />    <br />@ nRow, nCol SAY oSay PROMPT '</span>Latijnse naam<span style="color: #ff0000;">' OF oPrn SIZE 200, 20<br />    oSay:Setfont("Arial",10 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />@ nRow, nCol+200 SAY oSay PROMPT '</span>Jan<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />    oSay:Setfont("Arial",9 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />@ nRow, nCol+225 SAY oSay PROMPT '</span>Feb<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />    oSay:Setfont("Arial",9 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />@ nRow, nCol+250 SAY oSay PROMPT '</span>Mrt<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />    oSay:Setfont("Arial",9 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />@ nRow, nCol+275 SAY oSay PROMPT '</span>Apr<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />    oSay:Setfont("Arial",9 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />@ nRow, nCol+300 SAY oSay PROMPT '</span>Mei<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />    oSay:Setfont("Arial",9 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />@ nRow, nCol+325 SAY oSay PROMPT '</span>Jun<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />    oSay:Setfont("Arial",9 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />@ nRow, nCol+350 SAY oSay PROMPT '</span>Jul<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />    oSay:Setfont("Arial",9 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />@ nRow, nCol+375 SAY oSay PROMPT '</span>Aug<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />    oSay:Setfont("Arial",9 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />@ nRow, nCol+400 SAY oSay PROMPT '</span>Sep<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />    oSay:Setfont("Arial",9 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />@ nRow, nCol+425 SAY oSay PROMPT '</span>Okt<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />    oSay:Setfont("Arial",9 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />@ nRow, nCol+450 SAY oSay PROMPT '</span>Nov<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />    oSay:Setfont("Arial",9 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />@ nRow, nCol+475 SAY oSay PROMPT '</span>Dec<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />    oSay:Setfont("Arial",9 )<br />    oSay:setBkColor(255,255,255,100)<br />    oSay:setBezeled(.t.,.f.) <br />    nRow := nRow + nRowHeight<br /><br />FOR n = 1 TO LEN(aPrintArray)<br />        cText := RK_PrintShort(ALLTRIM(RK_GetLatijnseNaam(aPrintArray[n,1])), 220, "Arial", 10)<br />        nColor := RK_GetKleur(aPrintArray[n,1])<br />        aMaand := RK_CollectBloeiMaanden(aPrintArray[n,1])<br />    <br />    @ nRow, nCol SAY oSay PROMPT cText OF oPrn SIZE 200, 20<br />        oSay:Setfont("Arial",10 )<br />    oSay:setBkColor(255,255,255,100)<br />        oSay:setBezeled(.t.,.f.) <br />    @ nRow, nCol+200 SAY oSay PROMPT '</span><span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />        oSay:Setfont("Arial",10 )<br />        IF aMaand[1]<br />            oSay:setBkColor(aKleur[nColor,1],aKleur[nColor,2],aKleur[nColor,3],100)<br />        ELSE<br />            oSay:setBkColor(255,255,255,100)<br />        ENDIF<br />        oSay:setBezeled(.t.,.f.) <br />    @ nRow, nCol+225 SAY oSay PROMPT '</span><span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />        oSay:Setfont("Arial",10 )<br />        IF aMaand[2]<br />            oSay:setBkColor(aKleur[nColor,1],aKleur[nColor,2],aKleur[nColor,3],100)<br />        ELSE<br />            oSay:setBkColor(255,255,255,100)<br />        ENDIF<br />        oSay:setBezeled(.t.,.f.) <br />    @ nRow, nCol+250 SAY oSay PROMPT '</span><span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />        oSay:Setfont("Arial",10 )<br />        IF aMaand[3]<br />            oSay:setBkColor(aKleur[nColor,1],aKleur[nColor,2],aKleur[nColor,3],100)<br />        ELSE<br />            oSay:setBkColor(255,255,255,100)<br />        ENDIF<br />        oSay:setBezeled(.t.,.f.) <br />    @ nRow, nCol+275 SAY oSay PROMPT '</span><span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />        oSay:Setfont("Arial",10 )<br />        IF aMaand[4]<br />            oSay:setBkColor(aKleur[nColor,1],aKleur[nColor,2],aKleur[nColor,3],100)<br />        ELSE<br />            oSay:setBkColor(255,255,255,100)<br />        ENDIF<br />        oSay:setBezeled(.t.,.f.) <br />    @ nRow, nCol+300 SAY oSay PROMPT '</span><span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />        oSay:Setfont("Arial",10 )<br />        IF aMaand[5]<br />            oSay:setBkColor(aKleur[nColor,1],aKleur[nColor,2],aKleur[nColor,3],100)<br />        ELSE<br />            oSay:setBkColor(255,255,255,100)<br />        ENDIF<br />        oSay:setBezeled(.t.,.f.) <br />    @ nRow, nCol+325 SAY oSay PROMPT '</span><span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />        oSay:Setfont("Arial",10 )<br />        IF aMaand[6]<br />            oSay:setBkColor(aKleur[nColor,1],aKleur[nColor,2],aKleur[nColor,3],100)<br />        ELSE<br />            oSay:setBkColor(255,255,255,100)<br />        ENDIF<br />        oSay:setBezeled(.t.,.f.) <br />    @ nRow, nCol+350 SAY oSay PROMPT '</span><span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />        oSay:Setfont("Arial",10 )<br />        IF aMaand[7]<br />            oSay:setBkColor(aKleur[nColor,1],aKleur[nColor,2],aKleur[nColor,3],100)<br />        ELSE<br />            oSay:setBkColor(255,255,255,100)<br />        ENDIF<br />        oSay:setBezeled(.t.,.f.) <br />    @ nRow, nCol+375 SAY oSay PROMPT '</span><span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />        oSay:Setfont("Arial",10 )<br />        IF aMaand[8]<br />            oSay:setBkColor(aKleur[nColor,1],aKleur[nColor,2],aKleur[nColor,3],100)<br />        ELSE<br />            oSay:setBkColor(255,255,255,100)<br />        ENDIF<br />        oSay:setBezeled(.t.,.f.) <br />    @ nRow, nCol+400 SAY oSay PROMPT '</span><span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />        oSay:Setfont("Arial",10 )<br />        IF aMaand[9]<br />            oSay:setBkColor(aKleur[nColor,1],aKleur[nColor,2],aKleur[nColor,3],100)<br />        ELSE<br />            oSay:setBkColor(255,255,255,100)<br />        ENDIF<br />        oSay:setBezeled(.t.,.f.) <br />    @ nRow, nCol+425 SAY oSay PROMPT '</span><span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />        oSay:Setfont("Arial",10 )<br />        IF aMaand[10]<br />            oSay:setBkColor(aKleur[nColor,1],aKleur[nColor,2],aKleur[nColor,3],100)<br />        ELSE<br />            oSay:setBkColor(255,255,255,100)<br />        ENDIF<br />        oSay:setBezeled(.t.,.f.) <br />    @ nRow, nCol+450 SAY oSay PROMPT '</span><span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />        oSay:Setfont("Arial",10 )<br />        IF aMaand[11]<br />            oSay:setBkColor(aKleur[nColor,1],aKleur[nColor,2],aKleur[nColor,3],100)<br />        ELSE<br />            oSay:setBkColor(255,255,255,100)<br />        ENDIF<br />        oSay:setBezeled(.t.,.f.) <br />    @ nRow, nCol+475 SAY oSay PROMPT '</span><span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />        oSay:Setfont("Arial",10 )<br />        IF aMaand[12]<br />            oSay:setBkColor(aKleur[nColor,1],aKleur[nColor,2],aKleur[nColor,3],100)<br />        ELSE<br />            oSay:setBkColor(255,255,255,100)<br />        ENDIF<br />        oSay:setBezeled(.t.,.f.) <br />    nRow := nRow + nRowHeight<br /><br />    IF nRow > nPage*nPagePx - 90<br />        RK_PrintFooter()<br />        nPage++<br />        nRow := nRow + 170<br />        @ nRow, nCol SAY oSay PROMPT '</span>Latijnse naam<span style="color: #ff0000;">' OF oPrn SIZE 200, 20<br />            oSay:Setfont("Arial",10 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />        @ nRow, nCol+200 SAY oSay PROMPT '</span>Jan<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />            oSay:Setfont("Arial",9 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />        @ nRow, nCol+225 SAY oSay PROMPT '</span>Feb<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />            oSay:Setfont("Arial",9 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />        @ nRow, nCol+250 SAY oSay PROMPT '</span>Mrt<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />            oSay:Setfont("Arial",9 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />        @ nRow, nCol+275 SAY oSay PROMPT '</span>Apr<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />            oSay:Setfont("Arial",9 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />        @ nRow, nCol+300 SAY oSay PROMPT '</span>Mei<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />            oSay:Setfont("Arial",9 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />        @ nRow, nCol+325 SAY oSay PROMPT '</span>Jun<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />            oSay:Setfont("Arial",9 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />        @ nRow, nCol+350 SAY oSay PROMPT '</span>Jul<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />            oSay:Setfont("Arial",9 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />        @ nRow, nCol+375 SAY oSay PROMPT '</span>Aug<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />            oSay:Setfont("Arial",9 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />        @ nRow, nCol+400 SAY oSay PROMPT '</span>Sep<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />            oSay:Setfont("Arial",9 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />        @ nRow, nCol+425 SAY oSay PROMPT '</span>Okt<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />            oSay:Setfont("Arial",9 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />        @ nRow, nCol+450 SAY oSay PROMPT '</span>Nov<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />            oSay:Setfont("Arial",9 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />        @ nRow, nCol+475 SAY oSay PROMPT '</span>Dec<span style="color: #ff0000;">' OF oPrn SIZE 25, 20<br />            oSay:Setfont("Arial",9 )<br />            oSay:setBkColor(255,255,255,100)<br />            oSay:setBezeled(.t.,.f.) <br />            nRow := nRow + nRowHeight<br />    ENDIF<br /><br />NEXT<br /><br />RK_PrintFooter()<br /><br />oPrn:run()<br /><br />RETURN NIL<br /></span></div>[/code:1vbt3v41] I hope this all is possible?
printing several pages
If Use this ? #xcommand @ <nRow>, <nCol> SAY [ <oSay> PROMPT ] <cText> ; OF <oPrn> PAGINED ; [ SIZE <nWidth>, <nHeight> ] ; [ <raised: RAISED> ] ; [ <cPostext: TEXTLEFT, TEXTRIGHT, TEXTCENTER> ] ; [ AUTORESIZE <nAutoResize> ] ; [ TOOLTIP <cToolTip> ] ; [ <lutf8: UTF8 > ] ; [ PIXEL ] ; => ; <nRow>:= oPrn:RowPos( <nRow> ) ;; [ <oSay> := ] TSay():New( <nRow>, <nCol>, <nWidth>, <nHeight>,; <oPrn>, <cText>, <.raised.>, [ Upper(<(cPostext)>) ],; [<nAutoResize>], [<cToolTip>], [<(oSay)>] ) I will try to test it to see if it compiles and works. Bad command ... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
printing several pages
First approach... Rene , that is good for you ? [code=fw:3r8lwuw5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveMac.ch"</span><br /><br />*a test program <span style="color: #00C800;">for</span> printing multiple pages <br />*made by René Koot<br /><br />#xcommand @ <nRow>, <nCol> <span style="color: #0000ff;">SAY</span> <span style="color: #000000;">&#91;</span> <oSay> <span style="color: #0000ff;">PROMPT</span> <span style="color: #000000;">&#93;</span> <cText> ;<br /><span style="color: #0000ff;">OF</span> <oPrn> PAGINED ;<br /><span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> <raised: <span style="color: #000000;">RAISED</span>> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> <cPostext: <span style="color: #000000;">TEXTLEFT</span>, TEXTRIGHT, TEXTCENTER> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> AUTORESIZE <nAutoResize> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> TOOLTIP <cToolTip> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> <lutf8: <span style="color: #000000;">UTF8</span> > <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #000000;">&#93;</span> ;<br />=> ;<br /><span style="color: #000000;">&#91;</span> <oSay> := <span style="color: #000000;">&#93;</span> TSay<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">RowPos</span><span style="color: #000000;">&#40;</span><nRow><span style="color: #000000;">&#41;</span>, <nCol>, <nWidth>, <nHeight>,;<br /><oPrn>, <cText>, <.raised.>, <span style="color: #000000;">&#91;</span> Upper<span style="color: #000000;">&#40;</span><<span style="color: #000000;">&#40;</span>cPostext<span style="color: #000000;">&#41;</span>><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span>,;<br /><span style="color: #000000;">&#91;</span><nAutoResize><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><cToolTip><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><<span style="color: #000000;">&#40;</span>oSay<span style="color: #000000;">&#41;</span>><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br /><br />#xcommand @ <nRow>, <nCol> <span style="color: #0000ff;">IMAGE</span> <span style="color: #000000;">&#91;</span> <oImg> <span style="color: #000000;">&#93;</span> ;<br /> <span style="color: #0000ff;">OF</span> <oPrn> PAGINED ;<br /><span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> FILENAME <cFileName> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> <resource: <span style="color: #0000ff;">NAME</span>, <span style="color: #0000ff;">RESOURCE</span>, RESNAME> <cResName> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> TOOLTIP <cToolTip> <span style="color: #000000;">&#93;</span> ;<br />=> ;<br /><span style="color: #000000;">&#91;</span> <oImg> := <span style="color: #000000;">&#93;</span> TImage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">RowPos</span><span style="color: #000000;">&#40;</span><nRow><span style="color: #000000;">&#41;</span>, <nCol>, <nWidth>, <nHeight>,;<br /><span style="color: #000000;">&#91;</span><oPrn><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><cFileName><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><cResName><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><cToolTip> <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><<span style="color: #000000;">&#40;</span>oImg<span style="color: #000000;">&#41;</span>><span style="color: #000000;">&#93;</span>  <span style="color: #000000;">&#41;</span><br /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oDlg<br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Dialog"</span><br />   <br />   @ <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"print"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> RK_PrintTest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #0000ff;">DEFINE</span> MSGBAR <span style="color: #0000ff;">OF</span> oDlg<br />   <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br />   <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span>   <br /><br />*************************************************<br /><br /><span style="color: #00C800;">FUNCTION</span> RK_PrintTest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">LOCAL</span> nCol := <span style="color: #000000;">28</span><br /><span style="color: #00C800;">LOCAL</span> nRow := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nRowHeight := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> n<br /><span style="color: #00C800;">LOCAL</span> oSay, oImg<br /><span style="color: #00C800;">local</span> nfixRow:=  <span style="color: #000000;">0</span><br /><br /><span style="color: #00C800;">LOCAL</span> aPrintArray<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><br /><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_1'</span>, <span style="color: #ff0000;">'Line2_1'</span>, <span style="color: #ff0000;">'Line3_1'</span>, <span style="color: #ff0000;">'Line4_1'</span>, <span style="color: #ff0000;">'Line5_1'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_2'</span>, <span style="color: #ff0000;">'Line2_2'</span>, <span style="color: #ff0000;">'Line3_2'</span>, <span style="color: #ff0000;">'Line4_2'</span>, <span style="color: #ff0000;">'Line5_2'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_3'</span>, <span style="color: #ff0000;">'Line2_3'</span>, <span style="color: #ff0000;">'Line3_3'</span>, <span style="color: #ff0000;">'Line4_3'</span>, <span style="color: #ff0000;">'Line5_3'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_4'</span>, <span style="color: #ff0000;">'Line2_4'</span>, <span style="color: #ff0000;">'Line3_4'</span>, <span style="color: #ff0000;">'Line4_4'</span>, <span style="color: #ff0000;">'Line5_4'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_5'</span>, <span style="color: #ff0000;">'Line2_5'</span>, <span style="color: #ff0000;">'Line3_5'</span>, <span style="color: #ff0000;">'Line4_5'</span>, <span style="color: #ff0000;">'Line5_5'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_6'</span>, <span style="color: #ff0000;">'Line2_6'</span>, <span style="color: #ff0000;">'Line3_6'</span>, <span style="color: #ff0000;">'Line4_6'</span>, <span style="color: #ff0000;">'Line5_6'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_7'</span>, <span style="color: #ff0000;">'Line2_7'</span>, <span style="color: #ff0000;">'Line3_1'</span>, <span style="color: #ff0000;">'Line4_1'</span>, <span style="color: #ff0000;">'Line5_1'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_8'</span>, <span style="color: #ff0000;">'Line2_8'</span>, <span style="color: #ff0000;">'Line3_2'</span>, <span style="color: #ff0000;">'Line4_2'</span>, <span style="color: #ff0000;">'Line5_2'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_9'</span>, <span style="color: #ff0000;">'Line2_9'</span>, <span style="color: #ff0000;">'Line3_3'</span>, <span style="color: #ff0000;">'Line4_3'</span>, <span style="color: #ff0000;">'Line5_3'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_10'</span>, <span style="color: #ff0000;">'Line2_10'</span>, <span style="color: #ff0000;">'Line3_4'</span>, <span style="color: #ff0000;">'Line4_4'</span>, <span style="color: #ff0000;">'Line5_4'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_11'</span>, <span style="color: #ff0000;">'Line2_11'</span>, <span style="color: #ff0000;">'Line3_5'</span>, <span style="color: #ff0000;">'Line4_5'</span>, <span style="color: #ff0000;">'Line5_5'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_12'</span>, <span style="color: #ff0000;">'Line2_12'</span>, <span style="color: #ff0000;">'Line3_6'</span>, <span style="color: #ff0000;">'Line4_6'</span>, <span style="color: #ff0000;">'Line5_6'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_13'</span>, <span style="color: #ff0000;">'Line2_13'</span>, <span style="color: #ff0000;">'Line3_1'</span>, <span style="color: #ff0000;">'Line4_1'</span>, <span style="color: #ff0000;">'Line5_1'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_14'</span>, <span style="color: #ff0000;">'Line2_14'</span>, <span style="color: #ff0000;">'Line3_2'</span>, <span style="color: #ff0000;">'Line4_2'</span>, <span style="color: #ff0000;">'Line5_2'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_15'</span>, <span style="color: #ff0000;">'Line2_15'</span>, <span style="color: #ff0000;">'Line3_3'</span>, <span style="color: #ff0000;">'Line4_3'</span>, <span style="color: #ff0000;">'Line5_3'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_16'</span>, <span style="color: #ff0000;">'Line2_16'</span>, <span style="color: #ff0000;">'Line3_4'</span>, <span style="color: #ff0000;">'Line4_4'</span>, <span style="color: #ff0000;">'Line5_4'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_17'</span>, <span style="color: #ff0000;">'Line2_17'</span>, <span style="color: #ff0000;">'Line3_5'</span>, <span style="color: #ff0000;">'Line4_5'</span>, <span style="color: #ff0000;">'Line5_5'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_18'</span>, <span style="color: #ff0000;">'Line2_18'</span>, <span style="color: #ff0000;">'Line3_6'</span>, <span style="color: #ff0000;">'Line4_6'</span>, <span style="color: #ff0000;">'Line5_6'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">PUBLIC</span> nPage<br /><span style="color: #00C800;">PUBLIC</span> nPagePx := <span style="color: #000000;">813</span><br /><br /><span style="color: #00C800;">PUBLIC</span> oPrn:=TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">SetLeftMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetRightMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetTopMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetbottomMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetPaperName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A4"</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">AutoPage</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">nRowsPerPage</span> := nPagPix<br /><br />nHeight := oPrn:<span style="color: #000000;">GetPrintableHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />nWidth  := oPrn:<span style="color: #000000;">GetPrintableWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nWidth, nHeight * LEN<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />cFoto := <span style="color: #ff0000;">"write.png"</span><br /><br /><span style="color: #00C800;">FOR</span> nPage = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#41;</span><br /><br />    oPrn:<span style="color: #000000;">StartPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />        @ <span style="color: #000000;">0</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">480</span>, <span style="color: #000000;">40</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />            oSay:<span style="color: #000000;">setTextColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">51</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br /><br />        @ <span style="color: #000000;">30</span>, <span style="color: #000000;">285</span> <span style="color: #0000ff;">IMAGE</span> oImg <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">250</span> FILENAME cFoto<br />            oImg:<span style="color: #000000;">SetFrame</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />        @ <span style="color: #000000;">300</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br />        @ <span style="color: #000000;">330</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br /><br />        @ <span style="color: #000000;">360</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br /><br />        @ <span style="color: #000000;">390</span> ,nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br />        RK_PrintFooter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">NEXT</span><br /><br />oPrn:<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />*************************************************<br /><br /><span style="color: #00C800;">FUNCTION</span> RK_PrintFooter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> nWidth  := oPrn:<span style="color: #000000;">GetPrintableWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />@ <span style="color: #000000;">780</span> , <span style="color: #000000;">28</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">0169</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">' Copyright: Plantenkennis versie '</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> nWidth- <span style="color: #000000;">112</span>, <span style="color: #000000;">20</span><br />oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br />@ <span style="color: #000000;">780</span> , <span style="color: #000000;">450</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'page '</span> + ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>nPage<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> nWidth - <span style="color: #000000;">112</span>, <span style="color: #000000;">20</span><br />oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /> </div>[/code:3r8lwuw5]
printing several pages
Hello Manuel, I have addepted the code a little bit to make it work correct. First we used nCol and nRow in pixels, but with the new lib it works with lines? Here is the addapted code. I also removed some unused variables. Can you use the same approach for a line or rectangle. The only problem I see now if I use oSay:setBezeled(.t.,.f.). The text does not fit in the border [code=fw:1guovr71]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveMac.ch"</span><br /><br />*a test program <span style="color: #00C800;">for</span> printing multiple pages<br />*made by René Koot and Manuel<br /><br />#xcommand @ <nRow>, <nCol> <span style="color: #0000ff;">SAY</span> <span style="color: #000000;">&#91;</span> <oSay> <span style="color: #0000ff;">PROMPT</span> <span style="color: #000000;">&#93;</span> <cText> ;<br /><span style="color: #0000ff;">OF</span> <oPrn> PAGINED ;<br /><span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> <raised: <span style="color: #000000;">RAISED</span>> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> <cPostext: <span style="color: #000000;">TEXTLEFT</span>, TEXTRIGHT, TEXTCENTER> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> AUTORESIZE <nAutoResize> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> TOOLTIP <cToolTip> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> <lutf8: <span style="color: #000000;">UTF8</span> > <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #000000;">&#93;</span> ;<br />=> ;<br /><span style="color: #000000;">&#91;</span> <oSay> := <span style="color: #000000;">&#93;</span> TSay<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">RowPos</span><span style="color: #000000;">&#40;</span><nRow><span style="color: #000000;">&#41;</span>, <nCol>, <nWidth>, <nHeight>,;<br /><oPrn>, <cText>, <.raised.>, <span style="color: #000000;">&#91;</span> Upper<span style="color: #000000;">&#40;</span><<span style="color: #000000;">&#40;</span>cPostext<span style="color: #000000;">&#41;</span>><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span>,;<br /><span style="color: #000000;">&#91;</span><nAutoResize><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><cToolTip><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><<span style="color: #000000;">&#40;</span>oSay<span style="color: #000000;">&#41;</span>><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br /><br />#xcommand @ <nRow>, <nCol> <span style="color: #0000ff;">IMAGE</span> <span style="color: #000000;">&#91;</span> <oImg> <span style="color: #000000;">&#93;</span> ;<br /> <span style="color: #0000ff;">OF</span> <oPrn> PAGINED ;<br /><span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> FILENAME <cFileName> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> <resource: <span style="color: #0000ff;">NAME</span>, <span style="color: #0000ff;">RESOURCE</span>, RESNAME> <cResName> <span style="color: #000000;">&#93;</span> ;<br /><span style="color: #000000;">&#91;</span> TOOLTIP <cToolTip> <span style="color: #000000;">&#93;</span> ;<br />=> ;<br /><span style="color: #000000;">&#91;</span> <oImg> := <span style="color: #000000;">&#93;</span> TImage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">RowPos</span><span style="color: #000000;">&#40;</span><nRow><span style="color: #000000;">&#41;</span>, <nCol>, <nWidth>, <nHeight>,;<br /><span style="color: #000000;">&#91;</span><oPrn><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><cFileName><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><cResName><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><cToolTip> <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><<span style="color: #000000;">&#40;</span>oImg<span style="color: #000000;">&#41;</span>><span style="color: #000000;">&#93;</span>  <span style="color: #000000;">&#41;</span><br /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oDlg<br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Dialog"</span><br />   <br />   @ <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"print"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> RK_PrintTest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #0000ff;">DEFINE</span> MSGBAR <span style="color: #0000ff;">OF</span> oDlg<br />   <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br />   <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span>  <br /><br />*************************************************<br /><br /><span style="color: #00C800;">FUNCTION</span> RK_PrintTest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">LOCAL</span> nCol := <span style="color: #000000;">2</span><br /><span style="color: #00C800;">LOCAL</span> nRow := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nRowHeight := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> n<br /><span style="color: #00C800;">LOCAL</span> oSay, oImg<br /><span style="color: #00C800;">local</span> nfixRow:=  <span style="color: #000000;">0</span><br /><br /><span style="color: #00C800;">LOCAL</span> aPrintArray<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><br /><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'This is a very long line to see if it works'</span>, <span style="color: #ff0000;">'Line2_1'</span>, <span style="color: #ff0000;">'Line3_1'</span>, <span style="color: #ff0000;">'Line4_1'</span>, <span style="color: #ff0000;">'Line5_1'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_2'</span>, <span style="color: #ff0000;">'Line2_2'</span>, <span style="color: #ff0000;">'Line3_2'</span>, <span style="color: #ff0000;">'Line4_2'</span>, <span style="color: #ff0000;">'Line5_2'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_3'</span>, <span style="color: #ff0000;">'Line2_3'</span>, <span style="color: #ff0000;">'Line3_3'</span>, <span style="color: #ff0000;">'Line4_3'</span>, <span style="color: #ff0000;">'Line5_3'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_4'</span>, <span style="color: #ff0000;">'Line2_4'</span>, <span style="color: #ff0000;">'Line3_4'</span>, <span style="color: #ff0000;">'Line4_4'</span>, <span style="color: #ff0000;">'Line5_4'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_5'</span>, <span style="color: #ff0000;">'Line2_5'</span>, <span style="color: #ff0000;">'Line3_5'</span>, <span style="color: #ff0000;">'Line4_5'</span>, <span style="color: #ff0000;">'Line5_5'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_6'</span>, <span style="color: #ff0000;">'Line2_6'</span>, <span style="color: #ff0000;">'Line3_6'</span>, <span style="color: #ff0000;">'Line4_6'</span>, <span style="color: #ff0000;">'Line5_6'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_7'</span>, <span style="color: #ff0000;">'Line2_7'</span>, <span style="color: #ff0000;">'Line3_1'</span>, <span style="color: #ff0000;">'Line4_1'</span>, <span style="color: #ff0000;">'Line5_1'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_8'</span>, <span style="color: #ff0000;">'Line2_8'</span>, <span style="color: #ff0000;">'Line3_2'</span>, <span style="color: #ff0000;">'Line4_2'</span>, <span style="color: #ff0000;">'Line5_2'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_9'</span>, <span style="color: #ff0000;">'Line2_9'</span>, <span style="color: #ff0000;">'Line3_3'</span>, <span style="color: #ff0000;">'Line4_3'</span>, <span style="color: #ff0000;">'Line5_3'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_10'</span>, <span style="color: #ff0000;">'Line2_10'</span>, <span style="color: #ff0000;">'Line3_4'</span>, <span style="color: #ff0000;">'Line4_4'</span>, <span style="color: #ff0000;">'Line5_4'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_11'</span>, <span style="color: #ff0000;">'Line2_11'</span>, <span style="color: #ff0000;">'Line3_5'</span>, <span style="color: #ff0000;">'Line4_5'</span>, <span style="color: #ff0000;">'Line5_5'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_12'</span>, <span style="color: #ff0000;">'Line2_12'</span>, <span style="color: #ff0000;">'Line3_6'</span>, <span style="color: #ff0000;">'Line4_6'</span>, <span style="color: #ff0000;">'Line5_6'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_13'</span>, <span style="color: #ff0000;">'Line2_13'</span>, <span style="color: #ff0000;">'Line3_1'</span>, <span style="color: #ff0000;">'Line4_1'</span>, <span style="color: #ff0000;">'Line5_1'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_14'</span>, <span style="color: #ff0000;">'Line2_14'</span>, <span style="color: #ff0000;">'Line3_2'</span>, <span style="color: #ff0000;">'Line4_2'</span>, <span style="color: #ff0000;">'Line5_2'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_15'</span>, <span style="color: #ff0000;">'Line2_15'</span>, <span style="color: #ff0000;">'Line3_3'</span>, <span style="color: #ff0000;">'Line4_3'</span>, <span style="color: #ff0000;">'Line5_3'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_16'</span>, <span style="color: #ff0000;">'Line2_16'</span>, <span style="color: #ff0000;">'Line3_4'</span>, <span style="color: #ff0000;">'Line4_4'</span>, <span style="color: #ff0000;">'Line5_4'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_17'</span>, <span style="color: #ff0000;">'Line2_17'</span>, <span style="color: #ff0000;">'Line3_5'</span>, <span style="color: #ff0000;">'Line4_5'</span>, <span style="color: #ff0000;">'Line5_5'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aPrintArray, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'Line 1_18'</span>, <span style="color: #ff0000;">'Line2_18'</span>, <span style="color: #ff0000;">'Line3_6'</span>, <span style="color: #ff0000;">'Line4_6'</span>, <span style="color: #ff0000;">'Line5_6'</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">PUBLIC</span> nPage<br /><br /><span style="color: #00C800;">PUBLIC</span> oPrn:=TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">SetLeftMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetRightMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetTopMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetbottomMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetPaperName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A4"</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">AutoPage</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /><br />cFoto := <span style="color: #ff0000;">"write.png"</span><br /><br /><span style="color: #00C800;">FOR</span> nPage = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#41;</span><br /><br />    oPrn:<span style="color: #000000;">StartPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />        @ <span style="color: #000000;">0</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">480</span>, <span style="color: #000000;">40</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />            oSay:<span style="color: #000000;">setTextColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">51</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br /><br />        @ <span style="color: #000000;">1</span>, <span style="color: #000000;">285</span> <span style="color: #0000ff;">IMAGE</span> oImg <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">250</span> FILENAME cFoto<br />            oImg:<span style="color: #000000;">SetFrame</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />        @ <span style="color: #000000;">2</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br /><br />        @ <span style="color: #000000;">3</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br /><br />        @ <span style="color: #000000;">4</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br /><br />        @ <span style="color: #000000;">5</span> ,nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br />        RK_PrintFooter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">NEXT</span><br /><br />oPrn:<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />*************************************************<br /><br /><span style="color: #00C800;">FUNCTION</span> RK_PrintFooter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> nWidth  := oPrn:<span style="color: #000000;">GetPrintableWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />@ oPrn:<span style="color: #000000;">LastRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">0169</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">' Copyright: Plantenkennis versie '</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> nWidth- <span style="color: #000000;">112</span>, <span style="color: #000000;">20</span><br />oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br />@ oPrn:<span style="color: #000000;">LastRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> , <span style="color: #000000;">450</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'page '</span> + ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>nPage<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> nWidth - <span style="color: #000000;">112</span>, <span style="color: #000000;">20</span><br />oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:1guovr71]
printing several pages
[quote:2mtzs44o]Can you use the same approach for a line or rectangle.[/quote:2mtzs44o] Yes , of course , with any control that can be put in a view. [quote:2mtzs44o]The only problem I see now if I use oSay:setBezeled(.t.,.f.). The text does not fit in the border[/quote:2mtzs44o] Is normal . The text has a measure that depends on the font used, but you are assigned some measures to adjust in SIZE clausule. NSTEXTField not fix borders to content and it has no alignment vertical , only align Text to left , center o right.
printing several pages
Hello Antonio and Manuel, Thanks a lot for all the help with printing. This week I have released a new version of my software, including several printing options. I want to share some code with you and everybody. My software is a digital plant encyclopedia and users (landscapers) can make garden plans with this software. So the users can put some plants in a list for his customer and show the plants with some prints. First he can make a list with the plants used in the garden, including sizes, prices etc. A preview you can see from this link[url:wgkxa05n]http&#58;//www&#46;plantenkennis&#46;com/FiveMac/plantlist&#46;pdf[/url:wgkxa05n]. i made is with this code: [code=fw:wgkxa05n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> RK_BeplantingsLijstPrint<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />*<span style="color: #0000ff;">to</span> <span style="color: #00C800;">print</span> a beplantingslijst<br />*date: <span style="color: #000000;">21</span><span style="color: #000000;">-09</span><span style="color: #000000;">-2018</span><br /><br /><span style="color: #00C800;">LOCAL</span> aNAW<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">LOCAL</span> cLatnaam := <span style="color: #ff0000;">''</span><br /><span style="color: #00C800;">LOCAL</span> nTotaalPrijs := <span style="color: #000000;">0.00</span><br /><span style="color: #00C800;">LOCAL</span> nColTotaalPrijs := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nPrintBovenMarge := VAL<span style="color: #000000;">&#40;</span>cPrintBovenMarge<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">LOCAL</span> oSay<br /><br /><span style="color: #00C800;">PUBLIC</span> nPrintFontSize := VAL<span style="color: #000000;">&#40;</span>aFontSize<span style="color: #000000;">&#91;</span>nFontSize<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">PUBLIC</span> nCol := <span style="color: #000000;">0</span>    && de kolom waarop we printen<br /><span style="color: #00C800;">PUBLIC</span> nRow := <span style="color: #000000;">1</span>    && de rij waar we beginnen<br /><span style="color: #00C800;">PUBLIC</span> ndubbelRij := .F.<br /><br /><span style="color: #00C800;">IF</span> VAL<span style="color: #000000;">&#40;</span>cPrintBovenMarge<span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />    nRow := <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">&#40;</span>VAL<span style="color: #000000;">&#40;</span>cPrintBovenMarge<span style="color: #000000;">&#41;</span>/<span style="color: #000000;">5</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">IF</span> lPrintNeder .OR. lPrintOpmerking .OR. lPrintAfmeting<br />    ndubbelRij := .T.<br />    nAantalRegels := <span style="color: #000000;">18</span><br /><span style="color: #00C800;">ENDIF</span><br /><br />lFooterPrint := lPrintFooter<br /><br /><span style="color: #00C800;">PUBLIC</span> nPage := <span style="color: #000000;">1</span>       && paginanummer onderaan<br /><span style="color: #00C800;">PUBLIC</span> oPrn:=TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">SetLeftMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetRightMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetTopMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetbottomMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">setPaperName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A4"</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">AutoPage</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /><br />    oPrn:<span style="color: #000000;">StartPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    @ nRow, nCol<span style="color: #000000;">+285</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'lijst: '</span> + cPlantLijst <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">450</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize<span style="color: #000000;">&#41;</span><br />    <br />    <span style="color: #00C800;">IF</span> lPrintNAW<br />        aNAW := RK_CollectNAW<span style="color: #000000;">&#40;</span>nKlantID<span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">&#40;</span>aNAW<span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />            @ nRow, nCol<span style="color: #000000;">+15</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'beplantingslijst voor:'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">450</span>, <span style="color: #000000;">20</span><br />                oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize<span style="color: #000000;">&#41;</span><br />            nRow++<br />            <span style="color: #00C800;">FOR</span> nNAW = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aNAW<span style="color: #000000;">&#41;</span><br />                @ nRow, nCol<span style="color: #000000;">+15</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aNAW<span style="color: #000000;">&#91;</span>nNAW<span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">450</span>, <span style="color: #000000;">20</span><br />                    oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize<span style="color: #000000;">&#41;</span><br />                nRow++<br />            <span style="color: #00C800;">NEXT</span><br />        <span style="color: #00C800;">ELSE</span><br />                nRow++<br />        <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">ENDIF</span><br /><br />    nRow++<br /><br />    RK_PrintKopBeplantingslijst<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">SELECT</span> PlantLijst<br /><span style="color: #00C800;">FOR</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aPlantenLijst<span style="color: #000000;">&#41;</span><br />    GOTO aPlantenLijst<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span><br />    <span style="color: #00C800;">IF</span> lPrintAantal<br />        @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> STR<span style="color: #000000;">&#40;</span>aantal<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />            oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />        nCol := nCol + <span style="color: #000000;">40</span><br />    <span style="color: #00C800;">ENDIF</span><br />    cLatnaam := RK_PrintShort<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>latnaam<span style="color: #000000;">&#41;</span>, <span style="color: #000000;">250</span>, cFontName, nPrintFontSize<span style="color: #000000;">&#41;</span><br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> cLatnaam <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">IF</span> lPrintNeder<br />        @ nRow<span style="color: #000000;">+1</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> RK_GetNederNaam<span style="color: #000000;">&#40;</span>Plantnum<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br />    nCol := nCol + <span style="color: #000000;">250</span><br />    <span style="color: #00C800;">IF</span> lPrintMaat<br />        @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> maat <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize<span style="color: #000000;">&#41;</span><br />        <br />        <span style="color: #00C800;">IF</span> lPrintOpmerking  <br />            @ nRow<span style="color: #000000;">+1</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> opmerking <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">130</span>, <span style="color: #000000;">20</span><br />                oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize<span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        nCol := nCol + <span style="color: #000000;">100</span><br />    <span style="color: #00C800;">ENDIF</span><br /><br />    <span style="color: #00C800;">IF</span> lPrintPrijs<br />        @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> STR<span style="color: #000000;">&#40;</span>prijs<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">55</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />            oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />        nCol := nCol + <span style="color: #000000;">55</span><br />    <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">IF</span> lPrintVerkoop .AND. !lPrintPrijs<br />        @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> STR<span style="color: #000000;">&#40;</span>verkoop<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">55</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />            oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />        nCol := nCol + <span style="color: #000000;">55</span><br />    <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">IF</span> lPrintTotaal<br />        @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> STR<span style="color: #000000;">&#40;</span>aantal*prijs<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">55</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />            oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />        nTotaalPrijs := nTotaalPrijs + aantal*prijs<br />        nColTotaalPrijs := nCol<br />        nCol := nCol + <span style="color: #000000;">55</span><br />    <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">IF</span> lPrintVak<br />        @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> vaknr <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />        nEindCol := nCol + <span style="color: #000000;">30</span><br />    <span style="color: #00C800;">ELSE</span><br />        nEindCol := nCol<br />    <span style="color: #00C800;">ENDIF</span><br />    nCol := <span style="color: #000000;">0</span><br />    <span style="color: #00C800;">IF</span> ndubbelRij<br />        nRow++<br />        nRow++<br />    <span style="color: #00C800;">ELSE</span><br />        nRow++<br />    <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">IF</span> lPrintRaster<br />        @ oPrn:<span style="color: #000000;">RowPos</span><span style="color: #000000;">&#40;</span>nRow<span style="color: #000000;">&#41;</span><span style="color: #000000;">-5</span>, <span style="color: #000000;">0</span> LINE <span style="color: #0000ff;">HORIZONTAL</span> PAGINED <span style="color: #0000ff;">SIZE</span> oPrn:<span style="color: #000000;">pageWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn<br />    <span style="color: #00C800;">ENDIF</span><br />            <br />    <span style="color: #00C800;">IF</span> nRow > oPrn:<span style="color: #000000;">LastRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-3</span><br />        RK_PrintFooter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        nPage++<br />        <span style="color: #00C800;">IF</span> VAL<span style="color: #000000;">&#40;</span>cPrintBovenMarge<span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span> .AND. !lPrintBovenMarge<br />            nRow := <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">&#40;</span>VAL<span style="color: #000000;">&#40;</span>cPrintBovenMarge<span style="color: #000000;">&#41;</span>/<span style="color: #000000;">5</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            nRow := <span style="color: #000000;">1</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        oPrn:<span style="color: #000000;">StartPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        RK_PrintKopBeplantingslijst<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">NEXT</span><br /><br /><span style="color: #00C800;">IF</span> lPrintTotaal<br />    nRow := nRow <span style="color: #000000;">+2</span><br />    @ nRow, nColTotaalPrijs<span style="color: #000000;">-50</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'totaal:'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />        oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />    @ nRow, nColTotaalPrijs <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> STR<span style="color: #000000;">&#40;</span>nTotaalPrijs<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">55</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />        oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span><br /><br />nRow++<br />RK_PrintFooter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />lFooterPrint := .T.<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />*************************************************<br /><br /><span style="color: #00C800;">FUNCTION</span> RK_PrintKopBeplantingslijst<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />*om de kop boven elke pagina te printen<br />*date: <span style="color: #000000;">25</span><span style="color: #000000;">-9</span><span style="color: #000000;">-2018</span><br /><br /><span style="color: #00C800;">IF</span> lPrintAantal<br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'aantal'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />        oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />        <br />    <span style="color: #00C800;">IF</span> lPrintAfmeting<br />        @ nRow<span style="color: #000000;">+1</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'afm.'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />            oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br />    nCol := nCol + <span style="color: #000000;">40</span><br /><span style="color: #00C800;">ENDIF</span><br />    <br />@ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Latijnse naam'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">20</span><br />    oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize<span style="color: #000000;">&#41;</span><br />    <br /><span style="color: #00C800;">IF</span> lPrintNeder<br />    @ nRow<span style="color: #000000;">+1</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Nederlandse naam'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span><br />nCol := nCol + <span style="color: #000000;">250</span><br /><br /><span style="color: #00C800;">IF</span> lPrintMaat<br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'maat'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize<span style="color: #000000;">&#41;</span><br />        <br />    <span style="color: #00C800;">IF</span> lPrintOpmerking  <br />        @ nRow<span style="color: #000000;">+1</span>, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'opmerking'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">130</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize<span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br />    nCol := nCol + <span style="color: #000000;">100</span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">IF</span> lPrintPrijs .OR. lPrintVerkoop<br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'prijs'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">55</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />        oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />    nCol := nCol + <span style="color: #000000;">55</span><br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> lPrintTotaal<br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'totaal'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">55</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br />        oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />    nCol := nCol + <span style="color: #000000;">55</span><br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> lPrintVak<br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'vak'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span>cFontName, nPrintFontSize <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span><br />nCol := <span style="color: #000000;">0</span><br />nGroupRow := nRow<br /><span style="color: #00C800;">IF</span> ndubbelRij<br />    nRow++<br />    nRow++<br />    nGroupHeight := <span style="color: #000000;">55</span><br /><span style="color: #00C800;">ELSE</span><br />    nRow++<br />    nGroupHeight := <span style="color: #000000;">35</span><br /><span style="color: #00C800;">ENDIF</span><br />@ oPrn:<span style="color: #000000;">RowPos</span><span style="color: #000000;">&#40;</span>nRow<span style="color: #000000;">&#41;</span>-nGroupHeight, <span style="color: #000000;">0</span> GROUP oGroup <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">SIZE</span> oPrn:<span style="color: #000000;">pageWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, nGroupHeight <span style="color: #0000ff;">OF</span> oPrn<br />        oGroup:<span style="color: #000000;">setBorderType</span><span style="color: #000000;">&#40;</span>bezelBorder<span style="color: #000000;">&#41;</span><br />        oGroup:<span style="color: #000000;">setStyle</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />        <br /><span style="color: #00C800;">RETURN</span><br /><br />*************************************************<br /><br /><span style="color: #00C800;">FUNCTION</span> RK_PrintShort<span style="color: #000000;">&#40;</span>cText, nMaxBreedte, cfontName, nFontSize<span style="color: #000000;">&#41;</span><br />*<span style="color: #0000ff;">to</span> make a <span style="color: #0000ff;">text</span> shorter <span style="color: #00C800;">for</span> fitting in a <span style="color: #00C800;">print</span> <span style="color: #0000ff;">say</span><br />*date: <span style="color: #000000;">20</span><span style="color: #000000;">-06</span><span style="color: #000000;">-2017</span><br /><br /><span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> TxtGetWidth<span style="color: #000000;">&#40;</span> cText, cfontName, nFontSize <span style="color: #000000;">&#41;</span> >= <span style="color: #000000;">&#40;</span>nMaxBreedte*<span style="color: #000000;">0.95</span><span style="color: #000000;">&#41;</span><br />    cText := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cText, <span style="color: #000000;">1</span>, LEN<span style="color: #000000;">&#40;</span>cText<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDDO</span><br /><br /><span style="color: #00C800;">RETURN</span> cText<br /><br />*************************************************<br /> </div>[/code:wgkxa05n] Also the user can print a smal book where there is one plant on every page. It looks like this:[url:wgkxa05n]http&#58;//www&#46;plantenkennis&#46;com/FiveMac/leaflet&#46;pdf[/url:wgkxa05n] Therefore I use this code: [code=fw:wgkxa05n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> RK_PrintLeaflet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />*<span style="color: #0000ff;">to</span> <span style="color: #00C800;">print</span> all plantinfo<br />*date: <span style="color: #000000;">13</span><span style="color: #000000;">-12</span><span style="color: #000000;">-2016</span><br />*date: <span style="color: #000000;">30</span><span style="color: #000000;">-10</span><span style="color: #000000;">-2018</span>, diverse aanpassingen zodat het printen op elke <span style="color: #0000ff;">printer</span> goed werkt<br />*A4 papier <span style="color: #000000;">595</span> px breed, <span style="color: #000000;">841</span>,<span style="color: #000000;">5</span> px hoog<br /><br />*<span style="color: #000000;">10</span> mm = <span style="color: #000000;">28</span> px<br /><br /><span style="color: #00C800;">LOCAL</span> cLatijnNaam<br /><span style="color: #00C800;">LOCAL</span> aGegevens<br /><span style="color: #00C800;">LOCAL</span> aKenmerken<br /><span style="color: #00C800;">LOCAL</span> cAanteken<br /><span style="color: #00C800;">LOCAL</span> cSnoei<br /><span style="color: #00C800;">LOCAL</span> cFoto<br /><span style="color: #00C800;">LOCAL</span> cText := <span style="color: #ff0000;">''</span><br /><span style="color: #00C800;">LOCAL</span> nMaxAantal := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> n<br /><span style="color: #00C800;">LOCAL</span> oSay, oImg<br /><br /><span style="color: #00C800;">PUBLIC</span> nCol := <span style="color: #000000;">28</span>   && de kolom waarop we printen<br /><span style="color: #00C800;">PUBLIC</span> nRow := <span style="color: #000000;">1</span>    && de rij waar we beginnen<br /><span style="color: #00C800;">PUBLIC</span> nPage := <span style="color: #000000;">1</span>       && paginanummer onderaan<br /><br /><span style="color: #00C800;">PUBLIC</span> oPrn:=TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetLeftMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetRightMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetTopMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetbottomMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">setPaperName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A4"</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">AutoPage</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">FOR</span> nPage = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#41;</span><br />    oPrn:<span style="color: #000000;">StartPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    nRow := <span style="color: #000000;">1</span><br />    cText := <span style="color: #ff0000;">''</span><br />    cLatijnNaam         := RK_GetLatijnseNaam<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />    aGegevens           := RK_CollectGegevens<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />    aKenmerken          := RK_CollectKenmerken<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />    cAanteken           := RK_GetAanteken<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />    cSnoei              := RK_GetSnoei<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />    cFoto               := cFotoPad + ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> + <span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">".jpg"</span><br /><br />*Latijnse naam<br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> cLatijnNaam <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">480</span>, <span style="color: #000000;">40</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />        oSay:<span style="color: #000000;">setTextColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">51</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />    nRow++<br />    <br />*foto<br />    @ oPrn:<span style="color: #000000;">RowPos</span><span style="color: #000000;">&#40;</span>nRow<span style="color: #000000;">&#41;</span>, <span style="color: #000000;">285</span> <span style="color: #0000ff;">IMAGE</span> oImg <span style="color: #0000ff;">OF</span> oPrn <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">240</span> FILENAME cFoto<br />        oImg:<span style="color: #000000;">SetFrame</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />*vaknr<br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aPrintArray<span style="color: #000000;">&#91;</span>nPage,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">240</span>, <span style="color: #000000;">18</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />    nRow++<br />    <br />*plantgegevens<br />    <span style="color: #00C800;">FOR</span> nGegevens = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aGegevens<span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>aGegevens<span style="color: #000000;">&#91;</span>nGegevens,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />            <span style="color: #00C800;">IF</span> TxtGetWidth<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>aGegevens<span style="color: #000000;">&#91;</span>nGegevens,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">': '</span> + ALLTRIM<span style="color: #000000;">&#40;</span>aGegevens<span style="color: #000000;">&#91;</span>nGegevens,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"Arial"</span>, <span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span> < <span style="color: #000000;">255</span><br />                cText := cText + ALLTRIM<span style="color: #000000;">&#40;</span>aGegevens<span style="color: #000000;">&#91;</span>nGegevens,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">': '</span> + ALLTRIM<span style="color: #000000;">&#40;</span>aGegevens<span style="color: #000000;">&#91;</span>nGegevens,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> + CR_LF<br />            <span style="color: #00C800;">ELSE</span><br />                cText := cText + ALLTRIM<span style="color: #000000;">&#40;</span>aGegevens<span style="color: #000000;">&#91;</span>nGegevens,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">': '</span> + CR_LF<br />                cText := cText + SPACE<span style="color: #000000;">&#40;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span> + ALLTRIM<span style="color: #000000;">&#40;</span>aGegevens<span style="color: #000000;">&#91;</span>nGegevens,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> + CR_LF<br />            <span style="color: #00C800;">ENDIF</span><br />        <span style="color: #00C800;">ELSE</span><br />            cText := cText + SPACE<span style="color: #000000;">&#40;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span> + ALLTRIM<span style="color: #000000;">&#40;</span>aGegevens<span style="color: #000000;">&#91;</span>nGegevens,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> + CR_LF<br />        <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">NEXT</span><br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> cText <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">250</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />    <br />    <span style="color: #00C800;">IF</span> nRow < <span style="color: #000000;">13</span><br />        nRow := <span style="color: #000000;">13</span><br />    <span style="color: #00C800;">ENDIF</span><br /><br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Kenmerken'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial Black"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />        nRow++<br /><br />    @ oPrn:<span style="color: #000000;">RowPos</span><span style="color: #000000;">&#40;</span>nRow<span style="color: #000000;">&#41;</span>, nCol  LINE <span style="color: #0000ff;">HORIZONTAL</span> <span style="color: #0000ff;">SIZE</span> oPrn:<span style="color: #000000;">pageWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn<br /><br />    <span style="color: #00C800;">FOR</span> nKenmerken = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aKenmerken<span style="color: #000000;">&#41;</span><br />        @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aKenmerken<span style="color: #000000;">&#91;</span>nKenmerken,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> + <span style="color: #ff0000;">':'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">90</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />        @ nRow, nCol<span style="color: #000000;">+100</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aKenmerken<span style="color: #000000;">&#91;</span>nKenmerken,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">450</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />        nRow++<br />    <span style="color: #00C800;">NEXT</span><br /><br />    <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>cAanteken<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />        cAanteken := RK_GetTextFromRich<span style="color: #000000;">&#40;</span>cAanteken<span style="color: #000000;">&#41;</span><br />        nLines := MLCount<span style="color: #000000;">&#40;</span>cAanteken, <span style="color: #000000;">95</span>, <span style="color: #000000;">3</span>, .T. <span style="color: #000000;">&#41;</span> <br />        @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Aantekeningen'</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial Black"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />        nRow++<br />        @ oPrn:<span style="color: #000000;">RowPos</span><span style="color: #000000;">&#40;</span>nRow<span style="color: #000000;">&#41;</span>, nCol LINE <span style="color: #0000ff;">HORIZONTAL</span> <span style="color: #0000ff;">SIZE</span> oPrn:<span style="color: #000000;">pageWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn<br />        @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> cAanteken <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">525</span>, <span style="color: #000000;">200</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />    <br />        nRow := nRow + nLines<br />    <span style="color: #00C800;">ENDIF</span><br /><br />    <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>cSnoei<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span> .AND. oPrn:<span style="color: #000000;">LastRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>-nRow > <span style="color: #000000;">4</span><br />    <br />        @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Snoei: '</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial Black"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />        nRow++<br /><br />        @ oPrn:<span style="color: #000000;">RowPos</span><span style="color: #000000;">&#40;</span>nRow<span style="color: #000000;">&#41;</span>, nCol LINE <span style="color: #0000ff;">HORIZONTAL</span> <span style="color: #0000ff;">SIZE</span> oPrn:<span style="color: #000000;">pageWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oPrn<br /><br />        @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> cSnoei <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>, <span style="color: #000000;">&#40;</span>oPrn:<span style="color: #000000;">LastRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>-nRow<span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>*<span style="color: #000000;">20</span><br />            oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br />    <br />    RK_PrintFooter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">NEXT</span><br /><br />oPrn:<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />*************************************************<br /> </div>[/code:wgkxa05n] At last we can print a flowering scheme, where you can see in which month there is flowering something. You can also see the colors. Look for a example here: [url:wgkxa05n]http&#58;//www&#46;plantenkennis&#46;com/FiveMac/flowerperiod&#46;pdf[/url:wgkxa05n] And here is the code for it: [code=fw:wgkxa05n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> RK_PrintGrafiek<span style="color: #000000;">&#40;</span>cPrintTitel<span style="color: #000000;">&#41;</span><br />* <span style="color: #0000ff;">to</span> <span style="color: #00C800;">print</span> a raster with flowering periods<br />* date: <span style="color: #000000;">20</span><span style="color: #000000;">-06</span><span style="color: #000000;">-2017</span><br /><br /><span style="color: #00C800;">LOCAL</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">LOCAL</span> aKleur<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">218</span>, <span style="color: #000000;">185</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && abrikoos<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>        && blauw<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">244</span>, <span style="color: #000000;">164</span>, <span style="color: #000000;">96</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>     && brons<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">217</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && creme<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>      && geel<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>        && groen<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">162</span>, <span style="color: #000000;">200</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && lila<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">224</span>, <span style="color: #000000;">176</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && mauve<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">165</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>      && oranje<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">170</span>, <span style="color: #000000;">0</span> ,<span style="color: #000000;">255</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>      && paars<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>      && purper<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>        && rood<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">203</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && roze<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">238</span>, <span style="color: #000000;">130</span>, <span style="color: #000000;">238</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && violet<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">230</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && wit<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">114</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>    && zalm<br />    AADD<span style="color: #000000;">&#40;</span>aKleur, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> ,<span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>          && zwart<br /><br /><span style="color: #00C800;">PUBLIC</span> nCol := <span style="color: #000000;">28</span>   && de kolom waarop we printen<br /><span style="color: #00C800;">PUBLIC</span> nRow := <span style="color: #000000;">1</span>    && de rij waar we beginnen<br /><span style="color: #00C800;">PUBLIC</span> nPage := <span style="color: #000000;">1</span>       && paginanummer onderaan<br /><br /><span style="color: #00C800;">PUBLIC</span> oPrn:=TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetLeftMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetRightMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetTopMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">SetbottomMargin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">setPaperName</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A4"</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #000000;">AutoPage</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">StartPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />@ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> cPrintTitel <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">450</span>, <span style="color: #000000;">20</span><br />    oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">12</span> <span style="color: #000000;">&#41;</span><br />    <br />nRow++<br />RK_PrintBloeiHeader<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <br /><span style="color: #00C800;">FOR</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#41;</span><br />        cText := RK_PrintShort<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>RK_GetLatijnseNaam<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">220</span>, <span style="color: #ff0000;">"Arial"</span>, <span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />        nColor := RK_GetKleur<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />        aMaand := RK_CollectBloeiMaanden<span style="color: #000000;">&#40;</span>aPrintArray<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />    <br />    @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> cText <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    @ nRow, nCol<span style="color: #000000;">+200</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span>aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    @ nRow, nCol<span style="color: #000000;">+225</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span>aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    @ nRow, nCol<span style="color: #000000;">+250</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span>aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    @ nRow, nCol<span style="color: #000000;">+275</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span>aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    @ nRow, nCol<span style="color: #000000;">+300</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span>aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    @ nRow, nCol<span style="color: #000000;">+325</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span>aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    @ nRow, nCol<span style="color: #000000;">+350</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span>aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    @ nRow, nCol<span style="color: #000000;">+375</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span>aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    @ nRow, nCol<span style="color: #000000;">+400</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#93;</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span>aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    @ nRow, nCol<span style="color: #000000;">+425</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span>aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    @ nRow, nCol<span style="color: #000000;">+450</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">11</span><span style="color: #000000;">&#93;</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span>aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    @ nRow, nCol<span style="color: #000000;">+475</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">''</span> <span style="color: #0000ff;">OF</span> oPrn PAGINED <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">Setfont</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aMaand<span style="color: #000000;">&#91;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span>aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aKleur<span style="color: #000000;">&#91;</span>nColor,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            oSay:<span style="color: #000000;">setBkColor</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />        oSay:<span style="color: #000000;">setBezeled</span><span style="color: #000000;">&#40;</span>.t.,.f.<span style="color: #000000;">&#41;</span> <br />    nRow++<br /><br />    <span style="color: #00C800;">IF</span> nRow > oPrn:<span style="color: #000000;">LastRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-3</span><br />        RK_PrintFooter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        nPage++<br />        nRow := <span style="color: #000000;">1</span><br />        oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        oPrn:<span style="color: #000000;">StartPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        RK_PrintBloeiHeader<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">NEXT</span><br /><br />RK_PrintFooter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />oPrn:<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /> </div>[/code:wgkxa05n]
printing several pages
René, Great work! Many thanks for sharing your code with all of us. Really nice <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
prnstat
alguien a podido poner a funcionar a PRNSTAT siempre lanza 4096 STATUS_NOT_AVAILABLE o tengo otra forma en harbour de simular la isprinter() agradezco la ayuda.
prnstat
Si es una funcion muy necesaria ya q trabajo con la plataforma de windows 2000 y xp. siemepre manda ese codigo de error. Heeeeeeelllllllllllllllllllpppppppppppppp!!!!!!!!!!!!!
prnstat
Ambos Harbour y xHarbour implementan IsPrinter( <puerto> ). ¿ La habeis probado ?
prnstat
Antonio, Si pruebo IsPrinter y el resultado es el mismo efecto que PrnStatus siempre me retorna .T. y ni tengo conectado nada en el puerto. Uso el Harbour que envias en el FTDN estoy usando el ultimo de Julio uso BCC++ 5.5.1 Muchas Gracias.
prob with brc32
Hi i have a problem in my migration to harbourI can't create my .res to be link in the appBRC32 -r file.rc (i use Borland C++ 5.5.1)it don't create something I've tried many [options] of BRC32 and BRCC32 and never generate any file.resThanks for help
prob with brc32
In fact in my batch file it doesn't work but when i go in a dos box and input at the prompt "BRCC32 -32 file.rc" it generate my file.resI don't understand why it didn't work in the batch file
prob with brc32
Dear Patili,Don't you forget to create BCC32.CFG and ILINK32.CFG as followingBCC32.CFG-IC:\BCC55\INCLUDE-LC:\BCC55\LIBILINK32.CFG-LC:\BCC55\LIBDutch
prob with brc32
Patrick,> it don't create something What error do you get on the screen ? It should report an error.
prob with brc32
Sometimes i think i am [b:11ccwvwi]very stupid [/b:11ccwvwi]In my batch i've put"ECHO brcc32 -32 file.rc"I just cut ECHO and everything is clear[b:11ccwvwi][color=red:11ccwvwi]I AM RED WITH THE SHAME!!!!!! [/b:11ccwvwi][/color:11ccwvwi]But i have an other error : I can't preview my printshERE IS ERROR LOG"Application=========== Path and name: C:\titus\PRG\titus.exe (32 bits) Size: 1,585,664 bytes Time from start: 0 hours 0 mins 25 secs Error occurred at: 20/11/08, 14:06:23 Error description: Error FiveWin/3 Cannot create Dialog Box: Resource: PREVIEW_PROCStack Calls=========== Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR(0) Called from: => TDIALOG:ACTIVATE(0) Called from: => TREPORT:ACTIVATE(0) Called from: VACCIN.prg => IMPLISTE(275) Called from: VACCIN.prg => (b)VACCIN(100) Called from: => TBUTTON:CLICK(0) Called from: => TBUTTON:HANDLEEVENT(0) Called from: .\source\classes\WINDOW.PRG => _FWH(0) Called from: => SENDMESSAGE(0) Called from: => TDIALOG:COMMAND(0) Called from: => TWINDOW:HANDLEEVENT(0) Called from: => TDIALOG:HANDLEEVENT(0) Called from: => DIALOGBOX(0) Called from: => TDIALOG:ACTIVATE(0) Called from: VACCIN.prg => VACCIN(108) Called from: VACCIN.prg => VACCIN0(9) Called from: TITUS.prg => (b)BARRE(481) Called from: => TBTNBMP:CLICK(0) Called from: => TBTNBMP:LBUTTONUP(0) Called from: => TWINDOW:HANDLEEVENT(0) Called from: => TCONTROL:HANDLEEVENT(0) Called from: => TBTNBMP:HANDLEEVENT(0) Called from: .\source\classes\WINDOW.PRG => _FWH(0) Called from: => WINRUN(0) Called from: => TWINDOW:ACTIVATE(0) Called from: TITUS.prg => PRINCIPALE(394)THANKS
prob with brc32
Patrick,Please remember to copy FWH\DLL\prev32.dll to the folder where your EXE is located.
prob with brc32
Patili:Perhaps you have not the PREV32.DLL file in the exe's folder.Regards
prob with brc32
Yes it works fineThank you twoPatrick
prob with brc32
Hello everybody,Concerning PREV32.DLL, I can do this proposition.I imported all the resources of PREV32.DLL into my own DLL-file or RES-file. And it works very well.It was a great help for me since I don't have to take care about PREV32.DLL anymore.
prob with brc32
Michel,Yes, thats a good solution to avoid prev32.dll <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
probando Tdolphin
Buenas tardes, primero agradecer a Daniel por su trabajo Estoy probando los ejemplos con conexiones remotas y con la opción Embedded, la pregunta habrá una manera de coexistencia de las dos opciones en un solo exe? El tema es que se utilizan dos librerias libmysqld.lib, libmysql.lib que tal parece manejan funciones similares saludos Marcelo
probando fivenet
hola foro estoy viendo como ejecutar un dll en C# y he corrido el fivenet y me da este error error BASE/1005 No exported variable: TEXT Puede ayudarme en la solucion Saludos Arturo