topic
stringlengths
1
63
text
stringlengths
1
577k
Clase para leer DBF desde Dialogo
[quote="Antonio Linares":1ak43aro]Pruébalo con tu versión actual de FWH porque debería funcionarte <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> ( de no ser así, necesitas una versión de FWH actualizada) [code=fw:1ak43aro]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.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 />   USE clients<br />   XEdit<span style="color: #000000;">&#40;</span> , <span style="color: #ff0000;">"NAME,ADRESS"</span> <span style="color: #000000;">&#41;</span><br />   USE<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> xEdit<span style="color: #000000;">&#40;</span> uSource, cFieldList, lNew <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> FW_Record<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> uSource, cFieldList, lNew <span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:1ak43aro][/quote:1ak43aro] Uso la version 18.05
Clase para leer DBF desde Dialogo
Prueba así: [code=fw:1s39dqd4]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> XEdit<span style="color: #000000;">&#40;</span> uSource, cFieldList, lNew <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> TDataRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> uSource, cFieldList, lNew <span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:1s39dqd4]
Clase para leer DBF desde Dialogo
[quote="Antonio Linares":192tjhxe]Prueba así: [code=fw:192tjhxe]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> XEdit<span style="color: #000000;">&#40;</span> uSource, cFieldList, lNew <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> TDataRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> uSource, cFieldList, lNew <span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:192tjhxe][/quote:192tjhxe] Funciono Ok, Hay forma de organizar y/o posicionar en el Dialogo los campos usando esta funcion ?
Clase para leer DBF desde Dialogo
[quote="Antonio Linares":21ca6mhe]Estamos implementándolo...[/quote:21ca6mhe] Muchas gracias, sera un gran aporte
Clase para leer DBF desde Dialogo
Genial <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> tengo una preguntita se podrá implementar en el XBrowse() un boton para poder insertar un registro entre dos registros <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) --> XBrowse(Alias("CAVA"),"LOS MODELOS DE MI CAVA",lAutoSort,bSetUp, aCols, bSelect, lExcel,lFastEdit) ya sabes siempre estoy dando lata <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Clase para leer DBF desde Dialogo
Aida, Si usas un índice solo tienes que añadir un registro cuya clave esté entre los dos O te refieres a hacerlo sin usar un índice ?
Clase para leer DBF desde Dialogo
Estamos implementándolo...
Clase para leer DBF desde Dialogo
Hola a si es sin usar indices <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Clase para leer DBF desde Dialogo
Hola no se si leyeron mi ultimo post <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> donde comento que si se podrá poner un botón para meter un registro entre dos registro un INSERTAR REGISTRO para cuando no se usen indices. Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Clase para leer DBF desde Dialogo
Aida, Aqui lo tienes. Por favor haz una copia de seguridad de tu DBF antes de probarlo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [code=fw:3q1yt599]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.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 />   USE clientes<br />   <span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">&#40;</span> ,,, <span style="color: #000000;">&#123;</span> | oBrw | BrwSetup<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   USE<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> BrwSetup<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">05</span>, <span style="color: #000000;">154</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">Prompt</span> <span style="color: #ff0000;">"*"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">16</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oBrw:<span style="color: #000000;">oWnd</span> FLAT  ;<br />      TOOLTIP FWString<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Insert"</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> InsertRecord<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />      <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> InsertRecord<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> nRecNo := RecNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> aData  := FW_DbfToArray<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aRec &nbsp; := Array<span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> nRecNo <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   hb_AIns<span style="color: #000000;">&#40;</span> aData, nRecNo, aRec, .T. <span style="color: #000000;">&#41;</span><br />   DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   FW_ArrayToDbf<span style="color: #000000;">&#40;</span> aData,,, .T. <span style="color: #000000;">&#41;</span><br />   DbGoTo<span style="color: #000000;">&#40;</span> nRecNo <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3q1yt599]
Clase para leer DBF desde Dialogo
Aida, Te pido disculpas, borré algunas líneas por error: Este es el código correcto: [code=fw:2ix2tu3n]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> InsertRecord<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> nRecNo := RecNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> aData  := FW_DbfToArray<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aRec &nbsp; := Array<span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> nRecNo <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   hb_AIns<span style="color: #000000;">&#40;</span> aData, nRecNo, aRec, .T. <span style="color: #000000;">&#41;</span><br />   DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   FW_ArrayToDbf<span style="color: #000000;">&#40;</span> aData,,, .T. <span style="color: #000000;">&#41;</span><br />   DbGoTo<span style="color: #000000;">&#40;</span> nRecNo <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2ix2tu3n]
Clase para leer DBF desde Dialogo
Para la próxima versión de FWH se simplifica asi <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [code=fw:21cmotb1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.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 />&nbsp; &nbsp;USE clients<br />&nbsp; &nbsp;<span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">&#40;</span> ,,, <span style="color: #000000;">&#123;</span> | oBrw | BrwSetup<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;USE<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> BrwSetup<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">05</span>, <span style="color: #000000;">154</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">Prompt</span> <span style="color: #ff0000;">"*"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">16</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oBrw:<span style="color: #000000;">oWnd</span> FLAT &nbsp;;<br />&nbsp; &nbsp; &nbsp; TOOLTIP FWString<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Insert"</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> FW_DbInsert<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:21cmotb1]
Clase para leer DBF desde Dialogo
Oki avisare si les salen patas y cuernos <!-- s:twisted: --><img src="{SMILIES_PATH}/icon_twisted.gif" alt=":twisted:" title="Twisted Evil" /><!-- s:twisted: --> al DBF <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> Gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Clase para leer DBF desde Dialogo
<!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> aRec no estaba delarada la deje a si Local aRec pero sale el error de Len <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> [code=fw:1t4qynik]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> InsertRecord<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRecNo := RecNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData &nbsp;:= FW_DbfToArray<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;hb_AIns<span style="color: #000000;">&#40;</span> aData, nRecNo, aRec, .T. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aData<span style="color: #000000;">&#91;</span> nRecNo <span style="color: #000000;">&#93;</span> = Array<span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> nRecNo <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;FW_ArrayToDbf<span style="color: #000000;">&#40;</span> aData,,, .T. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;DbGoTo<span style="color: #000000;">&#40;</span> nRecNo <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1t4qynik] [code=fw:1t4qynik]<div class="fw" id="{CB}" style="font-family: monospace;">Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">4</span> secs <br />   Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">03</span><span style="color: #000000;">-05</span><span style="color: #000000;">-2019</span>, <span style="color: #000000;">23</span>:<span style="color: #000000;">35</span>:<span style="color: #000000;">08</span><br />   Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1111</span>  Error de argumento: <span style="color: #000000;">LEN</span><br />   Args:<br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = U   <br /><br />Stack Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>:  => LEN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">model</span>.prg => INSERTRECORD<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4719</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">model</span>.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>BRWSETUP<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4705</span> <span style="color: #000000;">&#41;</span></div>[/code:1t4qynik] vere si le entiendo al error <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Clase para leer DBF desde Dialogo
soy muy burra no le encuentro el error de len no se si aData llega sin valor alguno <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Clase para leer DBF desde Dialogo
Muchas gracias ya funciono <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> [img:bc4wqrz2]http&#58;//entreparentesis&#46;org/wp-content/uploads/corazon-hecho-de-corazones-png&#46;jpg[/img:bc4wqrz2] Muchas gracias eres mi superman <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> [img:bc4wqrz2]https&#58;//media&#46;giphy&#46;com/media/cprzqpLb9LMSQ/giphy&#46;gif[/img:bc4wqrz2] seguiré probando <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Clase para leer DBF desde Dialogo
ya lo resolví de esta manera <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> [code=fw:3994vjgi]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">&#40;</span> ,<span style="color: #ff0000;">"EDITANDO COLORES VModelAir"</span>, , <span style="color: #000000;">&#123;</span> | oBrw | BrwSetup<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,,  bSelect, lExcel,lFastEdit  <span style="color: #000000;">&#41;</span></div>[/code:3994vjgi] [quote="AIDA":3994vjgi]Que crees ya funciona insertando pero ya no me deja editar nada <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> [code=fw:3994vjgi]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">LOCAL</span> lAutoSort:=.F.<br /><span style="color: #00C800;">LOCAL</span> bSetUp:=.F.<br /><span style="color: #00C800;">LOCAL</span> aCols:=.F.<br /><span style="color: #00C800;">LOCAL</span> bSelect:=.T.<br /><span style="color: #00C800;">LOCAL</span> lExcel:=.T.<br /><span style="color: #00C800;">LOCAL</span> lFastEdit:= .t.<br /><span style="color: #00C800;">LOCAL</span> lautofit:=.F.<br /><br />USE <span style="color: #00C800;">DATA</span>\VModelAir.dat <span style="color: #0000ff;">ALIAS</span> VModelAir SHARED <span style="color: #00C800;">NEW</span><br />VModelAir-><span style="color: #000000;">&#40;</span>DBGOTOP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">&#40;</span> ,<span style="color: #ff0000;">"EDITANDO COLORES VModelAir"</span>,lFastEdit , <span style="color: #000000;">&#123;</span> | oBrw | BrwSetup<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />VModelAir-><span style="color: #000000;">&#40;</span>DBGOTOP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />CLOSE VModelAir<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3994vjgi] Que debo hacer <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->[/quote:3994vjgi]
Clase para leer DBF desde Dialogo
Que crees ya funciona insertando pero ya no me deja editar nada <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> [code=fw:1lfmpncp]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">LOCAL</span> lAutoSort:=.F.<br /><span style="color: #00C800;">LOCAL</span> bSetUp:=.F.<br /><span style="color: #00C800;">LOCAL</span> aCols:=.F.<br /><span style="color: #00C800;">LOCAL</span> bSelect:=.T.<br /><span style="color: #00C800;">LOCAL</span> lExcel:=.T.<br /><span style="color: #00C800;">LOCAL</span> lFastEdit:= .t.<br /><span style="color: #00C800;">LOCAL</span> lautofit:=.F.<br /><br />USE <span style="color: #00C800;">DATA</span>\VModelAir.dat <span style="color: #0000ff;">ALIAS</span> VModelAir SHARED <span style="color: #00C800;">NEW</span><br />VModelAir-><span style="color: #000000;">&#40;</span>DBGOTOP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">&#40;</span> ,<span style="color: #ff0000;">"EDITANDO COLORES VModelAir"</span>,lFastEdit , <span style="color: #000000;">&#123;</span> | oBrw | BrwSetup<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />VModelAir-><span style="color: #000000;">&#40;</span>DBGOTOP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />CLOSE VModelAir<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:1lfmpncp] Que debo hacer <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Clase para leer DBF desde Dialogo
[quote="Antonio Linares":2daggdot]La próxima versión de FWH incluirá la función XEdit() que aquí se incluye: [code=fw:2daggdot]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.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 />   USE clients<br />   XEdit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   USE<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> XEdit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> FW_Record<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>:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:2daggdot] [img:2daggdot]https&#58;//fivetechsoft&#46;github&#46;io/screenshots/xedit1&#46;JPG[/img:2daggdot][/quote:2daggdot] Buenas tardes maestro, Esta funcion xedit es modificable ? es decir, como xbrowse se puede parametrizar o cambiar la posicion y el tipo de objeto (say y get ) que quiero presentar en el dialogo?
Clase para leer DBF desde Dialogo
Saludos, esta CLASE funciona tambien para QUERYS o ARRAY.? gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Clase para manejar Blat.exe de C.Gelabert
En este link podeis bajaros la clase para manejar Blat.exe de muy fácil uso y ampliable a gusto del consumidor. <!-- m --><a class="postlink" href="http://hyperupload.com/download/0285db1b91/TfBlat.prg.html">http://hyperupload.com/download/0285db1 ... t.prg.html</a><!-- m --> Es una primera versión. Saludos Carlos G.
Clase para manejar SQL server
Hola a todos. Existirá alguna clase para el manejo de sql server? y hay donde puedo conseguirla y sus ejemplos. Atentamente Julio Ponce
Clase para manejar SQL server
Julio: hasta donde yo se, que se poco, puede ser con Ado y ver ejemplos aqui en el foro. Otra solucion es la clase Condor1 de Manu Esposito.
Clase para manejar SQL server
Un ejemplo en ADO [code=fw:16z4vyme]<div class="fw" id="{CB}" style="font-family: monospace;"><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;">"Ado.Ch"</span><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"xbrowse.Ch"</span><br /><br />SapTab<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">FUNCTION</span> SapTab<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oCon<br /><span style="color: #00C800;">LOCAL</span> oError<br /><span style="color: #00C800;">LOCAL</span> cCommandSql<br /><span style="color: #00C800;">LOCAL</span> oVar<br /><span style="color: #00C800;">LOCAL</span> oContactos<br /><span style="color: #00C800;">LOCAL</span> oGrid<br /><span style="color: #00C800;">LOCAL</span> oBrw<br /><span style="color: #00C800;">LOCAL</span> aCol := array<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br /><br />USE <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\d</span>bfs<span style="color: #000000;">\b</span>arras"</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ALIAS</span> tMov <span style="color: #00C800;">NEW</span> EXCLUSIVE<br />SELE tMov<br />zap<br />Dbgotop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Inicia el proceso de conexion via ADO PURO MSSQL"</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">TRY</span><br />  oCon:=toleauto<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: #ff0000;">"adodb.connection"</span><span style="color: #000000;">&#41;</span><br />CATCH oError<br />    MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No se ha podido crear la conexión !"</span>, <span style="color: #ff0000;">"Error de datos"</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span><br />END<br /><br />oCon:<span style="color: #000000;">ConnectionString</span>:= <span style="color: #ff0000;">"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=CHANTALL;Data Source=SERVER<span style="color: #000000;">\S</span>QLEXPRESS;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=GERENCIA;Use Encryption for Data=False;Tag with column collation when possible=False"</span><br /><br /><span style="color: #00C800;">TRY</span><br />  oCon:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />CATCH oError<br />  MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No pude abrir la conexión para crear las tablas !"</span>, <span style="color: #ff0000;">"Error de datos"</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span><br />END<br /><br /><span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Fin del Proceso de Conexión"</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"vamos a lo del xbrowse"</span><span style="color: #000000;">&#41;</span><br /><br />   *------------------------------------------------------------------<br />   * Creamos el objeto recordset de ADO<br />   * un recorset esta formado por Registros<span style="color: #000000;">&#40;</span>filas<span style="color: #000000;">&#41;</span> y campos <span style="color: #000000;">&#40;</span>columnas<span style="color: #000000;">&#41;</span><br />   *------------------------------------------------------------------<br />   oVar   := <span style="color: #ff0000;">"SELECT * FROM MAEINV "</span><br /><br />   <span style="color: #00C800;">if</span> oContactos = <span style="color: #00C800;">nil</span><br /><br />   <span style="color: #00C800;">TRY</span><br />      oContactos := CreateObject<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ADODB.Recordset"</span><span style="color: #000000;">&#41;</span><br />   CATCH oError<br />      MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No se ha podido crear el RECORDSET !"</span>,<span style="color: #ff0000;">"Error de Datos"</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span><br />   END<br /><br />   oContactos:<span style="color: #000000;">CursorLocation</span>  := adUseClient <span style="color: #B900B9;">//adUseServer</span><br />   oContactos:<span style="color: #000000;">LockType</span>        := adLockOptimistic<br />   oContactos:<span style="color: #000000;">CursorType</span>      := adOpenKeyset<br />   oContactos:<span style="color: #000000;">Source</span>          := oVar<br />   oContactos:<span style="color: #000000;">ActiveConnection</span><span style="color: #000000;">&#40;</span> oCon <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">TRY</span><br />      oContactos:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   CATCH oError<br />      MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No se ha podido ejecutar el comando !"</span>, <span style="color: #ff0000;">"Error de Datos"</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span><br />   END<br />      <span style="color: #B900B9;">// msginfo( oContactos )</span><br /><br />   <span style="color: #00C800;">else</span><br />     <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"no esta nil"</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   nRegistros := oContactos:<span style="color: #000000;">RecordCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span>nRegistros<span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">if</span> nRegistros > <span style="color: #000000;">0</span><br />      oContactos:<span style="color: #000000;">MoveFirst</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> !oContactos:<span style="color: #000000;">Eof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         ref:= oContactos:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"INV_REFER"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span><br />         cod:= oContactos:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"INV_REFER"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span><br />         odg:= oContactos:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"INV_CODIGO"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span><br /><br /><br />     SELE tMov<br />         APPEND BLANK<br />         tMov->REF:=odg<br />         tMov->PRECOD:=cod<br /><br />         oContactos:<span style="color: #000000;">MoveNext</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ENDDO</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"fin del proceso"</span><span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:16z4vyme] Espero te siva
Clase para manejar blat.exe por Jesus D¡ez Gonzalez
<!-- m --><a class="postlink" href="http://hyperupload.com/download/0270efa094/tblat.zip.html">http://hyperupload.com/download/0270efa ... t.zip.html</a><!-- m -->
Clase para manejo de blat.exe desde FiveWin. V1.1
Hola a todos, Link para bajar la clase: <!-- m --><a class="postlink" href="http://hyperupload.com/download/0285db1b10/TfBlat.prg.html">http://hyperupload.com/download/0285db1 ... t.prg.html</a><!-- m --> Saludos Carlos G.
Clase para manejo de blat.exe desde FiveWin. V1.1
Amigo el link baja un archivo de 0 bytes. <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Clase para manejo de blat.exe desde FiveWin. V1.1
[quote="jose_murugosa":jxn4l2tb]Amigo el link baja un archivo de 0 bytes. <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:jxn4l2tb] Perdona, no me había dado cuenta. Parece ser que no puedo subir nada a HyperUpLoad. ¿Vosotros podeis? Saludos Carlos G. Aun así aquí va todo el código de la clase: ******************************************** /* C.Gelabert octubre'06. 02/10/2006 Añadido DelFiles(), SendAgain(lEspera), LaunchBat(lEspera) Contempla posibilidad de envío esperando resultado. 01/10/2006 Añadido MakeFBody( cMensaje ) y ::cfBodyBlat 23/09/2006 Añadido control de éxito en el envío del email. DATA 'lSendok' que indica si el envío ha tenido éxito. DATA 'cFileError' que será de uso interno. Método 'End()' devuelve .T. o .F. si el envío ha tenido éxito. 16/09/2006 Primera versión de la clase. ------------------------------------------------------------------------------------------- Esta clase tiene como finalidad lanzar la utilidad Blat.exe para el envío de correos electrónicos, es de libre distribución y es de agradecer que si alguién la amplía me envíe la nueva versión. Algunas de sus características són: - Utiliza ficheros auxiliares que la propia clase elimina, evitando con ello la limitación del modo consola (DOS) en la longitud del uso de comandos desde el PROMPT. - Permite conservar los emails enviados por si fuera necesario reenviarlos. (::lDeleteTemp := .F. evita el borrado de los ficheros de la clase que se utilizan) - Esta clase es fácilmente ampliable con el resto de opciones que utiliza Blat.exe. - Con una sola llamada a la clase se envía un email. ej. lExito := Tfblat():New( "Amiservidor.calimero.com", ; "miemailde@envio.com", ; "c:\utilidades\Blat\Blat.exe", ; "c:\temp", ; {"fivewidi@laleche.com", "mitia@lola.com"}, ; {"cgelabert@laleche.com", "cogeeldinero@ycorre.com"}, ; {"ghermano@laleche.com", "control@emails.com"}, ; "Asuntito prueba mensaje", ; "el mensajito" ; ):Send():End() Inconvenientes: - Si se desea enviar una batería de emails sería conveniente (pero no obligatorio) realizar un Inkey(1) entre mensajes para evitar que los nombres de los ficheros coincidan. */ #include "Obj2Hb.ch" #include "Fileio.Ch" #define HKEY_LOCAL_MACHINE 2147483650 // 0x80000002 //----------------------------------------------------------------------------// CLASS TfBlat CLASSDATA lRegistered AS LOGICAL DATA cVersion AS STRING // Versión de la clase. DATA lInstall AS LOGICAL // Indicador de si Blat.exe ja ha estado registrado en el sistema. DATA cServer AS STRING // Servidor de correo para envío. (correo.lapera.com) DATA cMailsender AS STRING // Mail de envío. DATA lSendOk AS LOGICAL // Indica si el envío se ha realizado con éxito DATA cPathBlat AS STRING // Path completo de la ubicación de BLAT.EXE (C:\micarpeta\elblat\blat.exe) DATA cPathWork AS STRING // Path de trabajo para la creación de ficheros auxiliares. (C:\Temp\) DATA cFileBat AS STRING // Fichero .BAT que será lanzado para el envío de los mails. DATA cFileError AS STRING // Fichero .TXT que indicará si se ha realizado el envío con éxito. DATA cFileOptions AS STRING // Fichero con las opciones de envío. (20080907145815.op [día i hora])) DATA lDeleteTemp AS LOGICAL // Indicador de borrado de ficheros temporales. DATA aTo AS ARRAY // Array de los Destinatarios. DATA cTf AS STRING // Fichero con los Destinatarios. (20080907145815.tf [día i hora])) DATA aCc AS ARRAY // Array de los Destinatarios de la Copia. DATA cCf AS STRING // Fichero con los Destinatarios de la Copia. (20080907145815.cf [día i hora])) DATA aBcc AS ARRAY // Array de los Destinatarios de la Copia Oculta. DATA cBf AS STRING // Fichero con los Destinatarios de la Copia Oculta. (20080907145815.bf [día i hora])) DATA cSubject AS STRING // Asunto. DATA cSf AS STRING // Fichero que contiene el asunto. DATA cBody AS STRING // Cuerpo del mensaje. DATA cfBody AS STRING // Fichero del USUARIO que contine el cuerpo del mensaje. DATA cfBodyBlat AS STRING // Fichero de la CLASE que contine el cuerpo del mensaje. DATA cSig AS STRING // Fichero que contiene la firma a insertar al final del cuerpo del mensaje. DATA cPs AS STRING // Fichero que contiene un final para el mensaje (posterior a la firma). DATA cAttachi AS STRING // Fichero insertado en el mensaje. DATA aAf AS ARRAY // Array de los ficheros binarios a adjuntar. DATA cAf AS STRING // Fichero que contiene la lista de ficheros binarios a adjuntar. (20080907145815.fbi [día i hora])) DATA aAtf AS ARRAY // Array de los ficheros de textos a adjuntar. DATA cAtf AS STRING // Fichero que contiene la lista de ficheros de texto a adjuntar. (20080907145815.ftx [día i hora])) DATA cMailFrom AS STRING // No tiene porque coincidir con el mail de envío original, será el mail que utiliza el 'Responder'. DATA cOrg AS STRING // Nombre de la Organización. DATA nPriority AS NUMERIC // Prioridad del mensaje. (0=baja, 1=alta). DATA lAcuserecibo AS LOGICAL // Solicita acuse de recibo a Destinatario. DATA lToScreen AS LOGICAL // Echo por pantalla. METHOD New( cservidor, ; cMaildeenvio, ; cUbicacionBlat, ; cPathdeTrabajo, ; aDestinatario, ; aCopiaa, ; aCopiaocultaa, ; cAsunto, ; cMensaje ) CONSTRUCTOR METHOD Server( cServidor ) INLINE If( Empty(cServidor), ::cServer, ::cServer := cServidor ) METHOD MailSender( cMaildeenvio ) INLINE If( Empty(cMaildeenvio), ::cmailsender, ::cmailsender := cMaildeenvio ) METHOD PathBlat( cUbicacionBlat ) INLINE If( Empty(cUbicacionBlat), ::cPathBlat, ::cPathBlat := cUbicacionBlat ) METHOD PathWork( cPathdeTrabajo ) INLINE If( Empty(cPathdeTrabajo), ::cPathWork, ::cPathWork := cPathdeTrabajo ) METHOD Init() METHOD IsBlatInstall() METHOD AddTo( cDestinatario ) INLINE If(Empty(cDestinatario), Nil, AADD( ::aTo, cDestinatario ) ) METHOD AddCc( cCopiaa ) INLINE If(Empty(cCopiaa), Nil, AADD( ::aCc, cCopiaa ) ) METHOD AddBCc( cCopiaOcultaa ) INLINE If(Empty(cCopiaOcultaa), Nil, AADD( ::aBcc, cCopiaOcultaa ) ) METHOD Subject( cAsunto ) INLINE If( Empty(cAsunto), ::cSubject, ::cSubject := cAsunto ) METHOD Body( cMensaje ) INLINE If( Empty(cMensaje), ::cBody, ( ::cfBody := "", ::cBody := cMensaje ) ) METHOD FBody( cFileMensaje ) INLINE If( Empty(cFileMensaje), ::cfBody, ( ::cBody := "", ::cfBody := cFileMensaje ) ) METHOD MakeFBody( cMensaje ) INLINE ( MemoWrit( ::cfBodyBlat, cMensaje), ::FBody( ::cfBodyBlat ) ) METHOD FSig( cFileFirma ) INLINE If( Empty(cFileFirma), ::cSig, ::cSig := cFileFirma ) METHOD FPs( cFileEnd ) INLINE If( Empty(cFileEnd), ::cPs, ::cPs := cFileEnd ) METHOD FAttachi( cFileInBody ) INLINE If( Empty(cFileInBody), ::cAttachi, ::cAttachi := cFileInBody ) METHOD FAttach( cFileBin ) INLINE If(Empty(cFileBin), Nil, AADD( ::aAf, cFileBin ) ) METHOD FAttact( cFileTxt ) INLINE If(Empty(cFileTxt), Nil, AADD( ::aAtf, cFileTxt ) ) METHOD MailFrom( cMailRespuesta ) INLINE If( Empty(cMailRespuesta), ::cMailFrom, ::cMailFrom := cMailRespuesta ) METHOD Org( corganizacion ) INLINE If( Empty(cOrganizacion), ::cOrg, ::cOrg := cOrganizacion ) METHOD Priority( nPrioridad ) INLINE If( Empty(nPrioridad), ::nPriority, ::nPriority := nPrioridad ) METHOD Acuserecibo( lAutoRespuesta ) INLINE If( Empty(lAutoRespuesta), ::lAcuserecibo, ::lAcuserecibo := lAutoRespuesta ) METHOD Screen( lApantalla ) INLINE If( Empty(lApantalla), ::lToScreen, ::lToScreen := lApantalla ) METHOD MakeFiles() METHOD DelFiles() METHOD Send() METHOD SendAgain() METHOD LaunchBat() METHOD End() ENDCLASS //----------------------------------------------------------------------------// METHOD New( cServidor, ; cMaildeenvio, ; cUbicacionBlat, ; cPathdeTrabajo, ; aDestinatario, ; aCopiaa, ; aCopiaocultaa, ; cAsunto, ; cMensaje ) CLASS TfBlat DEFAULT cServidor := "Servidor.no.especificado" DEFAULT cMaildeenvio := "Noseespecifico@emailde.envio" DEFAULT cUbicacionBlat := Curdrive() + ":" + Curdir() + "\Blat" DEFAULT cPathdeTrabajo := Curdrive() + ":" + Curdir() + "\Blat\Work" DEFAULT aDestinatario := { "No se especificó destinatario" } DEFAULT aCopiaa := {} DEFAULT aCopiaOcultaa := {} DEFAULT cAsunto := "Email por Blat.exe" DEFAULT cMensaje := "" ::cVersion := "1.1" ::cServer := cServidor ::cMailsender := cMaildeenvio ::cPathBlat := cUbicacionBlat ::cPathWork := cPathdeTrabajo ::Init() ::aTo := aDestinatario ::aCc := aCopiaa ::aBcc := aCopiaOcultaa //AEVal( aDestinatario, {|cDestinatario| ::AddTo( cDestinatario ) } ) //AEVal( aCopiaa, {|cCopiaa| ::AddCc( cCopiaa ) } ) //AEVal( aCopiaOcultaa, {|cCopiaocultaa| ::AddBcc( cCopiaOcultaa ) } ) ::Subject( '"' + cAsunto + '"' ) ::Body( '"' + cMensaje + '"' ) RETURN Self //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// METHOD Init() CLASS TfBlat Local cDummy1 := "", cDummy2 := "", nContador := 0 If !lIsdir( ::PathWork() ) cDummy1 := StrToken( ::PathWork(), ++nContador, "" ) cDummy2 := StrToken( ::PathWork(), ++nContador, "" ) While AllTrim( cDummy2 ) <> "" cDummy1 := cDummy1 + "" + cDummy2 lMkDir( cDummy1 ) cDummy2 := StrToken( ::PathWork(), ++nContador, "" ) End EndIf ::lSendOk := .F. ::aTo := {} ::aCc := {} ::aBcc := {} ::aAf := {} ::aAtf := {} ::cFileBat := ; ::cFileError := ; ::cFileOptions := ; ::cfBodyBlat := ; ::cTf := ::cCf := ; ::cBf := ::cAf := ; ::cAtf := ::PathWork() + DToS( Date() ) + StrTran( Time(), ":" ) ::cFileBat := ::cFileBat + ".bat" ::cFileError := ::cFileError + "_Error.Txt" ::cFileOptions := ::cFileOptions + ".op" ::cfBodyBlat := ::cfBodyBlat + ".men" ::cTf := ::cTf + ".tf" ::cCf := ::cCf + ".cf" ::cBf := ::cBf + ".bf" ::cAf := ::cAf + ".fbi" ::cAtf := ::cAtf + ".ftx" ::nPriority := 0 ::lAcuserecibo := .F. ::lToScreen := .T. ::lDeleteTemp := .T. ::lInstall := .T. /* Habilite la siguiente línea si desea que se realice un 'install' del Blat.exe en caso de que el sistema no tenga guardados los parámetros del Blat. Para enviar correos, en principio en una configuración estándar no será necesario. -------------------------------------------------------------------------- */ //::lInstall := ::IsBlatInstall() RETURN Nil //----------------------------------------------------------------------------// /* ******************************************************** Comprueba si Blat.exe ha estado 'instalado' en el sistema leyendo Datos de Configuración de Blat en el Registro. ******************************************************** */ METHOD IsBlatInstall() CLASS TfBlat LOCAL oReg Local cDummy := "" oReg := TReg32():New(HKEY_LOCAL_MACHINE,"SOFTWARE\Public Domain\Blat") cDummy := PadR(oReg:Get("SMTP server", cDummy),250) //Traza(1, "AllTrim(cDummy)=", allTrim(cDummy) ) /* ::cDe := PadR(oReg:Get("Sender" , ::cDe) ,250) ::cSMTP := PadR(oReg:Get("SMTP server", ::cSMTP),250) ::nPuerto := PadR(oReg:Get("SMTP Port" , ::nPuerto),4) ::nIntentos := PadR(oReg:Get("Try" , ::nIntentos),2) ::cConexion := PadR(oReg:Get("Conexion" , ::cConexion),250) ::lSeguro := oReg:Get("SECURE server", ::lSeguro) ::cUsuario := PadR(oReg:Get("User name" , ::cUsuario),250) ::cClave := PadR(DeCrypt(oReg:Get("User password",::cClave), "BlAt"),50) */ oReg:Close() RETURN Len(AllTrim( cDummy )) <> 0 /* Método no utilizado y sólo comentado. ******************************************************* * Graba Datos de Configuraci¢n de Blat en el Registro * ******************************************************* METHOD GrabaBlat() CLASS TfBlat LOCAL oReg oReg := TReg32():New(HKEY_LOCAL_MACHINE,"SOFTWARE\Public Domain\Blat") oReg:Set("Sender" , AllTrim(::cDe)) oReg:Set("SMTP server" , AllTrim(::cSMTP)) oReg:Set("SMTP Port" , Alltrim(::nPuerto) ) oReg:Set("Conexion" , AllTrim(::cConexion) ) oReg:Set("Try" , Alltrim(::nIntentos) ) oReg:Set("SECURE server", ::lSeguro ) oReg:Set("User name" , AllTrim(::cUsuario) ) oReg:Set("User password", AllTrim(EnCrypt(::cClave, "BlAt")) ) oReg:Close() RETURN .T. */ //----------------------------------------------------------------------------// METHOD MakeFiles() CLASS TfBlat Local lResultado := .T. Local nContador := 0 Local hFile := 0 Local cOpciones := "" If Len( ::aTo ) > 0 cOpciones := cOpciones + " -tf " + ::cTf IF ( hFile := FCREATE( ::cTf, FC_NORMAL)) == -1 lResultado := .F. Else FWRITE( hFile, ::aTo[1] ) For nContador := 2 To Len( ::aTo ) FWRITE( hFile, "," + ::aTo[nContador] ) EndFor FCLOSE( hFile ) EndIf EndIf If Len( ::aCc ) > 0 cOpciones := cOpciones + " -cf " + ::cCf IF ( hFile := FCREATE( ::cCf, FC_NORMAL)) == -1 lResultado := .F. Else FWRITE( hFile, ::aCc[1] ) For nContador := 2 To Len( ::aCc ) FWRITE( hFile, "," + ::aCc[nContador] ) EndFor FCLOSE( hFile ) EndIf EndIf If Len( ::aBcc ) > 0 cOpciones := cOpciones + " -bf " + ::cBf IF ( hFile := FCREATE( ::cBf, FC_NORMAL)) == -1 lResultado := .F. Else FWRITE( hFile, ::aBcc[1] ) For nContador := 2 To Len( ::aBcc ) FWRITE( hFile, "," + ::aBcc[nContador] ) EndFor FCLOSE( hFile ) EndIf EndIf If Len( ::aAf ) > 0 cOpciones := cOpciones + " -af " + ::cAf IF ( hFile := FCREATE( ::cAf, FC_NORMAL)) == -1 lResultado := .F. Else FWRITE( hFile, ::aAf[1] ) For nContador := 2 To Len( ::aAf ) FWRITE( hFile, "," + ::aAf[nContador] ) EndFor FCLOSE( hFile ) EndIf EndIf If Len( ::aAtf ) > 0 cOpciones := cOpciones + " -atf " + ::cAtf IF ( hFile := FCREATE( ::cAtf, FC_NORMAL)) == -1 lResultado := .F. Else FWRITE( hFile, ::aAtf[1] ) For nContador := 2 To Len( ::aAtf ) FWRITE( hFile, "," + ::aAtf[nContador] ) EndFor FCLOSE( hFile ) EndIf EndIf If !Empty( ::cSubject ) cOpciones := cOpciones + " -subject " + ::cSubject EndIf If !Empty( ::cSf ) cOpciones := cOpciones + " -sf " + ::cSf EndIf IF ( hFile := FCREATE( ::cFileOptions, FC_NORMAL)) == -1 //traza( 1, "NO Ok ::cFileOptions=", ::cFileOptions, ".-.", LTrim( cOpciones ) ) lResultado := .F. Else FWRITE( hFile, LTrim( cOpciones ) ) FCLOSE( hFile ) //traza( 1, "Ok ::cFileOptions=", ::cFileOptions, ".-.", LTrim( cOpciones ) ) EndIf IF ( hFile := FCREATE( ::cFileBat, FC_NORMAL)) == -1 lResultado := .F. Else If !::lInstall FWRITE( hFile, Chr(13) + Chr(10) + "REM ******************************************************************************" ) FWRITE( hFile, Chr(13) + Chr(10) + "REM Instalación de Blat.exe desde FiveWin mediante la clase TfBlat (versión " + ::cVersion + " )" ) FWRITE( hFile, Chr(13) + Chr(10) + "REM ******************************************************************************" ) FWRITE( hFile, Chr(13) + Chr(10) + ::cPathBlat ) FWRITE( hFile, " -install " + ::cServer + " " + ::cMailsender ) FWRITE( hFile, Chr(13) + Chr(10) + " " ) FWRITE( hFile, Chr(13) + Chr(10) ) EndIf FWRITE( hFile, Chr(13) + Chr(10) + "REM *************************************************************************************" ) FWRITE( hFile, Chr(13) + Chr(10) + "REM Envío de email usando Blat.exe desde FiveWin mediante la clase TfBlat (versión " + ::cVersion + " )" ) FWRITE( hFile, Chr(13) + Chr(10) + "REM *************************************************************************************" ) FWRITE( hFile, Chr(13) + Chr(10) + ::cPathBlat ) If !Empty( ::cBody ) FWRITE( hFile, " - -body " + ::cBody ) EndIf If !Empty( ::cfBody ) FWRITE( hFile, " " + ::cfBody ) EndIf FWRITE( hFile, " -of " + ::cFileOptions ) FWRITE( hFile, " -server " + ::cServer + ; " -f " + ::cMailsender + ; // " -i <!-- e --><a href="mailto:paam12paam12@paam12paam12.com">paam12paam12@paam12paam12.com</a><!-- e --> " ; " -priority " + Str(::nPriority,1,0) + ; If(::lAcuserecibo, " -r", "") + ; If(::lToScreen, "", " -q" ) ) If !Empty( ::cMailFrom ) FWRITE( hFile, " -mailfrom " + ::cMailFrom ) EndIf FWRITE( hFile, Chr(13) + Chr(10) + " " ) FWRITE( hFile, Chr(13) + Chr(10) + "If %errorlevel%==0 Goto NoError" ) FWRITE( hFile, Chr(13) + Chr(10) + "Echo Mensaje_no_enviado__Error_%errorlevel% > " + ::cFileError ) FWRITE( hFile, Chr(13) + Chr(10) + ":Noerror" ) FWRITE( hFile, Chr(13) + Chr(10) + " " ) //FWRITE( hFile, Chr(13) + Chr(10) + " " ) //FWRITE( hFile, Chr(13) + Chr(10) + "Pause Pulsa Intro para continuar." ) //FWRITE( hFile, Chr(13) + Chr(10) + " " ) FCLOSE( hFile ) EndIf Return lResultado //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// METHOD Send( lEspera ) CLASS TfBlat ::LaunchBat( lEspera ) Return Self //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// METHOD SendAgain( lEspera ) CLASS TfBlat ::lSendOk := .F. ::DelFiles() ::MakeFiles() ::LaunchBat( lEspera ) Return Self //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// METHOD LaunchBat( lEspera ) CLASS TfBlat DEFAULT lEspera := .T. If .not. File( ::cFileBat ) ::MakeFiles() EndIf // así funciona ShellExecute( 0, 0, ::cFileBat, 0, 0, 1 ) /* #define SW_NORMAL 1 #define SW_MAXIMIZE 3 #define SW_MINIMIZE 6 #define SW_RESTORE 9 #define SW_HIDE 0 #define SW_SHOWNA 8 */ #define SW_HIDE 0 //Traza( 1, ShellExecute( GetWndApp(), 0, ::cFileBat, 0, 0, SW_HIDE ) ) //ShellExecute( GetWndApp(), 0, ::cFileBat, 0, 0, SW_HIDE ) If lEspera WaitRun( ::cFileBat ) If .not. File( ::cFileError ) ::lSendOk := .T. EndIf Else ShellExecute( GetWndApp(), 0, ::cFileBat, 0, 0, SW_HIDE ) EndIf Return Self //----------------------------------------------------------------------------// METHOD DelFiles() CLASS TfBlat FErase( ::cFileBat ) // fitxer .BAT FErase( ::cFileError) // fitxer indicador d'error .TXT FErase( ::cFileOptions ) // fitxer amb les opcions per llençar el Blat.exe FErase( ::cfBodyBlat ) // fitxer amb el cos del missatge creat automàticament per la clase, NO per l'usuari. FErase( ::cTf ) // fitxer amb els destinataris del mail FErase( ::cCf ) // fitxer amb els destinataris de la copia del mail FErase( ::cBf ) // fitxer amb els destinataris de la copia oculta del mail FErase( ::cAf ) // fitxer amb els fitxers binaris a adjuntar al mail FErase( ::cAtf ) // fitxer amb els fitxers plans (tipus TXT) a adjuntar al mail Return Nil //----------------------------------------------------------------------------// METHOD End() CLASS TfBlat Local lEnviocorrecto lEnviocorrecto := ::lSendOk If ::lDeleteTemp ::DelFiles() EndIf ::aTo := {} ::aCc := {} ::aBcc := {} ::aAf := {} ::aAtf := {} Self := Nil Return lEnviocorrecto //----------------------------------------------------------------------------// ********************************************
Clase para manejo de blat.exe desde FiveWin. V1.1
Perdona Carlos Compilo tu clase con verce, y me da un error, ¿Donde puedo encontrar Obj2hb.ch? ya que de ahí me viene el error Un saludo Jose Luis
Clase para manejo de blat.exe desde FiveWin. V1.1
[quote="JoseLuis":2efrlaqe]Perdona Carlos Compilo tu clase con verce, y me da un error, ¿Donde puedo encontrar Obj2hb.ch? ya que de ahí me viene el error Un saludo Jose Luis[/quote:2efrlaqe] Creo que en el include de Harbour. Saludos y suerte Carlos G.
Clase para manejo de blat.exe desde FiveWin. V1.1
Pues no lo encuentro a pesar de haber buscado en versiones anteriores Si eres tan amable, me lo envias. Un saludo Jose Luis
Clase para manejo de blat.exe desde FiveWin. V1.1
Puedes dejar alguno ejemplo de como usar la clase y donde puedo bajar blat.exe? Saludos de Brasil! Maurilio
Clase para manejo de blat.exe desde FiveWin. V1.1
[quote="JoseLuis":wdwjed13]Pues no lo encuentro a pesar de haber buscado en versiones anteriores Si eres tan amable, me lo envias. Un saludo Jose Luis[/quote:wdwjed13] Perdona, pertenece a la magnífica clase TDBF de Manuel Expósito. Aquí adjunto su código: ***************************** //----------------------------------------------------------------------------// // AUTOR.....: Manuel Exp¢sito Su rez Soft 4U '98 // // e-Mail....: <!-- e --><a href="mailto:expo2001@wanadoo.es">expo2001@wanadoo.es</a><!-- e --> // // CLASE.....: Obj2Hb.CH // // FECHA MOD.: 17/04/2002 // // VERSION...: 12.00 // // PROPOSITO.: Compatibiliza HARBOUR OOP con Objects // //----------------------------------------------------------------------------// #ifdef __HARBOUR__ #xtranslate AS ALL => AS ANYTYPE // Compatible con OBJECTS #xtranslate AS BLOCK => AS CODEBLOCK #xcommand DEFAULT <xVar1> := <xDefaultValue1> ; [, <xVarN> := <xDefaultValueN> ] => ; <xVar1> := If( <xVar1> == nil, <xDefaultValue1>, <xVar1> ); ; [ <xVarN> := If( <xVarN> == nil, <xDefaultValueN>, <xVarN> );] // Extraido de Objects.ch #xtranslate BYNAME <V> [, <VN> ] => ::<V> := <V> [; ::<VN> := <VN> ] #xtranslate BYNAME <V> DEFAULT <Val> => ::<V> := BYDEFAULT <V>, <Val> #xtranslate BYDEFAULT <V>, <Val> => if( <V> == NIL, <Val>, <V> ) #xtranslate BYNAME <V> IFNONIL => if( <V> != NIL, ::<V> := <V>, ) #include "HBClass.ch" #else #include "Objects.ch" #endif //----------------------------------------------------------------------------// ***************************** Saludos y suerte Carlos G.
Clase para manejo de blat.exe desde FiveWin. V1.1
[quote="Maurilio Viana":y9xeqce0]Pueder dejar alguno ejemplo de como usar la clase y donde puedo bajar blat.exe? Saludos de Brasil! Maurilio[/quote:y9xeqce0] En <!-- w --><a class="postlink" href="http://www.blat.net">www.blat.net</a><!-- w --> En el código que dejé en este hilo puede verse su uso más sencillo; y mirando un poco el código creo que se entiende fácilmente. Saludos y suerte Carlos G.
Clase para tratar una matriz como una dbf
Tengo idea de haber visto en el foro, pero podría estar equivocado, una clase para tratar una matriz como una dbf. ¿Alguien me podría decir si la misma existe, cual sería y si es nativa de FWH? Desde ya muchísimas gracias por vuestra siempre amable ayuda.
Clase para tratar una matriz como una dbf
Jose buenas tardes como vas? Creo que lo mas sencillo es que conviertas el array a dbf con la función fw_arraytodbf() y luego la tratas como una dbf [url:13htywpd]https&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=42209&p=253485&hilit=FW_ArrayToDBF&sid=ffb92644037a32e90c67912f3f5407da&sid=ffb92644037a32e90c67912f3f5407da#p253487[/url:13htywpd] O no se si a lo que te refieres es al manejo de tablas hash [url:13htywpd]https&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=23671&hilit=iniciandome+hash&start=15&sid=ffb92644037a32e90c67912f3f5407da&sid=ffb92644037a32e90c67912f3f5407da#p127481[/url:13htywpd]
Clase para tratar una matriz como una dbf
Efectivamente, existe y se llama ARRAY RDD y pertenece a Harbour
Clase para tratar una matriz como una dbf
Muchas gracias Leandro y Paquitohm Dónde puedo encontrar la información de como utilizar ArrayRDD? No he encontrado mucho al respecto... En principio probaré la alternativa de convertir a dbf, pero me interesaría informarme sobre estas tablas temporales con ArrayRDD. Gracias mil de verdad!!!! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Clase para tratar una matriz como una dbf
Hola Jose, si levantas el array desde una consulta mysql, podes usar TArrayData(), y funciona igual que TDatabase. Saludos.
Clase para tratar una matriz como una dbf
Muchas gracias Ariel, parece una opción estupenda, pruebo...
Clase para usa LibXL o xlsxwriter
Gracias hmpaquito y Joao Me voy a revisar los links, necesito una de esas clases pues permiten definir celdas, hacer formulas, quiebres, Etc. son reportes, grandes pero con formato, revisare Gracias nuevamente
Clase para usa LibXL o xlsxwriter
Saludos Quiero revisar ambas opciones para generacion de XLSX grandes sin excel instalado y rapido, alguien tendra ejemplo de como usar LibXL comercial ?? La misma consulta pero con XlsxWriter si existe ?? Gracias
Clase para usa LibXL o xlsxwriter
Hola, Aunque nunca lo he usado, pero me hablaron bien del cliente ADO para soporte de lectura / escritura de excel y podria ser otra opcion a considerar y segun me dijeron, muy veloz Naturalmente requiere la instalacion del cliente <!-- m --><a class="postlink" href="https://support.microsoft.com/es-es/topic/excelado-muestra-c%C3%B3mo-usar-ado-para-leer-y-escribir-datos-en-libros-de-excel-bfb26f12-ba6a-91be-7fd4-4aadf1ff1afa">https://support.microsoft.com/es-es/top ... adf1ff1afa</a><!-- m --> Lo que ignoro es si tendrá la posibilidad de formateo de celdas Salu2
Clase para usa LibXL o xlsxwriter
Miar se ayuda: [url:39e53ucw]http&#58;//www4&#46;zzz&#46;com&#46;tw/phpBB3/viewtopic&#46;php?f=2&p=391#p391[/url:39e53ucw] [url:39e53ucw]https&#58;//www&#46;libxl&#46;com/home&#46;html[/url:39e53ucw] [url:39e53ucw]https&#58;//www&#46;libxl&#46;com/documentation&#46;html[/url:39e53ucw] [url:39e53ucw]https&#58;//www&#46;libxl&#46;com/workbook&#46;html[/url:39e53ucw] [url:39e53ucw]http&#58;//clipper&#46;borda&#46;ru/?1-4-0-00001115-000-280-0-1595788754[/url:39e53ucw] Regards, saludos.
Clase para usa LibXL o xlsxwriter
[url:1wyo38oa]https&#58;//github&#46;com/FTrautwein/xlsxwriter[/url:1wyo38oa] [url:1wyo38oa]https&#58;//github&#46;com/FTrautwein/hblibxlsxwriter[/url:1wyo38oa] [url:1wyo38oa]https&#58;//github&#46;com/brechtsanders/xlsxio[/url:1wyo38oa] [url:1wyo38oa]https&#58;//github&#46;com/Petewg/harbour-list[/url:1wyo38oa] [url:1wyo38oa]https&#58;//xlsxwriter&#46;readthedocs&#46;io/working_with_memory&#46;html[/url:1wyo38oa] Regards, saludos.
Clase pdflib
Gracias Karina. Pero debe faltar algo. Me da este error. [code=fw:2bmhgp5p]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_NEW'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_SETCOMPRESSIONMODE'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_SETCURRENTENCODER'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_SAVETOFILE'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_FREE'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_SETINFOATTR'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_SETINFODATEATTR'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_ADDPAGE'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_SETSIZE'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_SETFONTANDSIZE'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_GETFONT'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_SETRGBFILL'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_SETRGBSTROKE'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_BEGINTEXT'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_SETTEXTMATRIX'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_SHOWTEXT'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_ENDTEXT'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_SETLINEWIDTH'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_MOVETO'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_LINETO'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_STROKE'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_LOADJPEGIMAGEFROMFILE'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_DRAWIMAGE'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_RECTANGLE'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_FILL'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_FILLSTROKE'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_GETHEIGHT'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unresolved</span> external <span style="color: #ff0000;">'_HB_FUN_HPDF_PAGE_GETWIDTH'</span> referenced <span style="color: #0000ff;">from</span> K:\V_XHARB_V3\OBJ_H\PXPPRUEBAS.OBJ<br />Error: <span style="color: #000000;">Unable</span> <span style="color: #0000ff;">to</span> perform link<br />&nbsp;</div>[/code:2bmhgp5p]
Clase pdflib
Saludos al forum. Alguien tiene la clase pdflib para Harbuor. Gracias
Clase pdflib
Ruben, mira todas las paginas en <!-- w --><a class="postlink" href="http://www.pctoledo.com.br">www.pctoledo.com.br</a><!-- w -->, porfa. No conozco esta classe. Lo siento, no puedo ayudar. Author: José M. C. Quintas <!-- w --><a class="postlink" href="http://www.harbourdoc.com.br">www.harbourdoc.com.br</a><!-- w --> [code=fw:18q5b499]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Example<br /><br />PROCEDURE Main<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oPDF, nCont, nType<br />&nbsp; &nbsp;SetMode<span style="color: #000000;">&#40;</span> <span style="color: #000000;">24</span>, <span style="color: #000000;">80</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> nType = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; oPDF := PDFClass<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 />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">nType</span> := nType<br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"TEST REPORT"</span> + Str<span style="color: #000000;">&#40;</span> nType, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">cFileName</span> := <span style="color: #ff0000;">"test"</span> + Str<span style="color: #000000;">&#40;</span> nType, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"."</span> + iif<span style="color: #000000;">&#40;</span> nType < <span style="color: #000000;">3</span>, <span style="color: #ff0000;">"pdf"</span>, <span style="color: #ff0000;">"lst"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">Begin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> nCont = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1000</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPDF:<span style="color: #000000;">MaxRowTest</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>++, <span style="color: #000000;">0</span>, nCont <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span><br /><br />* PDFClass<br />*----------------------------------------------------------------<br /><br />#require <span style="color: #ff0000;">"hbhpdf"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbclass.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"inkey.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> PDF_PORTRAIT &nbsp;<span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> PDF_LANDSCAPE <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> PDF_TXT &nbsp; &nbsp; &nbsp; <span style="color: #000000;">3</span><br /><br />CREATE <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;oPdf<br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;oPage<br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;cFileName &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nRow &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">INIT</span> <span style="color: #000000;">999</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nCol &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nAngle &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;cFontName &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #ff0000;">"Courier"</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nFontSize &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">9</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nLineHeight &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">1.3</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nMargin &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">30</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nType &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nPdfPage &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nPageNumber &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;cHeader &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;cCodePage &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #ff0000;">"CP1252"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddPage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> RowToPDFRow<span style="color: #000000;">&#40;</span> nRow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> ColToPDFCol<span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> MaxCol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawText<span style="color: #000000;">&#40;</span> nRow, nCol, xValue, cPicture, nFontSize, cFontName, nAngle, anRGB <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawLine<span style="color: #000000;">&#40;</span> nRowi, nColi, nRowf, nColf, nPenSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawRetangle<span style="color: #000000;">&#40;</span> nTop, nLeft, nWidth, nHeight, nPenSize, nFillType, anRGB <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawImage<span style="color: #000000;">&#40;</span> cJPEGFile, nRow, nCol, nWidth, nHeight <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Cancel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> PrnToPdf<span style="color: #000000;">&#40;</span> cInputFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetType<span style="color: #000000;">&#40;</span> nType <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> PageHeader<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> MaxRowTest<span style="color: #000000;">&#40;</span> nRows <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetInfo<span style="color: #000000;">&#40;</span> cAuthor, cCreator, cTitle, cSubject <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Begin<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #00C800;">METHOD</span> Begin<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> == PDF_TXT<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cFileName</span> := MyTempFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"LST"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; SET <span style="color: #0000ff;">PRINTER</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; SET DEVICE <span style="color: #0000ff;">TO</span> <span style="color: #00C800;">PRINT</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cFileName</span> := MyTempFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"PDF"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oPdf</span> := HPDF_New<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_SetCompressionMode<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span>, HPDF_COMP_ALL <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">cCodePage</span> != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HPDF_SetCurrentEncoder<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPDF</span>, ::<span style="color: #000000;">cCodePage</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> == PDF_TXT<br />&nbsp; &nbsp; &nbsp; SET DEVICE <span style="color: #0000ff;">TO</span> SCREEN<br />&nbsp; &nbsp; &nbsp; SET <span style="color: #0000ff;">PRINTER</span> <span style="color: #0000ff;">TO</span><br />&nbsp; &nbsp; &nbsp; RUN <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"cmd /c start notepad.exe "</span> + ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nPdfPage</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">AddPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span>, <span style="color: #ff0000;">"NENHUM CONTEUDO (NO CONTENT)"</span>,, ::<span style="color: #000000;">nFontSize</span> * <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> File<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fErase<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; HPDF_SaveToFile<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span>, ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Free<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; RUN <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"cmd /c start "</span> + ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> SetInfo<span style="color: #000000;">&#40;</span> cAuthor, cCreator, cTitle, cSubject <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> == PDF_TXT<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;cAuthor &nbsp;:= iif<span style="color: #000000;">&#40;</span> cAuthor == <span style="color: #00C800;">NIL</span>, <span style="color: #ff0000;">"JPA Tecnologia"</span>, cAuthor <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cCreator := iif<span style="color: #000000;">&#40;</span> cCreator == <span style="color: #00C800;">NIL</span>, <span style="color: #ff0000;">"Harupdf"</span>, cCreator <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cTitle &nbsp; := iif<span style="color: #000000;">&#40;</span> cTitle == <span style="color: #00C800;">NIL</span>, <span style="color: #ff0000;">""</span>, cTitle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cSubject := iif<span style="color: #000000;">&#40;</span> cSubject == <span style="color: #00C800;">NIL</span>, cTitle, cSubject <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HPDF_SetInfoAttr<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPDF</span>, HPDF_INFO_AUTHOR, cAuthor <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HPDF_SetInfoAttr<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPDF</span>, HPDF_INFO_CREATOR, cCreator <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HPDF_SetInfoAttr<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPDF</span>, HPDF_INFO_TITLE, cTitle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HPDF_SetInfoAttr<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span>, HPDF_INFO_SUBJECT, cSubject <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HPDF_SetInfoDateAttr<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPDF</span>, HPDF_INFO_CREATION_DATE, <span style="color: #000000;">&#123;</span> <span style="color: #0000ff;">Year</span><span style="color: #000000;">&#40;</span> Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, Month<span style="color: #000000;">&#40;</span> Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, Day<span style="color: #000000;">&#40;</span> Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; Val<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> Time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, Val<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> Time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, Val<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> Time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"+"</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> SetType<span style="color: #000000;">&#40;</span> nType <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nType != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nType</span> := nType<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nFontSize</span> := iif<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nType</span> == <span style="color: #000000;">1</span>, <span style="color: #000000;">9</span>, <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> AddPage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> != PDF_TXT<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oPage</span> := HPDF_AddPage<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetSize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, HPDF_PAGE_SIZE_A4, iif<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nType</span> == <span style="color: #000000;">2</span>, HPDF_PAGE_PORTRAIT, HPDF_PAGE_LANDSCAPE <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetFontAndSize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, HPDF_GetFont<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span>, ::<span style="color: #000000;">cFontName</span>, ::<span style="color: #000000;">cCodePage</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nFontSize</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nRow</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> Cancel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> != PDF_TXT<br />&nbsp; &nbsp; &nbsp; HPDF_Free<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawText<span style="color: #000000;">&#40;</span> nRow, nCol, xValue, cPicture, nFontSize, cFontName, nAngle, anRGB <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nRadian , cTexto<br />&nbsp; &nbsp;nFontSize := iif<span style="color: #000000;">&#40;</span> nFontSize == <span style="color: #00C800;">NIL</span>, ::<span style="color: #000000;">nFontSize</span>, nFontSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cFontName := iif<span style="color: #000000;">&#40;</span> cFontName == <span style="color: #00C800;">NIL</span>, ::<span style="color: #000000;">cFontName</span>, cFontName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cPicture &nbsp;:= iif<span style="color: #000000;">&#40;</span> cPicture == <span style="color: #00C800;">NIL</span>, <span style="color: #ff0000;">""</span>, cPicture <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nAngle &nbsp; &nbsp;:= iif<span style="color: #000000;">&#40;</span> nAngle == <span style="color: #00C800;">NIL</span>, ::<span style="color: #000000;">nAngle</span>, nAngle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cTexto &nbsp; &nbsp;:= Transform<span style="color: #000000;">&#40;</span> xValue, cPicture <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nCol</span> := nCol + Len<span style="color: #000000;">&#40;</span> cTexto <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> == PDF_TXT<br />&nbsp; &nbsp; &nbsp; @ nRow, nCol <span style="color: #0000ff;">SAY</span> cTexto<br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; nRow := ::<span style="color: #000000;">RowToPDFRow</span><span style="color: #000000;">&#40;</span> nRow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nCol := ::<span style="color: #000000;">ColToPDFCol</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetFontAndSize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, HPDF_GetFont<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span>, cFontName, ::<span style="color: #000000;">cCodePage</span> <span style="color: #000000;">&#41;</span>, nFontSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> anRGB != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HPDF_Page_SetRGBFill<span style="color: #000000;">&#40;</span> ::<span style="color: #0000ff;">Page</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HPDF_Page_SetRGBStroke<span style="color: #000000;">&#40;</span> ::<span style="color: #0000ff;">Page</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_BeginText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nRadian := <span style="color: #000000;">&#40;</span> nAngle / <span style="color: #000000;">180</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">3.141592</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetTextMatrix<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, <span style="color: #0000ff;">Cos</span><span style="color: #000000;">&#40;</span> nRadian <span style="color: #000000;">&#41;</span>, <span style="color: #0000ff;">Sin</span><span style="color: #000000;">&#40;</span> nRadian <span style="color: #000000;">&#41;</span>, -<span style="color: #0000ff;">Sin</span><span style="color: #000000;">&#40;</span> nRadian <span style="color: #000000;">&#41;</span>, <span style="color: #0000ff;">Cos</span><span style="color: #000000;">&#40;</span> nRadian <span style="color: #000000;">&#41;</span>, nCol, nRow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_ShowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, cTexto <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_EndText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> anRGB != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HPDF_Page_SetRGBFill<span style="color: #000000;">&#40;</span> ::<span style="color: #0000ff;">Page</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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HPDF_Page_SetRGBStroke<span style="color: #000000;">&#40;</span> ::<span style="color: #0000ff;">Page</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 />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawLine<span style="color: #000000;">&#40;</span> nRowi, nColi, nRowf, nColf, nPenSize <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> == PDF_TXT<br />&nbsp; &nbsp; &nbsp; nRowi := <span style="color: #0000ff;">Round</span><span style="color: #000000;">&#40;</span> nRowi, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nColi := <span style="color: #0000ff;">Round</span><span style="color: #000000;">&#40;</span> nColi, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; @ nRowi, nColi <span style="color: #0000ff;">SAY</span> Replicate<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"-"</span>, nColf - nColi <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nCol</span> := Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; nPenSize := iif<span style="color: #000000;">&#40;</span> nPenSize == <span style="color: #00C800;">NIL</span>, <span style="color: #000000;">0.2</span>, nPenSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nRowi := ::<span style="color: #000000;">RowToPDFRow</span><span style="color: #000000;">&#40;</span> nRowi <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nColi := ::<span style="color: #000000;">ColToPDFCol</span><span style="color: #000000;">&#40;</span> nColi <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nRowf := ::<span style="color: #000000;">RowToPDFRow</span><span style="color: #000000;">&#40;</span> nRowf <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nColf := ::<span style="color: #000000;">ColToPDFCol</span><span style="color: #000000;">&#40;</span> nColf <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetLineWidth<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, nPenSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_MoveTo<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, nColi, nRowi <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_LineTo<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, nColf, nRowf <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_Stroke<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawImage<span style="color: #000000;">&#40;</span> cJPEGFile, nRow, nCol, nWidth, nHeight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oImage<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> == PDF_TXT<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;nRow &nbsp; &nbsp;:= ::<span style="color: #000000;">RowToPDFRow</span><span style="color: #000000;">&#40;</span> nRow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nCol &nbsp; &nbsp;:= ::<span style="color: #000000;">ColToPDFCol</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nWidth &nbsp;:= Int<span style="color: #000000;">&#40;</span> nWidth * ::<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nHeight := nHeight * ::<span style="color: #000000;">nFontSize</span><br />&nbsp; &nbsp;oImage := HPDF_LoadJPEGImageFromFile<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span>, cJPEGFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HPDF_Page_DrawImage<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, oImage, nCol, nRow, nWidth, nHeight <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawRetangle<span style="color: #000000;">&#40;</span> nTop, nLeft, nWidth, nHeight, nPenSize, nFillType, anRGB <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> == PDF_TXT<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;nFillType := iif<span style="color: #000000;">&#40;</span> nFillType == <span style="color: #00C800;">NIL</span>, <span style="color: #000000;">1</span>, nFillType <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nPenSize &nbsp;:= iif<span style="color: #000000;">&#40;</span> nPenSize == <span style="color: #00C800;">NIL</span>, <span style="color: #000000;">0.2</span>, nPenSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nTop &nbsp; &nbsp; &nbsp;:= ::<span style="color: #000000;">RowToPDFRow</span><span style="color: #000000;">&#40;</span> nTop <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nLeft &nbsp; &nbsp; := ::<span style="color: #000000;">ColToPDFCol</span><span style="color: #000000;">&#40;</span> nLeft <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nWidth &nbsp; &nbsp;:= <span style="color: #000000;">&#40;</span> nWidth <span style="color: #000000;">&#41;</span> * ::<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">1.666</span><br />&nbsp; &nbsp;nHeight &nbsp; := -<span style="color: #000000;">&#40;</span> nHeight <span style="color: #000000;">&#41;</span> * :: <span style="color: #000000;">nFontSize</span><br />&nbsp; &nbsp;HPDF_Page_SetLineWidth<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, nPenSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> anRGB != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetRGBFill<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetRGBStroke<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;HPDF_Page_Rectangle<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nFillType == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_Stroke<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// borders only</span><br />&nbsp; &nbsp;ELSEIF nFillType == <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_Fill<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// inside only</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_FillStroke<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// all</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> anRGB != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetRGBStroke<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</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 />&nbsp; &nbsp; &nbsp; HPDF_Page_SetRGBFill<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</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 />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> RowToPDFRow<span style="color: #000000;">&#40;</span> nRow <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> HPDF_Page_GetHeight<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span> - ::<span style="color: #000000;">nMargin</span> - <span style="color: #000000;">&#40;</span> nRow * ::<span style="color: #000000;">nFontSize</span> * ::<span style="color: #000000;">nLineHeight</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">METHOD</span> ColToPDFCol<span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> nCol * ::<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">1.666</span> + ::<span style="color: #000000;">nMargin</span><br /><br /><span style="color: #00C800;">METHOD</span> MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nPageHeight, nMaxRow<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> == PDF_TXT<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">63</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;nPageHeight := HPDF_Page_GetHeight<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nMargin</span> * <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nMaxRow &nbsp; &nbsp; := Int<span style="color: #000000;">&#40;</span> nPageHeight / <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nFontSize</span> * ::<span style="color: #000000;">nLineHeight</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> nMaxRow<br /><br /><span style="color: #00C800;">METHOD</span> MaxCol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nPageWidth, nMaxCol<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> == PDF_TXT<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">132</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;nPageWidth := HPDF_Page_GetWidth<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nMargin</span> * <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nMaxCol &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> nPageWidth / ::<span style="color: #000000;">nFontSize</span> * <span style="color: #000000;">1.666</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> nMaxCol<br /><br /><span style="color: #00C800;">METHOD</span> PrnToPdf<span style="color: #000000;">&#40;</span> cInputFile <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cTxtReport, cTxtPage, cTxtLine, nRow<br />&nbsp; &nbsp;cTxtReport := MemoRead<span style="color: #000000;">&#40;</span> cInputFile <span style="color: #000000;">&#41;</span> + Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;TokenInit<span style="color: #000000;">&#40;</span> @cTxtReport, Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .NOT. TokenEnd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cTxtPage := TokenNEXT<span style="color: #000000;">&#40;</span> cTxtReport <span style="color: #000000;">&#41;</span> + HB_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> Len<span style="color: #000000;">&#40;</span> cTxtPage <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> cTxtPage, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> == Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cTxtPage := <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> cTxtPage, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">AddPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRow := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> HB_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cTxtPage <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cTxtLine := <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> cTxtPage, <span style="color: #000000;">1</span>, <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> HB_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cTxtPage <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cTxtPage := <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> cTxtPage, <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> HB_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cTxtPage <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> nRow++, <span style="color: #000000;">0</span>, cTxtLine <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> PageHeader<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;::<span style="color: #000000;">nPdfPage</span> &nbsp; &nbsp;+= <span style="color: #000000;">1</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nPageNumber</span> += <span style="color: #000000;">1</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nRow</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">AddPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"YOU NAME HERE"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cHeader</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span>, ::<span style="color: #000000;">cHeader</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, ::<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">12</span>, <span style="color: #ff0000;">"Page "</span> + StrZero<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nPageNumber</span>, <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">DrawLine</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0.5</span>, ::<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nRow</span> := <span style="color: #000000;">2</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nCol</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> MaxRowTest<span style="color: #000000;">&#40;</span> nRows <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;nRows := iif<span style="color: #000000;">&#40;</span> nRows == <span style="color: #00C800;">NIL</span>, <span style="color: #000000;">0</span>, nRows <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nRow</span> > ::<span style="color: #000000;">MaxRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">2</span> - nRows<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">PageHeader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> TxtSaida<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"PDF Landscape"</span>, <span style="color: #ff0000;">"PDF Portrait"</span>, <span style="color: #ff0000;">"Matrix"</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MyTempFile<span style="color: #000000;">&#40;</span> cExtensao <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #ff0000;">"temp."</span> + cExtensao<br /><br /><span style="color: #B900B9;">/*<br />Library*<br /><br /><!-- w --><a class="postlink" href="http://www.harbourdoc.com.br">www.harbourdoc.com.br</a><!-- w --><br /><br />Text Origin/Author<br /><br />José M. C. Quintas<br />*/</span><br />&nbsp;</div>[/code:18q5b499] Saludos.
Clase pdflib
Ruben, tests: [code=fw:3455yydp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />PROCEDURE Main<br /><br />&nbsp; &nbsp;Report1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Report2<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Report3<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Report4<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Report5<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Report1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// common clipper report</span><br />&nbsp; &nbsp;SET <span style="color: #0000ff;">PRINTER</span> <span style="color: #0000ff;">TO</span> test1.lst<br />&nbsp; &nbsp;SET DEVICE <span style="color: #0000ff;">TO</span> <span style="color: #00C800;">PRINT</span><br />&nbsp; &nbsp;nRow &nbsp;:= <span style="color: #000000;">100</span><br />&nbsp; &nbsp;nPage := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> nCont = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1000</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> nRow > <span style="color: #000000;">64</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nPage += <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"TEST1 Page"</span> + StrZero<span style="color: #000000;">&#40;</span> nPage, <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRow := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; @ nRow, <span style="color: #000000;">0</span> <span style="color: #0000ff;">SAY</span> nCont <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999999"</span><br />&nbsp; &nbsp; &nbsp; nRow += <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp;SET DEVICE <span style="color: #0000ff;">TO</span> SCREEN<br />&nbsp; &nbsp;SET <span style="color: #0000ff;">PRINTER</span> <span style="color: #0000ff;">TO</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Report2<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// using own header</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oPDF<br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> nType = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; oPDF := PDFClass<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 />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">nType</span> := nType<br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">cFileName</span> := <span style="color: #ff0000;">"TEST2-"</span> + Str<span style="color: #000000;">&#40;</span> nType, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"."</span> + iif<span style="color: #000000;">&#40;</span> nType < <span style="color: #000000;">3</span>, <span style="color: #ff0000;">"pdf"</span>, <span style="color: #ff0000;">"lst"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">Begin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> nCont = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1000</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> oPDF:<span style="color: #000000;">nRow</span> > oPDF:<span style="color: #000000;">MaxRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">PageHeader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"REPORT TEST2-"</span> + Str<span style="color: #000000;">&#40;</span> nType, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, oPDF:<span style="color: #000000;">nCol</span> + <span style="color: #000000;">1</span>, oPDF:<span style="color: #000000;">nPDFPage</span>, <span style="color: #ff0000;">"999999"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">nRow</span> := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, <span style="color: #000000;">0</span>, nCont, <span style="color: #ff0000;">"999999"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPDF:<span style="color: #000000;">nRow</span> += <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Report3<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// using bult-in header</span><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> nType = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; oPDF := PDFClass<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 />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">nType</span> := nType<br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">cFileName</span> := <span style="color: #ff0000;">"TEST3-"</span> + Str<span style="color: #000000;">&#40;</span> nType, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"."</span> + iif<span style="color: #000000;">&#40;</span> nType < <span style="color: #000000;">3</span>, <span style="color: #ff0000;">"pdf"</span>, <span style="color: #ff0000;">"lst"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"REPORT TEST3-"</span> + Str<span style="color: #000000;">&#40;</span> nType, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">Begin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> nCont = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1000</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPDF:<span style="color: #000000;">MaxRowTest</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>++, <span style="color: #000000;">0</span>, nCont <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Report4<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// some paint</span><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> nType = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; oPDF := PDFClass<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 />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">nType</span> := nType<br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">cFileName</span> := <span style="color: #ff0000;">"TEST4-"</span> + Str<span style="color: #000000;">&#40;</span> nType, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"."</span> + iif<span style="color: #000000;">&#40;</span> nType < <span style="color: #000000;">3</span>, <span style="color: #ff0000;">"pdf"</span>, <span style="color: #ff0000;">"lst"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"REPORT TEST4-"</span> + Str<span style="color: #000000;">&#40;</span> nType, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">Begin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; lPaint := .f.<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> nCont = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1000</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPDF:<span style="color: #000000;">MaxRowTest</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; lPaint := <span style="color: #000000;">&#40;</span> .NOT. lPaint <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> lPaint<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawRetangle</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span> - <span style="color: #000000;">1</span> + <span style="color: #000000;">0.3</span>, <span style="color: #000000;">0</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0.2</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.9</span>, <span style="color: #000000;">0.9</span>, <span style="color: #000000;">0.9</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>++, <span style="color: #000000;">0</span>, nCont <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Report5<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> nType = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; oPDF := PDFClass<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 />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">nType</span> := nType<br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">cFileName</span> := <span style="color: #ff0000;">"TEST5-"</span> + Str<span style="color: #000000;">&#40;</span> nType, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"."</span> + iif<span style="color: #000000;">&#40;</span> nType < <span style="color: #000000;">3</span>, <span style="color: #ff0000;">"pdf"</span>, <span style="color: #ff0000;">"lst"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">Begin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">PageHeader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">nRow</span> := <span style="color: #000000;">2</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> nCont = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPDF:<span style="color: #000000;">DrawRetangle</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span> - <span style="color: #000000;">0.5</span>, <span style="color: #000000;">&#40;</span> nCont - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> * oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span>, <span style="color: #000000;">1.5</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, &nbsp; &nbsp; oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">0</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"II"</span>,, oPDF:<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, &nbsp; &nbsp; oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">1</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"IPI"</span>,, oPDF:<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, &nbsp; &nbsp; oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">2</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"ICMS"</span>,, oPDF:<span style="color: #000000;">nFontSize</span> /<span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, &nbsp; &nbsp; oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">3</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"ICMS ST"</span>,, oPDF:<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, &nbsp; &nbsp; oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">4</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"PESO BRUTO"</span>,, oPDF:<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, &nbsp; &nbsp; oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">5</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"VL.PRODUTOS"</span>,, oPDF:<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span><span style="color: #000000;">+0.5</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">0</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, PicVal<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span><span style="color: #000000;">+0.5</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">1</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>, PicVal<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span><span style="color: #000000;">+0.5</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">2</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">3</span>, PicVal<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span><span style="color: #000000;">+0.5</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">3</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">4</span>, PicVal<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span><span style="color: #000000;">+0.5</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">4</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">5</span>, PicVal<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span><span style="color: #000000;">+0.5</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">5</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">6</span>, PicVal<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">nRow</span> += <span style="color: #000000;">1.5</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> nCont = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPDF:<span style="color: #000000;">DrawRetangle</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span> - <span style="color: #000000;">0.5</span>, <span style="color: #000000;">&#40;</span> nCont - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> * oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span>, <span style="color: #000000;">1.5</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, &nbsp; &nbsp; oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">0</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"FRETE"</span>,, oPDF:<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, &nbsp; &nbsp; oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">1</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"SEGURO"</span>,, oPDF:<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, &nbsp; &nbsp; oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">2</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"OUTROS"</span>,, oPDF:<span style="color: #000000;">nFontSize</span> /<span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, &nbsp; &nbsp; oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">3</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"DESC.NF"</span>,, oPDF:<span style="color: #000000;">nFontSize</span> /<span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, &nbsp; &nbsp; oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">4</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"PESO LÍQUIDO"</span>,, oPDF:<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span>, &nbsp; &nbsp; oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">5</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"VL.NOTA"</span>,, oPDF:<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span><span style="color: #000000;">+0.5</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">0</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">7</span>, PicVal<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span><span style="color: #000000;">+0.5</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">1</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">8</span>, PicVal<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span><span style="color: #000000;">+0.5</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">2</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">9</span>, PicVal<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span><span style="color: #000000;">+0.5</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">3</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">10</span>, PicVal<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span><span style="color: #000000;">+0.5</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">4</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">11</span>, PicVal<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> oPDF:<span style="color: #000000;">nRow</span><span style="color: #000000;">+0.5</span>, oPDF:<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">6</span> * <span style="color: #000000;">5</span> + <span style="color: #000000;">1</span>, <span style="color: #000000;">12</span>, PicVal<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">nRow</span> += <span style="color: #000000;">1.5</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">DrawImage</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"harbour.jpg"</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oPDF:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span><br /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> PicVal<span style="color: #000000;">&#40;</span> nLen, nDec <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cPicture<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;nDec &nbsp; &nbsp; := iif<span style="color: #000000;">&#40;</span> nDec == <span style="color: #00C800;">NIL</span>, <span style="color: #000000;">0</span>, nDec <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cPicture := Replicate<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"9"</span>, nLen - nDec <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cPicture := LTrim<span style="color: #000000;">&#40;</span> Transform<span style="color: #000000;">&#40;</span> Val<span style="color: #000000;">&#40;</span> cPicture <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"999,999,999,999,999,999"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nDec != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; cPicture := cPicture + <span style="color: #ff0000;">"."</span> + Replicate<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"9"</span>, nDec <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> cPicture<br />&nbsp;</div>[/code:3455yydp] 
Clase pdflib
[code=fw:2gbnr8mi]<div class="fw" id="{CB}" style="font-family: monospace;"><br />* ZE_PDF - GERACAO DE PDF<br /><br />* <span style="color: #000000;">2013.08</span><span style="color: #000000;">.17</span><span style="color: #000000;">.0000</span> - Inicio da definicao por Harupdf<br />* <span style="color: #000000;">2013.08</span><span style="color: #000000;">.24</span><span style="color: #000000;">.1548</span> - Substituicao <span style="color: #00C800;">do</span> PDF<br />* <span style="color: #000000;">2013.09</span><span style="color: #000000;">.01</span><span style="color: #000000;">.0210</span> - Variaveis e metodos para relatorio<br />* <span style="color: #000000;">2013.09</span><span style="color: #000000;">.02</span><span style="color: #000000;">.1000</span> - Metodo PDF:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />* <span style="color: #000000;">2013.09</span><span style="color: #000000;">.02</span><span style="color: #000000;">.1235</span> - Proporcao de coluna pra <span style="color: #000000;">1.69</span><br />* <span style="color: #000000;">2013.09</span><span style="color: #000000;">.06</span><span style="color: #000000;">.0932</span> - Cores em array<br />* <span style="color: #000000;">2013.09</span><span style="color: #000000;">.07</span><span style="color: #000000;">.2031</span> - Proporcao <span style="color: #000000;">1.666</span><br />* <span style="color: #000000;">2013.09</span><span style="color: #000000;">.19</span><span style="color: #000000;">.1649</span> - Ajuste para quando nao imprime nada<br />*----------------------------------------------------------------<br /><br />#require <span style="color: #ff0000;">"hbhpdf"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbclass.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"inkey.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> PDF_PORTRAIT &nbsp;<span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> PDF_LANDSCAPE <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> PDF_TXT &nbsp; &nbsp; &nbsp; <span style="color: #000000;">3</span><br /><br />CREATE <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;oPdf<br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;oPage<br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;cFileName &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nRow &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">INIT</span> <span style="color: #000000;">999</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nCol &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nAngle &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;cFontName &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #ff0000;">"Courier"</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nFontSize &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">9</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nLineHeight &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">1.3</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nMargin &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">30</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nType &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nPdfPage &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;nPageNumber &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;cHeader &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp;cCodePage &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #ff0000;">"CP1252"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddPage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> RowToPDFRow<span style="color: #000000;">&#40;</span> nRow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> ColToPDFCol<span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> MaxCol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawText<span style="color: #000000;">&#40;</span> nRow, nCol, xValue, cPicture, nFontSize, cFontName, nAngle, anRGB <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawLine<span style="color: #000000;">&#40;</span> nRowi, nColi, nRowf, nColf, nPenSize <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawRetangle<span style="color: #000000;">&#40;</span> nTop, nLeft, nWidth, nHeight, nPenSize, nFillType, anRGB <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> DrawImage<span style="color: #000000;">&#40;</span> cJPEGFile, nRow, nCol, nWidth, nHeight <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Cancel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> PrnToPdf<span style="color: #000000;">&#40;</span> cInputFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetType<span style="color: #000000;">&#40;</span> nType <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> PageHeader<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> MaxRowTest<span style="color: #000000;">&#40;</span> nRows <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetInfo<span style="color: #000000;">&#40;</span> cAuthor, cCreator, cTitle, cSubject <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Begin<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #00C800;">METHOD</span> Begin<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> > <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cFileName</span> := MyTempFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"LST"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; SET <span style="color: #0000ff;">PRINTER</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; SET DEVICE <span style="color: #0000ff;">TO</span> <span style="color: #00C800;">PRINT</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cFileName</span> := MyTempFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"PDF"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oPdf</span> := HPDF_New<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_SetCompressionMode<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span>, HPDF_COMP_ALL <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;::cFontName := HPDF_LoadTTFontFromFile( ::oPDF, "c:\windows\fonts\cour.ttf", .t. )</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">cCodePage</span> != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HPDF_SetCurrentEncoder<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPDF</span>, ::<span style="color: #000000;">cCodePage</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> > <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; SET DEVICE <span style="color: #0000ff;">TO</span> SCREEN<br />&nbsp; &nbsp; &nbsp; SET <span style="color: #0000ff;">PRINTER</span> <span style="color: #0000ff;">TO</span><br />&nbsp; &nbsp; &nbsp; RUN <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"cmd /c start notepad.exe "</span> + ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// fErase( ::cFileName )</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nPdfPage</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">AddPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span>, <span style="color: #ff0000;">"NENHUM CONTEUDO (NO CONTENT)"</span>,, ::<span style="color: #000000;">nFontSize</span> * <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> File<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fErase<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; HPDF_SaveToFile<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span>, ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Free<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; RUN <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"cmd /c start "</span> + ::<span style="color: #000000;">cFileName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">METHOD</span> SetInfo<span style="color: #000000;">&#40;</span> cAuthor, cCreator, cTitle, cSubject <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> > <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;cAuthor &nbsp;:= iif<span style="color: #000000;">&#40;</span> cAuthor == <span style="color: #00C800;">NIL</span>, <span style="color: #ff0000;">"JPA Tecnologia"</span>, cAuthor <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cCreator := iif<span style="color: #000000;">&#40;</span> cCreator == <span style="color: #00C800;">NIL</span>, <span style="color: #ff0000;">"Harupdf"</span>, cCreator <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cTitle &nbsp; := iif<span style="color: #000000;">&#40;</span> cTitle == <span style="color: #00C800;">NIL</span>, <span style="color: #ff0000;">""</span>, cTitle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cSubject := iif<span style="color: #000000;">&#40;</span> cSubject == <span style="color: #00C800;">NIL</span>, cTitle, cSubject <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HPDF_SetInfoAttr<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPDF</span>, HPDF_INFO_AUTHOR, cAuthor <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HPDF_SetInfoAttr<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPDF</span>, HPDF_INFO_CREATOR, cCreator <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HPDF_SetInfoAttr<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPDF</span>, HPDF_INFO_TITLE, cTitle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HPDF_SetInfoAttr<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span>, HPDF_INFO_SUBJECT, cSubject <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;HPDF_SetInfoDateAttr<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Year</span><span style="color: #000000;">&#40;</span> Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, Month<span style="color: #000000;">&#40;</span> Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, Day<span style="color: #000000;">&#40;</span> Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, Val<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> Time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, Val<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> Time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, Val<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> Time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"+"</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> SetType<span style="color: #000000;">&#40;</span> nType <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nType != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nType</span> := nType<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nFontSize</span> := iif<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nType</span> == <span style="color: #000000;">1</span>, <span style="color: #000000;">9</span>, <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">METHOD</span> AddPage<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> < <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oPage</span> := HPDF_AddPage<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetSize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, HPDF_PAGE_SIZE_A4, iif<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nType</span> == <span style="color: #000000;">2</span>, HPDF_PAGE_PORTRAIT, HPDF_PAGE_LANDSCAPE <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetFontAndSize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, HPDF_GetFont<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span>, ::<span style="color: #000000;">cFontName</span>, ::<span style="color: #000000;">cCodePage</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nFontSize</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nRow</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">METHOD</span> Cancel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> < <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; HPDF_Free<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span> &nbsp; <br />&nbsp; &nbsp;<br /><span style="color: #00C800;">METHOD</span> DrawText<span style="color: #000000;">&#40;</span> nRow, nCol, xValue, cPicture, nFontSize, cFontName, nAngle, anRGB <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nRadian , cTexto<br />&nbsp; &nbsp;nFontSize := iif<span style="color: #000000;">&#40;</span> nFontSize == <span style="color: #00C800;">NIL</span>, ::<span style="color: #000000;">nFontSize</span>, nFontSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cFontName := iif<span style="color: #000000;">&#40;</span> cFontName == <span style="color: #00C800;">NIL</span>, ::<span style="color: #000000;">cFontName</span>, cFontName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cPicture &nbsp;:= iif<span style="color: #000000;">&#40;</span> cPicture == <span style="color: #00C800;">NIL</span>, <span style="color: #ff0000;">""</span>, cPicture <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nAngle &nbsp; &nbsp;:= iif<span style="color: #000000;">&#40;</span> nAngle == <span style="color: #00C800;">NIL</span>, ::<span style="color: #000000;">nAngle</span>, nAngle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cTexto &nbsp; &nbsp;:= Transform<span style="color: #000000;">&#40;</span> xValue, cPicture <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nCol</span> := nCol + Len<span style="color: #000000;">&#40;</span> cTexto <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> > <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; @ nRow, nCol <span style="color: #0000ff;">SAY</span> cTexto<br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; nRow := ::<span style="color: #000000;">RowToPDFRow</span><span style="color: #000000;">&#40;</span> nRow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nCol := ::<span style="color: #000000;">ColToPDFCol</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetFontAndSize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, HPDF_GetFont<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span>, cFontName, ::<span style="color: #000000;">cCodePage</span> <span style="color: #000000;">&#41;</span>, nFontSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> anRGB != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HPDF_Page_SetRGBFill<span style="color: #000000;">&#40;</span> ::<span style="color: #0000ff;">Page</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HPDF_Page_SetRGBStroke<span style="color: #000000;">&#40;</span> ::<span style="color: #0000ff;">Page</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_BeginText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nRadian := <span style="color: #000000;">&#40;</span> nAngle / <span style="color: #000000;">180</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">3.141592</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetTextMatrix<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, <span style="color: #0000ff;">Cos</span><span style="color: #000000;">&#40;</span> nRadian <span style="color: #000000;">&#41;</span>, <span style="color: #0000ff;">Sin</span><span style="color: #000000;">&#40;</span> nRadian <span style="color: #000000;">&#41;</span>, -<span style="color: #0000ff;">Sin</span><span style="color: #000000;">&#40;</span> nRadian <span style="color: #000000;">&#41;</span>, <span style="color: #0000ff;">Cos</span><span style="color: #000000;">&#40;</span> nRadian <span style="color: #000000;">&#41;</span>, nCol, nRow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_ShowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, cTexto <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_EndText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> anRGB != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HPDF_Page_SetRGBFill<span style="color: #000000;">&#40;</span> ::<span style="color: #0000ff;">Page</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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HPDF_Page_SetRGBStroke<span style="color: #000000;">&#40;</span> ::<span style="color: #0000ff;">Page</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 />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawLine<span style="color: #000000;">&#40;</span> nRowi, nColi, nRowf, nColf, nPenSize <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> > <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; nRowi := <span style="color: #0000ff;">Round</span><span style="color: #000000;">&#40;</span> nRowi, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nColi := <span style="color: #0000ff;">Round</span><span style="color: #000000;">&#40;</span> nColi, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; @ nRowi, nColi <span style="color: #0000ff;">SAY</span> Replicate<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"-"</span>, nColf - nColi <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nCol</span> := Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; nPenSize := iif<span style="color: #000000;">&#40;</span> nPenSize == <span style="color: #00C800;">NIL</span>, <span style="color: #000000;">0.2</span>, nPenSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nRowi := ::<span style="color: #000000;">RowToPDFRow</span><span style="color: #000000;">&#40;</span> nRowi <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nColi := ::<span style="color: #000000;">ColToPDFCol</span><span style="color: #000000;">&#40;</span> nColi <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nRowf := ::<span style="color: #000000;">RowToPDFRow</span><span style="color: #000000;">&#40;</span> nRowf <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nColf := ::<span style="color: #000000;">ColToPDFCol</span><span style="color: #000000;">&#40;</span> nColf <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetLineWidth<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, nPenSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_MoveTo<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, nColi, nRowi <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_LineTo<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, nColf, nRowf <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_Stroke<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawImage<span style="color: #000000;">&#40;</span> cJPEGFile, nRow, nCol, nWidth, nHeight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oImage<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> > <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;nRow &nbsp; &nbsp;:= ::<span style="color: #000000;">RowToPDFRow</span><span style="color: #000000;">&#40;</span> nRow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nCol &nbsp; &nbsp;:= ::<span style="color: #000000;">ColToPDFCol</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nWidth &nbsp;:= Int<span style="color: #000000;">&#40;</span> nWidth * ::<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">1.666</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nHeight := nHeight * ::<span style="color: #000000;">nFontSize</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//IF ValType( cLogoFile ) == "C"</span><br />&nbsp; &nbsp; &nbsp; oImage := HPDF_LoadJPEGImageFromFile<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPdf</span>, cJPEGFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//ELSE</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// &nbsp; oImage := HPDF_LoadJPEGImageFromMem( cJPEGFile )</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// &nbsp; oImage := HPDF_LoadRawImageFromMem() // testar</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//ENDIF</span><br />&nbsp; &nbsp;HPDF_Page_DrawImage<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, oImage, nCol, nRow, nWidth, nHeight <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawRetangle<span style="color: #000000;">&#40;</span> nTop, nLeft, nWidth, nHeight, nPenSize, nFillType, anRGB <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> > <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;nFillType := iif<span style="color: #000000;">&#40;</span> nFillType == <span style="color: #00C800;">NIL</span>, <span style="color: #000000;">1</span>, nFillType <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nPenSize &nbsp;:= iif<span style="color: #000000;">&#40;</span> nPenSize == <span style="color: #00C800;">NIL</span>, <span style="color: #000000;">0.2</span>, nPenSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nTop &nbsp; &nbsp; &nbsp;:= ::<span style="color: #000000;">RowToPDFRow</span><span style="color: #000000;">&#40;</span> nTop <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nLeft &nbsp; &nbsp; := ::<span style="color: #000000;">ColToPDFCol</span><span style="color: #000000;">&#40;</span> nLeft <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nWidth &nbsp; &nbsp;:= <span style="color: #000000;">&#40;</span> nWidth <span style="color: #000000;">&#41;</span> * ::<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">1.666</span><br />&nbsp; &nbsp;nHeight &nbsp; := -<span style="color: #000000;">&#40;</span> nHeight <span style="color: #000000;">&#41;</span> * :: <span style="color: #000000;">nFontSize</span> <br />&nbsp; &nbsp;HPDF_Page_SetLineWidth<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, nPenSize <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> anRGB != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetRGBFill<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetRGBStroke<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, anRGB<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;HPDF_Page_Rectangle<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span>, nLeft, nTop, nWidth, nHeight <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nFillType == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_Stroke<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// borders only</span><br />&nbsp; &nbsp;ELSEIF nFillType == <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_Fill<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// inside only</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_FillStroke<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// all</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> anRGB != <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; HPDF_Page_SetRGBStroke<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</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 />&nbsp; &nbsp; &nbsp; HPDF_Page_SetRGBFill<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</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 />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> RowToPDFRow<span style="color: #000000;">&#40;</span> nRow <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> HPDF_Page_GetHeight<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span> - ::<span style="color: #000000;">nMargin</span> - <span style="color: #000000;">&#40;</span> nRow * ::<span style="color: #000000;">nFontSize</span> * ::<span style="color: #000000;">nLineHeight</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">METHOD</span> ColToPDFCol<span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> nCol * ::<span style="color: #000000;">nFontSize</span> / <span style="color: #000000;">1.666</span> + ::<span style="color: #000000;">nMargin</span><br /><br /><span style="color: #00C800;">METHOD</span> MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nPageHeight, nMaxRow<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> > <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">63</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;nPageHeight := HPDF_Page_GetHeight<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nMargin</span> * <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nMaxRow &nbsp; &nbsp; := Int<span style="color: #000000;">&#40;</span> nPageHeight / <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nFontSize</span> * ::<span style="color: #000000;">nLineHeight</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> nMaxRow<br /><br /><span style="color: #00C800;">METHOD</span> MaxCol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nPageWidth, nMaxCol<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> > <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">132</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;nPageWidth := HPDF_Page_GetWidth<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPage</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nMargin</span> * <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nMaxCol &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> nPageWidth / ::<span style="color: #000000;">nFontSize</span> * <span style="color: #000000;">1.666</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> nMaxCol<br /><br /><span style="color: #00C800;">METHOD</span> PrnToPdf<span style="color: #000000;">&#40;</span> cInputFile <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cTxtReport, cTxtPage, cTxtLine, nRow<br />&nbsp; &nbsp;cTxtReport := MemoRead<span style="color: #000000;">&#40;</span> cInputFile <span style="color: #000000;">&#41;</span> + Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;TokenInit<span style="color: #000000;">&#40;</span> @cTxtReport, Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .NOT. TokenEnd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cTxtPage := TokenNEXT<span style="color: #000000;">&#40;</span> cTxtReport <span style="color: #000000;">&#41;</span> + HB_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> Len<span style="color: #000000;">&#40;</span> cTxtPage <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> cTxtPage, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> == Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cTxtPage := <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> cTxtPage, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">AddPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRow := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> HB_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cTxtPage <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cTxtLine := <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> cTxtPage, <span style="color: #000000;">1</span>, <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> HB_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cTxtPage <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cTxtPage := <span style="color: #0000ff;">Substr</span><span style="color: #000000;">&#40;</span> cTxtPage, <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> HB_EOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cTxtPage <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> nRow++, <span style="color: #000000;">0</span>, cTxtLine <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> PageHeader<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nCont<br />&nbsp; &nbsp;::<span style="color: #000000;">nPdfPage</span> &nbsp; &nbsp;+= <span style="color: #000000;">1</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nPageNumber</span> += <span style="color: #000000;">1</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nRow</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nCol</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">AddPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cHeader</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"EMPRESA DE TESTE"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cHeader</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span>, ::<span style="color: #000000;">cHeader</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">DrawText</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, ::<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">12</span>, <span style="color: #ff0000;">"Folha "</span> + StrZero<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nPageNumber</span>, <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">DrawLine</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0.5</span>, ::<span style="color: #000000;">MaxCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nRow</span> := <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nCol</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; <br /><span style="color: #00C800;">METHOD</span> MaxRowTest<span style="color: #000000;">&#40;</span> nRows <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> PDFClass<br />&nbsp; &nbsp;nRows := iif<span style="color: #000000;">&#40;</span> nRows == <span style="color: #00C800;">NIL</span>, <span style="color: #000000;">0</span>, nRows <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nRow</span> > ::<span style="color: #000000;">MaxRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">2</span> - nRows<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">PageHeader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> TxtSaida<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"PDF Paisagem"</span>, <span style="color: #ff0000;">"PDF Retrato"</span>, <span style="color: #ff0000;">"Matricial"</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MyTempFile<span style="color: #000000;">&#40;</span> cExtensao <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #ff0000;">"temp."</span> + cExtensao<br />&nbsp;</div>[/code:2gbnr8mi] 
Clase pdflib
Gracias, Karina Baje PDFClass.zip con este si construi el ejeutable, sin ningun problema. Lo baje de este link [url] <!-- m --><a class="postlink" href="http://www.pctoledo.com.br/forum/viewtopic.php?f=43&t=14475&start=30">http://www.pctoledo.com.br/forum/viewto ... 5&start=30</a><!-- m --> [/url] Lo hace con hbmk2. Quisiera construir una libreria con esta clase, tu lo has hecho. si miras aparece un c.bat y un test.hbp , tu sabes como hacer usando make si usar hbmk2 Gracias
Clase pdflib
No Ruben. Lo siento. Download, [url:1k409mxo]http&#58;//www&#46;pctoledo&#46;com&#46;br/forum/download/file&#46;php?id=1216[/url:1k409mxo] Saludos.
Clase qComBrowse()
Buen día grupo Alguien que pueda enviarme una copia de la clase qComBrowse() de Quique Guerra. Saludos
Clase qComBrowse()
<!-- m --><a class="postlink" href="http://fivetechsupport.com/forums/viewtopic.php?f=6&t=26077#p142971">http://fivetechsupport.com/forums/viewt ... 77#p142971</a><!-- m -->
Clase qComBrowse()
Gracias !!!
Clase tAnimate
Estimados compañeros: Con objeto de mejorar mis aplicaciones he decidido incluirles algunas mejoras visuales: Por ejemplo: en procesos largos visualizar las tipicas 2 carpetas de windows que se pasan documentos de una a la otra. Esto se consigue con oAnimate = TAnimate():Redefine( 160, vera2 ) oAnimate:Play() ... según el ejemplo de sample\win32.prg. También modifiqué mi RC, pero en mi EXE no consigo visualizar la animación. No me genera error pero tampoco la visualizo. ¿ Que me falta ? Mil gracias. LORENZO. FWH 2.7 + xHarbour
Clase tAnimate
[quote="Loren":kwq81rci]Estimados compañeros: Con objeto de mejorar mis aplicaciones he decidido incluirles algunas mejoras visuales: Por ejemplo: en procesos largos visualizar las tipicas 2 carpetas de windows que se pasan documentos de una a la otra. Esto se consigue con oAnimate = TAnimate():Redefine( 160, vera2 ) oAnimate:Play() ... según el ejemplo de sample\win32.prg. También modifiqué mi RC, pero en mi EXE no consigo visualizar la animación. No me genera error pero tampoco la visualizo. Mi PRG es: define dialog vera2 resource 'CONTROL' REDEFINE SAY on prompt 'AGE' id 201 of vera2 font ofnt1 REDEFINE BITMAP inten id 108 of vera2 resource 'keys' transparent redefine say otexto prompt texto id 300 of vera2 oAnimate = TAnimate():Redefine( 160, vera2 ) activate dialog vera2 center nowait on init oAnimate:Play() ¿ Que me falta ? Mil gracias. LORENZO. FWH 2.7 + xHarbour[/quote:kwq81rci]
Clase tAnimate
hi. Lore yo lo utilizo sin problemas cuando indexo mis archivos,,, oAnimate:CopyFiles() _tipoDeAnimacion(oAnimate,4) oAnimate:Play() * aqui mi proceso oAnimate:stop() function _tipoDeAnimacion( oAnimate, nAvi ) do case case nAVI == 1 oAnimate:Search() case nAVI == 2 oAnimate:FindFile() case nAVI == 3 oAnimate:Locate() case nAVI == 4 oAnimate:CopyFiles() case nAVI == 5 oAnimate:CopyFile() case nAVI == 6 oAnimate:DelFile() case nAVI == 7 oAnimate:EmptyCan() case nAVI == 8 oAnimate:DestFile() endcase return nil saludos...
Clase tAnimate
Gracias sysctrl2, me fuiste de mucha ayuda. me faltaba por incluir el tipo de animación. Ahora ya se visualiza aunque no consigo que tenga animación. Seguiré probanco. Mil gracias. LOREN
Clase tAnimate
Donde se encuentran estos archivos en windows findfile() y los otros
Clase tFolderEx
Buenas compañeros: ¿Donde me puedo conseguir la clase tFolderEx? En la versión FWH 8.07 no está esta clase. Mi email: <!-- e --><a href="mailto:lorenzo_fernandez@hotmail.com">lorenzo_fernandez@hotmail.com</a><!-- e --> Gracias. Un saludo. LORENZO.
Clase tGraph
Alfredo o algun compañero del foro: Estoy usando la clase tGraph de Alfredo Arteaga. Todo esta muy bien con excepcion del metodo oGraph:Save2BMP(); este solo me graba un cuadro pequeño blanco con una x en el medio. Intente con la ultima clase modificada, pero me sigue saliendo igual. Estou usando FWH 2.7 Sep 06 + xHarbour builder Jan 07. Estaria por aqui el problema? Alguna sugerencia? Saludos, George
Clase tGraph
George, yo he probado asi y me funciona cFile := cTempFile()+"bmp" IF oGraph:nType == 3 .OR. ( oGraph:nType == 2 .AND. !oGraph:l3D ) oGraph:Save2Bmp(cFile,0) nOpt := 0 ENDIF probe con barras,lineas,puntos y pie salu2 paco
Clase tGraph
Francisco, Gracias por responder. Yo tambien lo hice de esa manera, usando la misma clase modificada que tu usas, y me sigue dando el problema. No se por donde anda la solucion. Pero creo que el problema debe estar en que uso xHarbour builder y no harbour. Por otro lado si me funciona perfectamente la opcion de copiar la grafica al clipboard. [b:3ausvh8c]Mi pregunta a ti, a Antonio y a cualquier compañero de foro que sepa la respuesta es: Como Salvar Una Imagen, Tipo BMP, Que Esta En El ClipBoard?[/b:3ausvh8c] Saludos, George
Clase tGraph
George, Prueba así: [code:3i9ov8f0] DEFINE CLIPBOARD oClp OF oWnd DibWrite&#40; "screen&#46;bmp", DibFromBitmap&#40; oClp&#58;GetBitmap&#40;&#41; &#41; &#41; [/code:3i9ov8f0]
Clase tGraph
Hola Antonio, Trate tu sugerencia y me salva un fichero igual, solo presenta un pequeño cuadrado con una X roja en el centro. Que podra ser? Me tiene vuelto loco. Saludos George
Clase tGraph
El fichero screen.bmp que se crea, que tamaño tiene ?
Clase tGraph
Antonio, El tamaño del fichero creado es de 689,990 Bytes Te estoy enviando a tu correo personal el fichero generado, quizas tu puedas ver algo que yo no estoy viendo. Saludos, George[/url]
Clase tGraph
El fichero lo estas creando así ? [code:2eatatjy] DEFINE CLIPBOARD oClp OF oWnd DibWrite&#40; "screen&#46;bmp", DibFromBitmap&#40; oClp&#58;GetBitmap&#40;&#41; &#41; &#41; [/code:2eatatjy] y previamente has puesto la imagen en el clipboard ?
Clase tGraph
La imagen se copia al clipboard con la siguiente funcion: WndCopy( Self:hWnd, .F., .T. ) que esta en el metodo tGraph Yo verifique lo anterior y mediante un paste puedo poner la imagen en Ms-Word. Esta parte trabaja 100% OK Esta son las intrucciones, tal cual como tu me indicaste, que estoy usando para grabar el fichero en el Hard Disk: DEFINE CLIPBOARD oClp OF oWnd DibWrite( "screen.bmp", DibFromBitmap( oClp:GetBitmap() ) ) Pero solamente se salva un pequeño cuadrado blanco con una X roja en el medio <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Saludos George
Clase tGraph
george, puede ser por cuestion del compilador, yo uso harbour y me va bien, si que es un caso para la araña. intentare probando con xharbour a ver que tal, luego te comento salu2 paco
Clase tGraph
Francisco te agradezco tu ayuda en este asunto. Espero encontrar una solucion a este problema sin tener que abandonar xHarbour por Harbour. Yo pienso que, si el problema es debido a que uso xHarbour, quizas Alfredo Arteaga pudiera encontrar una solucion al mismo. Saludos, George
Clase tGraph del Alfredo Arteaga
Estoy aprendendiendo a usar la clase tGraph de Alfredo Arteaga en ambiente xHarbour + FWH. Todo esta muy bien con excepcion del metodo oGraph:Save2BMP(); este solo me graba un cuadro pequeño blanco con una x en el medio. Quizas necesito algun DLL o la clase Printer modificada? Alfredo o algun compañero del foro que me pueda orientar? Saludos, george
Clase tGraph del Alfredo Arteaga
George, yo la uso sin probelmas, si me guarda el grafico correctamente, si gustas te envio la clase que uso. oGraph:Save2Bmp(cFile,0) salu2 paco
Clase tGraph del Alfredo Arteaga
Paco, Gracias por contestarme. Grabar la grafica en formato BMP, o culaquier otro formato, es lo unico que me falta para terminar esta parte de una aplicacion que estoy desarrollando. Paco, si no te es mucha molestia enviame por favor las clases Tgraph.prg, printer.prg, rprev.prg y el PREV.DLL que estas usando, a <!-- e --><a href="mailto:georgeabinader@comcast.net">georgeabinader@comcast.net</a><!-- e --> Puede que mi problema no sea solamente de Tgraph.prg sino con las otras clases, pues a estas ultimas les he hecho algunas modificaciones. Saludos, George
Clase tGraph del Alfredo Arteaga
Estimado Colega Me puedes enviar la clase Gracias Fabian <!-- e --><a href="mailto:databaselab2002@yahoo.com.ar">databaselab2002@yahoo.com.ar</a><!-- e -->
Clase tGraph del Alfredo Arteaga
Francisco, Enviame la version actualizada que estas usando de las clase tGraph.prg y si tienes los "wrappers" del DLL rmchart, por favor enviamelo tambien a: <!-- e --><a href="mailto:georgeabinader@msn.com">georgeabinader@msn.com</a><!-- e --> y a <!-- e --><a href="mailto:georgeabinader@comcast.net">georgeabinader@comcast.net</a><!-- e -->. Saludos George
Clase tIP y Clase tURL
Hola a Todos, A ver si alguien me puede decir a partir de cual xHarbour se tiene acceso a las clases mencionadas. Tengo la 0.99.61 y al compilar me dice que no estan !!! Gracias anticipadas,
Clase tIP y Clase tURL
no estan incluidas en en las libs que se linkean por default, tienes que agregar la TIP.LIB y listo
Clase tIP y Clase tURL
Excelente Rene ! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> yaistubo ! Gracias....
Clase tIconBar
Alguien me podria decir donde la encuentro, hay un ejemplo que se llama: testout y hace referencia a dicha clase. Trato de compilarla pero me sale un error de: Unresolved external '_HB_FUN_TICONBAR' Gracias Saludos Marco A. Delgado. <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Clase tIconBar
por lo visto solo fue un mal ejemplo de fwh.. <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> Saludos Marco A. Delgado.
Clase tIconBar
Marco, Tienes razón. Eliminado. Discúlpanos.
Clase tOleAuto
Hola a todos: Algien me podria indicar como puedo crear un archivo Excel con la Clase tOleauto que contenga una Hoja y como añadirle los campos de una base de datos. O bien algun manual o direccion donde pueda ver ejemplos de esta clase. Saludos Carlos
Clase tOleAuto
Hola Carlos: Si lo unico que queres es crear una hoja en Excel, por ahí te sirve la clase FILEXLS con la cual le podes poner los campos de una tabla, o lo que fuese (textos, calculos, etc.) La misma tiene su manual y la podes descargar aqui en la zona de utilerias.
Clase tOleAuto
Carlos, Haz una búsqueda en estos foros (botón superior de busquedas) por: createobject AND excel
Clase tOleAuto
Gracias por vuestro interes como pone Antonio he hecho una busqueda y ya lo he realizado y lo tengo casi terminado ya que me hace una cosa que no se como solucionar y es que cuando realiza todo el proceso queda en el Administrador de Tareas del Ordenador una linea con EXCEL.EXE y no se como quitarla. Podriais decirme como, gracias Carlos
Clase tOleAuto
Carlos, Debes terminar el proceso, algo asi : oHoja:End() // cierras la hoja activa oExcel:end() // cierras el Objeto Ojala te sirva Ramon Paredes Managua, Nicaragua
Clase tOleAuto
Gracias Ramon, puse otro post y me dijeron que ademas de esto que me dices hay que poner al final oExcel:=NIL y asi despues que cierras la aplicacion cierras el Excel.exe o Winword.exe Pero gracias por tu interes. Un saludo Carlos
Clase tPlan de Daniel
Saludos Alguien tiene por ahi la ultima version de la clase tPlan de Daniel Garcia Por favor que la suba, publique o envie por mail. Gracias de antemano Please a este mail <!-- e --><a href="mailto:adolfo.lagos@gmail.com">adolfo.lagos@gmail.com</a><!-- e --> Desde Chile Adolfo
Clase tPlan de Daniel
Me sumo a la peticion, <!-- e --><a href="mailto:joseluisy@hotmail.com">joseluisy@hotmail.com</a><!-- e --> gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Clase tPlan de Daniel
UP...nadie por ahi la tiene... Daniel.. estas visible <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> Desde Chile Adolfo
Clase tSMTP para xHarbour
Hola a todos... Tenia tiempo que no daba una vuela por estos lares... veo muchos nombres nuevos, y la asistecia sabia y oportuna de varios viejos amigos... Hoy me trae por aca el tema de la clase tSMTP que modifico hace algun tiempo el amigo Luis Krause... Me fue muy util cuando la implemente en Clipper, y me gustaria ahora implementarla en 32 bist con [x]Harbour... Ya hay alguien que la tenga funcionando con [x]Harbour??? que posibilidad hay de que me la faciliten? uso xHarbour 0.993 y FW2.4 Gracias de antemano por la ayuda... Saludos a todos... Giancarlo J. Sabattino S. Valencia, Venezuela.
Clase tSMTP para xHarbour
Hola Giancarlo Por aqui la encontre entre mis chunches <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> : <!-- m --><a class="postlink" href="http://hyperupload.com/download/0243cd3541/TSMTP.zip.html">http://hyperupload.com/download/0243cd3 ... P.zip.html</a><!-- m --> Saludos
Clase tSMTP para xHarbour
Es el mismo codigo fuente para 16 y 32 bits, debe funcionarte la de clipper sin problema
Clase tSMTP para xHarbour
alguien pudo enviar archivos anexos al mensaje (tipo .xls o .jpg) con esta clase?. Estuve intentando algunos ejemplos sin exito. Llegan los mensajes con los anexos pero con tamaño cero. Si alguien sabe algun tip se agradece. Saludos Ralph
Clase tSMTP para xHarbour
Con la clase TSmtp original de FW no se puede, todos los archivos anexos te los trata como si fueran textos, debes utilizar la clase modificada por Luis Krause
Clase tWord y LibreOffice
Mis estimados del Foro... Buen Saludos y Dia a todos... he usado por mucho tiempo, y de manera muy satisfactoria, la clase tWord y la caracteristica de combinación de correspondencia del Office de MicroSoft... el asunto esta ahora que personalmente me cambie a Libre Office, y de hecho he ido animando a mis clientes a migrar a dicha aplicación, pero ahora se me presenta el pequeño problema que la clase tWord no funciona con Libre Office... alguien ya ha tenido alguna experiencia respecto a ese tema??? o hay alguna clase al estilo tWord que pueda utilizar con Libre Office??? Gracias de antemano a todos por sus comentarios... Giancarlo Sabattino Valencia, Venezuela
Clase tWord y LibreOffice
Mira se ayuda: [code=fw:1d44a1ds]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FGet.ch"</span> &nbsp; <br /><br /><span style="color: #00C800;">Function</span> LIBRE_OFFICE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oService, oDesktop, oDocument, oTexto<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oDlg, oGet, cVarTxt, cFile, aProp:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;cFile := cGetFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Arquivo (doc,odt)|*.doc;*.odt|"</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Selecione o Arquivo (Doc/Odt)"</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">&#40;</span>cFILE<span style="color: #000000;">&#41;</span> ; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span> ; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; cFile := <span style="color: #ff0000;">"file:///"</span>+StrTran<span style="color: #000000;">&#40;</span>cFile,<span style="color: #ff0000;">"<span style="color: #000000;">\"</span>,"</span>/<span style="color: #ff0000;">")<br /><br />&nbsp; &nbsp;TRY<br /><br />&nbsp; &nbsp; &nbsp; oService := TOleAuto():New("</span>com.sun.star.ServiceManager<span style="color: #ff0000;">")<br /><br />&nbsp; &nbsp;CATCH<br /><br />&nbsp; &nbsp; &nbsp; MsgStop( "</span>Desculpe, precisa ter o LiBreOffice instalado.<span style="color: #ff0000;">", "</span>Alerta<span style="color: #ff0000;">" )<br /><br />&nbsp; &nbsp; &nbsp; RETURN NIL<br /><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;oDesktop := oService:createInstance("</span>com.sun.star.frame.Desktop<span style="color: #ff0000;">")<br /><br />&nbsp; &nbsp;AAdd(aProp,MakePropertyValue(oService,"</span>Hidden<span style="color: #ff0000;">",.T.)) //seta prop para ocultar<br /><br />&nbsp; &nbsp;oDocument := oDesktop:loadComponentFromURL(cFile, "</span>_blank<span style="color: #ff0000;">", 0, aProp) // {}) //abre o doc<br /><br />&nbsp; &nbsp;//OBTÉM O TEXTO<br /><br />&nbsp; &nbsp;oTexto = oDocument:getText()<br /><br />&nbsp; &nbsp;cVarTxt := oTexto:getString()<br /><br />&nbsp; &nbsp;oDocument:Close(.T.) //fechao doumento<br /><br />&nbsp; &nbsp;DEFINE DIALOG oDlg TITLE "</span>Visualiza documentos doc/odt<span style="color: #ff0000;">" SIZE 640,480<br /><br />&nbsp; &nbsp;oDlg:lHelpIcon := .F.<br /><br />&nbsp; &nbsp;@ 0.5, 01 FORMAT GET oGet VAR cVarTXT OF oDlg SIZE 310,220 UPDATE<br /><br />&nbsp; &nbsp;ACTIVATE DIALOG oDlg CENTERED<br /><br />Return Nil<br />**============================================================================<br />STATIC FUNCTION MakePropertyValue( oService, cName, nValue )<br /><br />&nbsp; &nbsp;LOCAL oStruct := oService:Bridge_GetStruct("</span>com.sun.star.beans.PropertyValue<span style="color: #ff0000;">")<br /><br />&nbsp; &nbsp;oStruct:Name := cName<br /><br />&nbsp; &nbsp;oStruct:Value := nValue<br /><br />RETURN(oStruct)<br /></span></div>[/code:1d44a1ds] Saludos.
Clase tWord y LibreOffice
João, Agradecido por la ayuda... voy a probarlo y cualquier cosa te estare comentando.