Jump to content
Fivewin Brasil

Salvar em PDF em FWxH 9.02


jfaguiar

Recommended Posts

Uma boa opção é o direcionamento do relatório para uma impressora virtual, uso há muito tempo BullZip PDF Printer, muito boa. Também tem a opção do link abaixo de uma classe que criei que usa broffice/openoffice que permite salvar no formato pdf.

http://fivewin.com.br/index.php?/topic/21758-gerar-planilha-no-openoffice/?hl=openoffice

JMSILVA

Link to comment
Share on other sites

Para usar o PdfCreator automaticamente faz assim

   IF EMPTY( oPC := WIN_OLECreateObject( "PDFCreator.clsPDFCreator" ) )
      MsgStop("Pdf Creator não esta instalado neste computador.",;
      			"Prodedimento abortado")
		
      RETURN .F.
   ENDIF
	
   oPC:__hSink := __AxRegisterHandler( oPC:__hObj, {|X| nEvent := X} )

   oPC:cStart( "/NoProcessingAtStartup" )
   oPC:_cOption( "UseAutosave", 1 )
   oPC:_cOption( "UseAutosaveDirectory", 1 )
   oPC:_cOption( "AutosaveDirectory", "C:\TESTE\" )
   oPC:_cOption( "AutosaveFilename", "MeuPdf.pdf" )
   oPC:_cOption( "AutosaveFormat", 0 )

   oPC:cDefaultPrinter := "PDFCreator"
   oPC:cClearCache()
   oPC:cPrinterStop := .F.

	PRINTER oPrnPdf NAME "Gerando pdf" ;
	        to "PDFCreator"  //modal

        DEFINE FONT oFnt1 NAME "Arial" SIZE 0,-20 OF oPrnPdf 

		oPrnPdf:SetPortrait()
		nRcol := oPrnPdf:nlogpixelx()/2.54
		nRlin := oPrnPdf:nlogpixely()/2.54

        PAGE 
          oPrnPdf:say(05*nRlin,05*nRcol,;
                     "TESTE COM PDFCREATOR",;
                     oFnt1,,,,0)
		ENDPAGE
		
	ENDPRINTER

   nTime := hb_milliseconds()
   DO WHILE nEvent == 0 .AND. (hb_milliseconds() - nTime) < 10000
      hb_idleSleep( 0.5 )
      /* The following dummy line is required to allow COM server to send event [Mindaugas] */
      oPC:cOption("UseAutosave") 
   ENDDO
	
   hb_idleSleep( 0.7 )
   oPC:cClose()
	

Link to comment
Share on other sites

Uma boa opção é o direcionamento do relatório para uma impressora virtual, uso há muito tempo BullZip PDF Printer, muito boa. Também tem a opção do link abaixo de uma classe que criei que usa broffice/openoffice que permite salvar no formato pdf.

http://fivewin.com.br/index.php?/topic/21758-gerar-planilha-no-openoffice/?hl=openoffice

JMSILVA

JMSILVA, me corrija porfa, meu BROFFICE não tem opção de salver em .PDF, qual é a sua versão que salva ?

Ou eu entendi errado?

Obg. abs.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...