terça-feira, 19 de junho de 2018

Comandos PCL

PCL Horizontal Column Spacing (HMI)

Ec &k#H

Set HMI = #/120"
PCL Vertical Line Spacing

Ec &l#C

Set VMI = #/48"

Ec &l1D

1 LPI

Ec &l2D

2 LPI

Ec &l3D

3 LPI

Ec &l4D

4 LPI

Ec &l6D

6 LPI

Ec &l8D

8 LPI

Ec &l0D

12 LPI

Ec &l#D

Set Line Spacing to # LPI

Ec =

Half Line Feed

Ec &u#D

Set # dpi dot resolution

Ec &a0N

Contains negative motion

Ec &a1N

No negative motion
HP PCL Deskjet print modes

Ec &k0W

Unidirectional printing

Ec &k1W

Bidirectional printing

Ec &k2W

Unidirectional right-to-left

Ec &k5W

66-line Text Scale mode

Ec &k6W

Text Scale mode off
HP PCL Deskjet raster graphics print modes

Ec *p1N

Bidirectional graphics

Ec *p2N

Graphics print mode left-to-right

Ec *p3N

Graphics print mode right-to-left

Ec *p4N

Smart bidirectional graphics

Ec *p#N

graphics print mode #
PCL Absolute positioning

Ec &a#R

Move to Row #

Ec *p#Y

Vert position = # Dots

Ec &a#V

Vert position # Decipoints

Ec &a#C

Move to Column #

Ec *p#X

Horiz position = # Dots

Ec &a#H

Horiz position # Decipoints
PCL Relative Positioning

Ec &a+#R

Move down # rows

Ec *p+#Y

Move down # Dots

Ec &a+#V

Move down # Decipoints

Ec &a+#C

Move right # cols

Ec *p+#X

Move right # Dots

Ec &a+#H

Move right # Decipoints

Ec &a-#R

Move up # rows

Ec *p-#Y

Move up # Dots

Ec &a-#V

Move up # Decipoints

Ec &a-#C

Move left # cols

Ec *p-#X

Move left # Dots

Ec &a-#H

Move left # Decipoints

Ec &f0S

Push Cursor Position

Ec &f1S

Pop Cursor Position
PCL Page Orientation

Ec &l0O

Portrait

Ec &l1O

Landscape

Ec &l#O

Orientation #

Ec &a0P

Rotation 0

Ec &a90P

Rotation 90 (portrait -> landscape)

Ec &a180P

Rotation 180

Ec &a270P

Rotation 270 (landscape -> portrait)

Ec &a#P

Rotation # degrees
PCL Font Selection

Ec (#a

see PCL font selection

Ec (8U

Roman-8 Symbol Set

Ec (11U

IBM Danish/Norwegian Symbol Set

Ec (10U

IBM-PC (USA) Symbol Set

Ec (9U

Windows 3.0 Symbol set

Ec (19U

Windows 3.1 Symbol set

Ec )8U

Roman-8 as Secondary Font Symbol Set

Ec )11U

IBM Danish/Norwegian as Secondary Font Symbol Set

Ec )10U

IBM-PC (USA) as Secondary Font Symbol Set

Ec )9U

Windows 3.0 Secondary Symbol set

Ec )19U

Windows 3.1 Secondary Symbol set
PCL Font Spacing

Ec (s1P

Proportional

Ec (s0P

Fixed Pitch

Ec (s#P

Unknown Font Spacing (#)!

Ec )s1P

Proportional Spacing for Secondary Font

Ec )s0P

Fixed Pitch Spacing for Secondary Font

Ec )s#P

Unknown Font Spacing (#)!

Ec (s#H

pitch # cpi

Ec )s#H

Secondary Font pitch # cpi

Ec (s#V

Point Size #

Ec )s#V

Secondary Font Point Size #
PCL Font Style

Ec (s0S

Upright

Ec (s1S

Italic

Ec (s#S

Font Style #

Ec )s0S

Secondary Font is Upright

Ec )s1S

Secondary Font is Italic

Ec )s#S

Secondary Font Style #
PCL Font Stroke Weight Selection

Ec (s-3B

Light Weight

Ec (s0B

Medium Weight

Ec (s3B

Bold

Ec (s#B

Weight #

Ec )s-3B

Secondary Font - Light Stroke Weight

Ec )s0B

Secondary Font - Medium Stroke Weight

Ec )s3B

Secondary Font - Bold Stroke Weight

Ec )s#B

Secondary Font - Weight #
PCL Font TypeFace Number Selection

Ec (s#T

Typeface #

Ec )s#T

Secondary Font - Typeface #
PCL Font Pitch Selection

Ec &k0S

Font Pitch 10.00 cpi

Ec &k2S

Font Pitch 16.66 cpi

Ec &k4S

Font Pitch 12.00 cpi

Ec (3@

Choose Default font as Primary Font

Ec (#@

Primary Font Requested Attribute Value #

Ec )3@

Choose Default font as Secondary Font

Ec (#@

Secondary Font Requested Attribute Value #
PCL Font Selection by identification

Ec (#X

Select Primary Font by ID (#)

Ec )#X

Select Secondary Font by ID (#)
PCL Font Management

Ec *c#D

Define Font Id #

Ec *c0F

Delete All Fonts

Ec *c1F

Delete All Temporary Fonts

Ec *c2F

Delete Last Font ID Specified

Ec *c3F

Delete LAst Font ID and Char Code

Ec *c4F

Make Font Temporary

Ec *c5F

Make Font Permanent

Ec *c6F

Copy/Assign

Ec *c#F

Unknown Font Manmagement Command (#F)!
PCL DownLoading Fonts

Ec *c#E...

ASCII Code # Decimal...

Ec )s#W...

Create Font Header of # Bytes...

Ec (s#W...

Download Character of # Bytes...

Ec *c#R

Define Symbol set ID #

Ec (f#W...

Define Symbol Set Characters (# Bytes)...

Ec *c5S

Make symbol set permanent

Ec *c#S

Symbol set control (#)

Ec &n#W...

Alphanumeric ID #...
PCL Double-byte text parsing

Ec &t0P

Single-byte chars

Ec &t1P

Single-byte chars

Ec &t#P

Double-byte mode #
PCL Rules

Ec *c#A

Rule Horizontal Size # Dots

Ec *c#H

Rule Horizontal Size # Decipoints

Ec *c#B

Rule Vertical Size # Dots

Ec *c#V

Rule Vertical Size # Decipoints

Ec *c0P

Print Black Rule

Ec *c1P

Print White Rule

Ec *c2P

Print Grey Scale

Ec *c3P

Print Cross-hatch Pattern

Ec *c4P

Print User-defined Pattern

Ec *c5P

Print Current Pattern
PCL patterns - same codes as for grey scale

Ec *c1G

HP Pattern 1 Horiz Line

Ec *c2G

HP Pattern 2 Vertical Line

Ec *c3G

HP Pattern 3 Diagonal Lines

Ec *c4G

HP Pattern 4 Diagonal Lines

Ec *c5G

HP Pattern 5 Square Grid

Ec *c6G

HP Pattern 6 Diagonal Grid

Ec *c#G

#% Grey Scale

Ec *p#R

pattern rotation #
PCL Raster Graphics

Ec *t#R

# DPI Graphics resolution

Ec *r0A

Start Graphics at Left Graphics Margin

Ec *r1A

Start Graphics at Current Cursor

Ec *r2A

Start Scaled Graphics at Left Graphics Margin

Ec *r3A

Start Scaled Graphics at Current Cursor

Ec *b#W...

# Graphics data bytes...

Ec *rB

End Graphics

Ec *rC

End Graphics with reset

Ec *r0F

Rotate image

Ec *r3F

LaserJet Landscape compatible

Ec *g#W...

Configure raster data # bytes

Ec *b#Y...

move vertically # raster lines...

Ec *r#T

raster height # pixels

Ec *r#S

raster width # pixels

Ec *t#V

scaled raster height #

Ec *t#H

scaled raster width #

Ec *b0M

uncompressed

Ec *b1M

run-length encodes

Ec *b2M

packbits (bytewise run-length)

Ec *b3M

delta row compression

Ec *b4M

block data

Ec *b5M

adaptive compression

Ec *b6M

CCITT3 1-D compression

Ec *b7M

CCITT3 2-D compression

Ec *b8M

CCITT4 compression
PCL Color DeskJet and PCL5 only

Ec *b9M

DeskJet compression

Ec *b#M

unknown row compression mode #

Ec *b#S

seed row # source

Ec *b#V...

# colour data bytes

Ec *r1Q

draft quality graphics

Ec *r2Q

NLQ graphics

Ec *r-3U

3-planes CYM

Ec *r-4U

4-planes CYMK

Ec *r1U

single plane palette

Ec *r3U

3-planes RGB

Ec *r#U

Unknown palette (#)

Ec *b#B

Gray Balance #

Ec *o#M

Print quality (#)

Ec *o#Q

raster graphics shingling (#)

Ec *o#D

raster graphics depletion (#)

Ec *c#W-

define pattern # bytes

Ec *p0R

rotate patterns

Ec *p1R

no pattern rotation

Ec *c#Q

temp/perm pattern mode #
PCL Obsolete functions

Ec *p#N

raster print mode #

Ec *r#Q

raster print quality #
PCL Color

Ec *v#S

foreground colour #

Ec &p#I

palette ID #

Ec &p0C

delete all palettes

Ec &p1C

clear palette stack

Ec &p2C

delete palette

Ec &p6C

copy palette to current ID

Ec &p#S

select palette ID #

Ec *v18W-

configure image data (RGB or CYM)

Ec *v30W-

configure image data (CIE L*a*b)

Ec *v86W-

configure image data (Colorimetric RGB)

Ec *v122W-

configure image data (Luminence-Chrominence)

Ec *v#W...

configure image data # bytes (RGB)

Ec &b0M

Mixed monochrome rendering

Ec &b1M

Gray equivalent

Ec *v#A

colour component 1=#

Ec *v#B

colour component 2=#

Ec *v#C

colour component 3=#

Ec *v#I

assign components to palette index #

Ec *p0P

push palette

Ec *p1P

pop palette

Ec *t#I

Gamma correction #

Ec *l#W...

Colour look-up table # bytes

Ec &b0F

Matte finish

Ec &b1F

Glossy finish

Ec &b#T

Dry time #

Ec *o#W...

Colour treatment
PCL Imaging

Ec *v0T

pattern = solid black

Ec *v1T

pattern = solid white

Ec *v2T

pattern = shading

Ec *v3T

pattern = cross-hatched

Ec *v4T

pattern = user-defined

Ec *v#T

Unknown shading pattern #

Ec *v0N

transparent source

Ec *v1N

opaque source

Ec *v0O

transparent pattern

Ec *v1O

opaque pattern

Ec *l#O

rasterOp #

Ec *t#J

halftone render algorithm #

Ec *m#W...

download dither matrix # bytes

Ec *l#R

Pixel placement #
PCL Macros

Ec &f#Y

Define Macro ID #

Ec &f0X

Start Macro Definition

Ec &f1X

End Macro Definition

Ec &f2X

Execute Macro

Ec &f3X

Call Macro

Ec &f4X

Enable Overlay

Ec &f5X

Disable Overlay

Ec &f6X

Delete Macros

Ec &f7X

Delete All Temporary Macros

Ec &f8X

Delete Macro ID

Ec &f9X

Make Temporary

Ec &f10X

Make Permanent
PCL diagnostics - Reset and Self Test

Ec E

Reset

Ec z

Self_Test

Ec Y

Display Functions On

Ec Z

Display Functions Off
PCL Underline

Ec &d0D

Single fixed Underline On

Ec &d2D

Double fixed Underline On

Ec &d3D

Single floating Underline On

Ec &d4D

Double floating Underline On

Ec &d#D

Underline (#) On

Ec &d@

Underline Off
PCL Line ending

Ec &s0C

Enable Line Wrap

Ec &s1C

Disable Line Wrap
PCL Paper Control (* only available on some printers)

Ec &l#X

Select # Copies

Ec &l#G

Select bin #

Ec &r#F

Flush pages #

Ec &l-1H

Feed Z-fold media

Ec &l0H

Eject Page

Ec &l0V

Conditional page feed

Ec &l1H

Feed from Tray 2

Ec &l2H

Manual Feed

Ec &l3H

Manual Envelope Feed

Ec &l4H

Feed from Tray 1

Ec &l5H

Feed from Tray 3

Ec &l6H

Optional envelope feeder

Ec &l7H

Auto select

Ec &l8H

Feed from tray 4*

Ec &l#H

Feed from external trays # (20-69)*

Ec &l#T

Job separation (#)

Ec &l0L

Disable Perf Skip

Ec &l1L

Enable Perf Skip

Ec &a0G

Next side

Ec &a1G

Front side

Ec &a2G

Back side

Ec &l0S

Simplex

Ec &l1S

Duplex Long-edge binding

Ec &l2S

Duplex Short-edge binding

Ec &l1T

Job separation - paper offset
PCL Paper Control - Obsolete

Ec &l1H

Feed from Tray 1 (upper)

Ec &l4H

Feed from Tray 2 (lower)

Ec &l5H

Feed from paper deck
PCL/HPGL

Ec *c#X

HP GL Picture frame width # decipoints

Ec *c#Y

HP GL Picture frame height # decipoints

Ec *c0T

HP GL Picture anchor point = current position

Ec *c#K

# inches HP GL plot width

Ec *c#L

# inches HP GL plot height
PCL Line Termination

Ec &k0G

CR=CR LF=LF FF=FF

Ec &k1G

CR=CR+LF Lf=LF FF=FF

Ec &k2G

CR=CR LF=CR+LF FF=CR+FF

Ec &k3G

CR=CR+LF LF=CR+LF FF=CR+FF

PCL Transparent Print data

Ec &p#X...

Transparent Print Data # Bytes...

Fonte : https://www.pclviewer.com/resources/reference/

terça-feira, 15 de maio de 2018

Comando para resgatar chave de produto da BIOS


Segue comando para executar no


CMD:


wmic path softwarelicensingservice get
oa3xoriginalproductkey

sexta-feira, 11 de maio de 2018

Script de pesquisa em lista Sharepoint

<script type="text/javascript">

    function RedirectUrl() {
        var tb = document.getElementById("tbSearch").value;
        var cs = document.getElementById("sfield").value;
        var url = "";

        if (tb != "") {
            if (cs == "Column2" || cs == "Column3" || cs == "Column4" || cs == "Column5") {
                url = "FilterField1=" + cs + "&FilterValue1=" + tb;
                window.location.href = "Lista%20Telefnica%20Completa.aspx?" + url;
            }
            else {
                url = "FilterName=" + cs + "&FilterMultiValue=*" + tb + "*";
                window.location.href = "Lista%20Telefnica%20Completa.aspx?" + url;
            }
        }
        else {
            return false;
        }

    }

function myFunction(event) {
var x = event.keyCode;
if (x == 13) {
event.preventDefault();
        return RedirectUrl();
}
}

</script>

<select id="sfield">
<option value="Title">Nome</option>
<option value="Matricula">Matrícula</option>
<option value="Empresa">Empresa</option>
<option value="Setor">Setor</option>       
</select>
<input id="tbSearch" type="text" onkeydown="myFunction(event)"/>
<input id="btnSearch" onclick="return RedirectUrl();" type="button" value="Procurar"/>

quarta-feira, 21 de fevereiro de 2018

segunda-feira, 12 de fevereiro de 2018

Instalar várias fontes via GPO





Crie uma pasta chamada Fontes no compartilhamento Netlogon de seu AD. Copie os arquivos TTF de fonte que você deseja que sejam instalados.

Parar criar o script, abra o notepad e insira o conteúdo abaixo:



‘************************************************************************************‘ SCRIPT PARA INSTALAR TODAS AS FONTES QUE ESTÃO EM UMA PASTA NO SERVIDOR
‘
‘ FONTE: www.nvlan.com.br
‘************************************************************************************
Option Explicit
dim WinScriptHost
Dim objShell, objFSO, wshShell
Dim strFontSourcePath, objFolder, objFont, objNameSpace, objFile, CopiarFontesDe
Set objShell = CreateObject(“Shell.Application”)
Set wshShell = CreateObject(“WScript.Shell”)
Set objFSO = createobject(“Scripting.Filesystemobject”)
‘************************************************************************************
‘ VARIAVEIS (ALTERE CONFORME A NECESSIDADE)
‘************************************************************************************
CopiarFontesDe = “\\SEU_DOMINIO.COM.BR\Netlogon\Fontes“
‘************************************************************************************
‘ INICIO DO SCRIPT
‘************************************************************************************
strFontSourcePath = objFSO.GetAbsolutePathName(CopiarFontesDe)
Set objNameSpace = objShell.Namespace(strFontSourcePath)
Set objFolder = objFSO.getFolder(strFontSourcePath)
For Each objFile In objFolder.files
If LCase(right(objFile,4)) = “.ttf” OR LCase(right(objFile,4)) = “.otf” Then
Set objFont = objNameSpace.ParseName(objFile.Name)
If objFSO.FileExists(“C:\WINDOWS\Fonts\” & objFile.Name) = False Then
objFont.InvokeVerb(“Install”)
Set objFont = Nothing
End If
End If
Next 



Na hora de salvar o arquivo, mude o tipo de extensão para todo o tipo de arquivo e salve localmente em seu computador como fonts.vbs. Agora abra o mmc, insira e abra o gerenciador de políticas de domínio, vá na OU que você deseja criar a política, nesta OU crie e associe uma política chamada Instala Fontes.

Edite esta nova política e navegue até Computer Configuration -> Policies -> Windows Configuration -> Scripts e abra Startup. Clique em Add, na tela seguinte coloque o nome fonts.vbs e clique em OK.

De volta a tela anterior clique em Show Files, na tela do explorer que abrir mova o arquivo fonts.vbs criado para esta pasta.

Fonte: http://nvlan.com.br/comunidade/instalar-varias-fontes-via-gpo/



terça-feira, 16 de janeiro de 2018

Adicionar resolução Linux

Se você não consegue a resolução que você sabe que seu monitor capaz de suportar, o problema pode estar não na sua placa de vídeo (especialmente se for uma Intel), mas no reconhecimento do próprio monitor pelo SO.

Vamos aprender a resolver isso pelo terminal, usando o xrandr.

Então, abra um terminal e digite:

$ xrandr

(o “$” não faz parte dos comandos, servindo para indicar que o comando é do usuário; se fosse o “#” no lugar do “$”, o comando seria do root)

Vc vai receber uma resposta mais ou menos assim:

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
VGA1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1920x1080_60.00 60.0*+ (*)
1440x900_60.00 59.9
1280x720_60.00 59.9
1024x768 60.0
1024x600_60.00 59.9
800x600 60.3 56.2
848x480 60.0
640x480 59.9

Se a resolução que você quer estiver listada — a lista em questão inicia com a marca que eu fiz acima, o (*) –, basta aplicá-la.

Por exemplo, eu estou usando minha resolução máxima da lista, mas não a máxima da placa (na primeira linha: “maximum 8192 x 8192”). E seu quiser usar a segunda da lista, tenho que rodar:

$ xrandr -s 1440x900

E o que fazer quando a resolução não consta da lista, mas cabe entre a mínima e a máxima da placa? Isto:

$ cvt 1366 768 60

A resposta será algo como…

# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz
Modeline "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync

Agora precisamos adicionar a resolução acima (1366x768_60) àquela primeira lista, assim:

$ xrandr --newmode (copie a partir das aspas da linha "Modeline", obtida com o cvt)

Fica assim:

$ xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync

E continua com a configuração do monitor, que no meu caso se chama “VGA1” (veja a linha em negrito da resposta ao comando xrandr), assim:

$ xrandr --addmode VGA1 1368x768_60.00

E, finalmente, com a aplicação da resolução:

$ xrandr --output VGA1 --mode 1368x768_60.00

RESUMINDO, vc deve rodar três linhas:

$ xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
$ xrandr --addmode VGA1 1368x768_60.00
$ xrandr --output VGA1 --mode 1368x768_60.00

Lembre-se de confirmar os valores acima, como o nome do monitor e as frequências para cada resolução, pois eles variam de máquina a máquina.

Se tudo deu certo, será preciso que os três comandos acima rodem no início da sua sessão.

Para tanto, você deve colocar as três linhas no arquivo .profile.

$ gedit ~/.profile

Ponha no final e não apague nada que já estiver lá.

Fonte: https://casadopinduvoz.wordpress.com/2013/05/25/forcar-resolucao-de-tela-no-linux/

Auto Login no CentOS

Alterar o arquivo /etc/gdm/custom.conf 

[deamon]
AutomaticLogin=usuario
AutomaticLoginEnable=True