NTK and The NTK Project
are properties of Jn Dechereux
Home | Documentation | FAQ.

Vanilla 1.1.8 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorMarkus II
    • CommentTimeJul 11th 2011
     
    La bibliothèque d'impression MKPRINTLIB est enfin fonctionnelle.
    Je la mettrais bientôt en version Démo sur mon site.
    Son fonctionnement est très simple pour le développeur, vous faites tout avec un simple éditeur de texte. Parmi les possibilités :
    Objets texte, image, ligne (prochainement rectangle, cercle, photo)
    Gestion des polices
    Gestion des stylos
    Blocs d'impression conditionnels (pour le corps pour l'instant, et pour l'entête et le pied de page prochainement)
    Blocs d'impression de taille variable (impression d'étiquette dans l'avenir)

    Le mieux c'est de voir l'exemple ci-dessous...

    Markus II
    •  
      CommentAuthorMarkus II
    • CommentTimeJul 11th 2011
     
    le fichier masque d'impression :
    •  
      CommentAuthorMarkus II
    • CommentTimeJul 11th 2011
     
    ...Le code :
    ...et le code :

    FUNCTION IMPRIME_RESULT(hWnd)
    LOCAL OldRecno := RECNO()

    //----------------------------------------------- Get printer informations
    LOCAL aPrinter := GetPrinters(.T.)
    LOCAL cPrinter := GetDefaultPrinter()

    PRIVATE hPrintDC := NTK_GetPrintDC()

    IF hPrintDC == 0
    RETURN
    ENDIF

    //------------------------------------ Load printer geometry
    PRIVATE PrinterGeometry := {0,0,0,0,0,0,0,0,0,0,0,0,0,.T.}
    PRINTER_GEOMETRY( hPrintDC )

    //------------------------------------ Load print mask
    PRIVATE NameEdit := 0
    PRIVATE PageHeight := 0
    PRIVATE PageWidth := 0
    PRIVATE HeadHeight := 0
    PRIVATE FootHeight := 0

    PRIVATE PrinterImg := {}
    PRIVATE PrinterFont := {}
    PRIVATE PrinterLine := {}
    PRIVATE PrinterEval := {}
    PRIVATE PrinterObjet := {}

    LOAD_SHEETMASK(P__RES+"\Impression\Resultat.frm")

    //------------------------------ Begin Printing
    SELECT DBresultat
    GO TOP

    START_PRINTING()

    FOR i:=1 TO LEN(PrinterFont)
    DELETE FONT PrinterFont[i,2]
    NEXT

    GO OldRecno

    RETURN

    Et voilà, rien de plus simple.

    Patientez un peu, le temps que je mette ça en ligne.

    MArkus II
    •  
      CommentAuthorMarkus II
    • CommentTimeJul 11th 2011
     
    Un exemple généré avec PDFcreator (imprimante postcript virtuel)