FW pdf viewer?

Re: FW pdf viewer?

Postby Otto » Tue Apr 30, 2013 3:07 pm

Hello Antonio, hello Reinaldo,
I use the same technique to preview word documents.
The advantage is that you have on a 22" screen a 100% size preview not only a small jpg like inside the docx file.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: FW pdf viewer?

Postby Antonio Linares » Tue Apr 30, 2013 5:07 pm

Brilliant! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FW pdf viewer?

Postby dutch » Wed May 01, 2013 4:06 am

Dear Reinaldo,

I've use Activex and it work fine for me. I've got it from the Forum (somewhere) but it need to install Acrobat Reader.
Code: Select all  Expand view
Function OpenPdf(cTempFile,cReport)
LOCAL oWnd, oPdf

Default cReport := cTempFile
DEFINE WINDOW oWnd TITLE cReport

   oPdf = TActiveX():New( oWnd, "AcroPDF.PDF" )

   oPdf:LoadFile := cTempFile

   oWnd:oClient = oPdf

ACTIVATE WINDOW oWnd MAXIMIZED ;
            ON INIT SETWINDOWPOS( oWnd:hWnd, -1, 0, 0, 0, 0, 3 ) ;
            VALID (oPdf:End(), .T. )
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: FW pdf viewer?

Postby Antonio Linares » Wed May 01, 2013 6:42 pm

Dutch,

Thanks, we forgot about this way and it seems to be the simplest one :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FW pdf viewer?

Postby codemaker » Wed May 15, 2013 11:06 pm

Antonio, how can I test Class FWPdf in FWH 13.01 to print REPORT into PDF?
I tested on PRINTER class:
Code: Select all  Expand view
FUNCTION TestPDF1()
*-----------------
 
   local oPrn


   PRINT oPrn PREVIEW

      PAGE

      oPrn:CmSay( 2, 2, "Hello world" )

      ENDPAGE

      oPrn:lMeta = .F.

   ENDPRINT

   FWSavePreviewToPDF( oPrn, "boris.PDF", .T. )
return nil

after I did the changes you suggested to the function "FWSavePreviewToPDF()"

But I cannot manage it to work for REPORT
Can you give me some suggestion please?

Thanks
Boris
User avatar
codemaker
 
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Re: FW pdf viewer?

Postby Antonio Linares » Tue May 21, 2013 2:05 pm

Boris,

This is the right way to do it using FWH 13.04

Code: Select all  Expand view
#include "FiveWin.ch"
#include "print.ch"
#include "report.ch"

FUNCTION TestPDF()
//------------------

   LOCAL oFont1, oFont2
   LOCAL oReport, oPrn
   LOCAL aPodaci := {}
   LOCAL nElement := 1

   AADD(aPodaci, "AAAAAAAAAAAAAAA")
   AADD(aPodaci, "BBBBBBBBBBBBBBB")
   AADD(aPodaci, "CCCCCCCCCCCCCCC")
   AADD(aPodaci, "DDDDDDDDDDDDDDD")
   AADD(aPodaci, "EEEEEEEEEEEEEEE")
   AADD(aPodaci, "FFFFFFFFFFFFFFF")
   AADD(aPodaci, "GGGGGGGGGGGGGGG")

   DEFINE FONT oFont1 NAME "Courier New CE" SIZE 0,-10
   DEFINE FONT oFont2 NAME "Courier New CE" SIZE 0,-10 BOLD

   PRINT oPrn FILE "boris09.pdf"

   REPORT oReport TITLE  " ", ;
     "TEST REPORT" , ;
     "(PRINTED DIRECTLY TO PDF)" ;
     FOOTER "Page " + Str( oReport:nPage, 4, 0 ) CENTERED ;  // "Page"
     FONT oFont1, oFont2 ;
     TO DEVICE oPrn
       
     COLUMN TITLE " " DATA aPodaci[nElement] FONT 1
       
   END REPORT
       
   *oReport:CellView()
   oReport:bSkip := {|| nElement++ }
       
    ACTIVATE REPORT oReport    ;
        WHILE nElement <= LEN(aPodaci)

   oPrn:End()

RETURN nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FW pdf viewer?

Postby codemaker » Tue May 21, 2013 3:01 pm

Thanks Antonio!
Works perfect!
User avatar
codemaker
 
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: jmartial and 108 guests