MAMP2 Posted December 26, 2022 Report Share Posted December 26, 2022 bom dia pessoal, queria ver se tem opcao de gerar uma listagem especifica em pdf de forma automatica, alguem conhece um jeito? Quote Link to comment Share on other sites More sharing options...
kapiaba Posted December 27, 2022 Report Share Posted December 27, 2022 Haru PDF Library és bueno. Regards, saludos. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted December 29, 2022 Report Share Posted December 29, 2022 Também: #Include "FiveWin.ch" FUNCTION Main() LOCAL WNOMBREARQPDF IF FILE( "ARCHIVO.PDF" ) ERASE( "ARCHIVO.PDF" ) ENDIF MsgRun( "GENERANDO ARCHIVO *.PDF...", ; "Por Favor, Aguarde... ", ; { || WinExec( Generar_PDF() ), 3 } ) // Perfect, mister Nages, Thank You IF FILE( "ARCHIVO.PDF" ) WNOMBREARQPDF := "c:\FWH1905\SAMPLES\archivo.pdf" ShellExecute( 0, "Print", WNOMBREARQPDF,,, 3 ) ENDIF RETURN NIL FUNCTION Generar_PDF() LOCAL cText := MEMOREAD( "c:\fwh1905\samples\arq.txt" ) LOCAL oPrn, oFont // PRINT oPrn PREVIEW FILE "archivo.pdf" // com preview NAO funciona PRINT oPrn FILE "archivo.pdf" // em silencio sem preview DEFINE FONT oFont NAME "COURIER NEW" SIZE 0,-10 OF oPrn WHILE .NOT. EMPTY( cText ) SYSREFRESH() CURSORWAIT() PAGE @ 1,1 PRINT TO oPrn TEXT @cText SIZE 7,10 INCHES FONT oFont ENDPAGE ENDDO ENDPRINT RELEASE FONT oFont CURSORARROW() RETURN NIL OU: #Include "FiveWin.ch" FUNCTION Main() // LOCAL cText := MEMOREAD( "c:\fwh1905\samples\yunus.prg" ) LOCAL cText := MEMOREAD( "c:\fwh1905\samples\ARCHIVO.TXT" ) LOCAL oPrn, oFont PRINT oPrn PREVIEW DEFINE FONT oFont NAME "COURIER NEW" SIZE 0, -10 OF oPrn WHILE .NOT. EMPTY( cText ) SYSREFRESH() PAGE @ 1, 1 PRINT TO oPrn TEXT @cText SIZE 7, 10 INCHES FONT oFont ENDPAGE ENDDO IF lPdfImp oPrn:lMeta = .F. // .T. -> Defecto - .F. Genera el PDF. ENDIF ENDPRINT IF lPdfImp FWSavePreviewToPDF( oPrn, "ARCHIVO.pdf", .F. ) ENDIF RELEASE FONT oFont RETURN NIL Regards, saludos. Quote Link to comment Share on other sites More sharing options...
MAMP2 Posted January 12, 2023 Author Report Share Posted January 12, 2023 oi joao eu uso o printerSetUp(), tem com eu gerar o PDF automatico com ele minha ideia é o cliente pedir a listagem eu gero a listagem gravo em PDF e passo a informaca pra ele que o arquivo de nome "MMMMMM" esta disponivel na pasta c:\PPPPPP Quote Link to comment Share on other sites More sharing options...
kapiaba Posted January 12, 2023 Report Share Posted January 12, 2023 37 minutos atrás, MAMP2 disse: oi joao eu uso o printerSetUp(), tem com eu gerar o PDF automatico com ele minha ideia é o cliente pedir a listagem eu gero a listagem gravo em PDF e passo a informaca pra ele que o arquivo de nome "MMMMMM" esta disponivel na pasta c:\PPPPPP Não entendi? printerSetUp(), é para "setar/escolher" o tipo de impressora. Explique-se melhor. abs. Regards, saludos. Quote Link to comment Share on other sites More sharing options...
MAMP2 Posted January 12, 2023 Author Report Share Posted January 12, 2023 sim, eu uso o printsetup pra escolher e na relacao de escolha tem a impressora DOPDF7 instalada ele escolhe ela, define o nome e grava, que queria ver como "pular" este passo, page ip_venda:Say(lin_lis,sal_col*10,"RECIBO CAIXA",dl_cx_fo1,0,CLR_BLACK) este é o comando que uso pra impressao, o printsetup é pra escolher eu quero deixar isto de forma automatica Quote Link to comment Share on other sites More sharing options...
kapiaba Posted January 13, 2023 Report Share Posted January 13, 2023 Eu prefiro o SUMATRA.exe. Má, faça uma busca por DOPDF. Regards, saludos. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.