English
Help Files

CHM-Helpfile: XProfan X2

Helpfile (CHM)- Bugs

18.1 - Print with XProfan

 
in the Beispielquelltext is devmode& twice declared -
XProfan 11 reports therefore a Error as well as because of into Header-Files not existenter Definitionen.

The Results voices imho neither:


24 kB
Hochgeladen:12/17/10
Downloadcounter267
Download
 
12/17/10  
 



The TIP from the Help - time 3,43 To take - is super, I could my printer so by
CompileMarkSeparation
 {$cleq}
StartPrint
writeini progDir+"printercallib.ini","nfo","x"=getDeviceCaps(PDC,HORZSIZE)*3.43
writeini progDir+"printercallib.ini","nfo","y"=getDeviceCaps(PDC,VERTSIZE)*3.43
endPrint
En
Kalibrier-Information abzwacken and a rectangle-pressure fit then well too very into maximum-possible Druckbereich.
 
12/17/10  
 




Andreas
Miethe


here one old ( 2000) Code me, Perhaps helps it Yes.
CompileMarkSeparation
Def @AGetDeviceCaps(2) ! "GDI32","GetDeviceCaps"
Def @ACreateDC(4) ! "GDI32","CreateDCA"
Def @DeleteDC(1) ! "GDI32","DeleteDC"
Declare PDC&,APX!,APY!,PB!,PH!,POX!,POY!,DPIX!,DPIY!,PBMM!,PHMM!,RMM!
Declare PMAX!,PMAY!
Declare drv#,name#,port#
Declare device$,driv$,port$
Declare POR!,PUR!
Declare PLR!,PRR!

Proc GetPrinterDC

    'Printer-DC ermitteln
    DIM drv#,100
    DIM name#,100
    DIM port#,100
    LET device$=@readini$("win.ini","windows","device")
    LET device$=@substr$(@readini$("win.ini","windows","device"),1,",")
    LET driv$= @substr$(@readini$("win.ini","devices",device$),1,",")+".drv"
    LET port$=@substr$(@readini$("win.ini","devices",device$),2,",")
    String name#,0=device$
    String drv#,0=driv$
    String port#,0=port$
    Let PDC&=@ACreateDC(drv#,name#,port#,0)
    dispose drv#
    dispose name#
    dispose port#

EndProc

Proc Werte_Ermitteln

    'Werte ermitteln
    Let APX!=@AGetDeviceCaps(PDC&,8)'Ausgabebreite in Pixel
    Let APY!=@AGetDeviceCaps(PDC&,10)'AusgabeHoehe in Pixel
    Let PB!=@AGetDeviceCaps(PDC&,110)'Physikalische Breite
    Let PH!=@AGetDeviceCaps(PDC&,111)'Physikalische Hoehe
    Let POX!=@AGetDeviceCaps(PDC&,112)'Offset X
    Let POY!=@AGetDeviceCaps(PDC&,113)'Offset Y
    Let DPIX!=@AGetDeviceCaps(PDC&,88)'DPI X
    Let DPIY!=@AGetDeviceCaps(PDC&,90)'DPI Y
    Let PBMM!=@AGetDeviceCaps(PDC&,4)'Ausgabebreite in mm
    Let PHMM!=@AGetDeviceCaps(PDC&,6)'Ausgabehoehe in mm

EndProc

Proc Ausgabe

    'Werte ausgeben
    UseFont "Arial",18,0,1,0,0
    Drawtext 10,0,"Standard-Drucker : "+Device$
    UseFont "Courier New",15,0,0,0,0

    if @AGetDeviceCaps(PDC&,2) = 2

        Drawtext 10,20,"Rasterdrucker"

    endif

    Decimals 0
    Drawtext 10,60,"Ausgabebreite in Pixel         :  "+str$(APX!)
    Drawtext 340,60,"Ausgabehöhe in Pixel         :  "+str$(APY!)
    Drawtext 10,80,"Physikalische Breite in Pixel  :  "+str$(PB!)
    Drawtext 340,80,"Physikalische Höhe in Pixel  :  "+str$(PH!)
    Drawtext 10,100,"Physikalische Offset X         :  "+str$(POX!)
    Drawtext 340,100,"Physikalische Offset Y       :  "+str$(POY!)
    Drawtext 10,120,"Aufloesung Breite (DPI)        :  "+str$(DPIX!)
    Drawtext 340,120,"Aufloesung Höhe (DPI)        :  "+str$(DPIY!)
    Drawtext 10,140,"Ausgabebreite in mm            :  "+str$(PBMM!)
    Drawtext 340,140,"Ausgabebreite in mm          :  "+str$(PHMM!)
    UseFont "Arial",18,0,1,0,1
    DrawText 10,180,"Aus diesen ermittelten Werten lassen sich die Druckränder"
    DrawText 10,200,"für den Standard-Drucker errechnen"
    UseFont "Courier New",15,0,0,0,0
    DrawText 10,240,"Linker Rand in Pixel   :  "+STR$(POX!)
    DrawText 340,240,"Rechter Rand in Pixel  :  "+STR$((PB!-APX!)-POX!)
    DrawText 10,260,"Oberer Rand in Pixel   :  "+STR$(POY!)
    DrawText 340,260,"Unterer Rand in Pixel  :  "+STR$((PH!-APY!)-POY!)
    Decimals 1
    Let PLR!=ROUND((PBMM!/APX!)*POX!,1)
    Let PRR!=ROUND(((PBMM!/APX!)*((PB!-APX!)-POX!)),1)
    Let POR!=ROUND(((PHMM!/APY!)*POY!),1)
    Let PUR!=ROUND(((PHMM!/APY!)*((PH!-APY!)-POY!)),1)
    DrawText 10,280,"Linker Rand in mm      :  "+STR$(PLR!)
    DrawText 340,280,"Rechter Rand in mm     :  "+STR$(PRR!)
    DrawText 10,300,"Oberer Rand in mm      :  "+STR$(POR!)
    DrawText 340,300,"Unterer Rand in mm     :  "+STR$(PUR!)
    Decimals 0
    DrawText 10,340,"Blattgrösse X in mm    :  "+STR$(((PBMM!+PLR!)+PRR!))
    DrawText 340,340,"Blattgrösse Y in mm    :  "+STR$(((PHMM!+POR!)+PUR!))
    Textcolor rgb(255,0,0),rgb(192,192,192)
    UseFont "Courier New",16,0,1,0,0

    If APX! > APY!

        Drawtext 10,40,"Querformat"

    else

        Drawtext 10,40,"Hochformat"

    endif

    Textcolor rgb(255,255,0),rgb(192,192,192)
    UseFont "Arial",14,0,1,0,0
    Drawtext 10,360,"BEACHTE : Die errechneten Werte hängen von der Auflösung und der Papiersorte bzw. Papiergrösse ab, "
    Drawtext 10,380,"die in der Druckereinstellung vorgenommen wurde !"

EndProc

SetTruecolor 1
cls rgb(192,192,192)
Textcolor rgb(0,0,0),rgb(192,192,192)
UseFont "Arial",18,0,1,0,1
UseCursor 2
Drawtext 10,410,"Ermittle Werte für den Standard-Drucker"
GetPrinterDC
Werte_ermitteln
Rectangle 0,8-630,356
Ausgabe
UseFont "Arial",18,0,1,0,1
Textcolor rgb(255,0,0),rgb(192,192,192)
Drawtext 10,410,"Werte für den Standard-Drucker ermittelt"
UseCursor 0
waitinput
@DeleteDC(PDC&>)'Printer-DC enable
end
 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
12/17/10  
 



Ha, How calm is the because!

have just manual/ analoges calibrate ready and then come You with such Leckerlie...



On each drop large Thank you!

15 kB
Hochgeladen:12/17/10
Downloadcounter243
Download
 
12/17/10  
 



Nachtrag: nevertheless I will for my tack with of/ one manuellen Kalibriermethode stay there these The tatsächlichen instead of theoretical values uses and here in my drop so interessanterweise accurate is:
CompileMarkSeparation
 {$cl}
 {$runtime C:\p00x\}
messagebox "Ein Leerblatt und ein Kalibrierblatt werden gedruckt.\n\nBitte 2 Blatt Normalpapier einlegen.","Achtung!",4096
StartPrint
writeini progDir+"printercalib.ini","nfo","x"=str$(getDeviceCaps(PDC,HORZSIZE)*3.43)
writeini progDir+"printercalib.ini","nfo","y"=str$(getDeviceCaps(PDC,VERTSIZE)*3.43)
endPrint
float 	pxx=val(readini$(progDir+"printercalib.ini","nfo","x")),\
pyy=val(readini$(progDir+"printercalib.ini","nfo","y"))
startPrint "Kalibrierblatt"
usePen 0,0,0
useBrush 0,0
rectangle 0,0 - pxx,pyy
endPrint
messagebox "Nutzen Sie ein LINEAL! und messen Sie wieviel Abstand von der linken Linie zum linken Papierrand besteht und schreiben Sie die Anzahl der MILLImeter links auf das Papier.","Wichtig:",4096
messagebox "Messen Sie wieviel Abstand von der oberen Linie zum oberen Papierrand besteht und schreiben Sie die Anzahl der MILLImeter oben auf das Papier.","Wichtig:",4096
messagebox "Messen Sie wieviel Abstand von der rechten Linie zum rechten Papierrand besteht und schreiben Sie die Anzahl der MILLImeter rechts auf das Papier.","Wichtig:",4096
messagebox "Messen Sie wieviel Abstand von der unteren Linie zum unteren Papierrand besteht und schreiben Sie die Anzahl der MILLImeter unten auf das Papier.","Wichtig:",4096
writeini progDir+"printercalib.ini","nfo","leftmargin"=str$(val(input$("Wieviele Millimeter linker Abstand?","Frage:",""))*3.43)
writeini progDir+"printercalib.ini","nfo","rightmargin"=str$(val(input$("Wieviele Millimeter rechter Abstand?","Frage:",""))*3.43)
writeini progDir+"printercalib.ini","nfo","topmargin"=str$(val(input$("Wieviele Millimeter oberer Abstand?","Frage:",""))*3.43)
writeini progDir+"printercalib.ini","nfo","bottommargin"=str$(val(input$("Wieviele Millimeter unterer Abstand?","Frage:",""))*3.43)
messagebox "Kalibrierung fertig.","Wichtig:",4096
End

so can I then z.B. Etiketten by:
CompileMarkSeparation
'URL: https://XProfan.com/intl/de/quelltexte/barcode-code39-print-Generate/
 {$cl}
 {$runtime C:\dev\BCP5000\}
float 	pxx=val(readini$(progDir+"printercalib.ini","nfo","x"))+val(readini$(progDir+"printercalib.ini","nfo","leftmargin"))+val(readini$(progDir+"printercalib.ini","nfo","rightmargin")),\
pyy=val(readini$(progDir+"printercalib.ini","nfo","y"))+val(readini$(progDir+"printercalib.ini","nfo","topmargin"))+val(readini$(progDir+"printercalib.ini","nfo","bottommargin")),\
xxh=pxx*0.33333333333333333333333333333333,\
yyh=pyy*0.14285714285714285714285714285714,\
x,y,\
xxz=xxh*0.1,\
yyz=yyh*0.15,\
minux=val(readini$(progDir+"printercalib.ini","nfo","leftmargin")),\
minuy=val(readini$(progDir+"printercalib.ini","nfo","topmargin")),\
px,py,pxx,pyy

if pxx==0

    shell "printercalib.exe"
    end

endif

long 	i,o
window maxx,maxy
startPrint "Ketietten"// 3 next to each other 7 among themselves
usePen 0,0,0
useBrush 0,0

whileLoop 0,6

    y=loop*yyh

    whileLoop 0,2

        x=loop*xxh
        px=x-minux
        py=y-minuy
        pxx=x+xxh-minux
        pyy=y+yyh-minuy
        rectangle px,py - pxx,pyy

    wend

wend

endPrint
end

print and it is correct on the Millimeter.

with Use the theoretical ermittelten values sustain I against Abweichungen in the Druckbild of up to 3 Millimetern per edge.
 
12/17/10  
 



Zur Funktionsreferenz


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.601 Views

Untitledvor 0 min.
Uwe Lang06/19/23
RudiB.02/07/22
Sven Bader07/11/21
Manfred Barei05/16/21
More...

Themeninformationen

this Topic has 2 subscriber:

iF (4x)
Andreas Miethe (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie