Page 1 of 2

PDF From Preview

Posted: Mon Aug 21, 2006 12:28 pm
by George
Does exists any version de PREVIEW than can save in PDF format?

Regards


George

Posted: Mon Aug 21, 2006 12:56 pm
by Detlef Hoefner
George,

i think you'll need a pdf printer installed for this.

Regards,
Detlef

Posted: Mon Aug 21, 2006 1:58 pm
by George
Detlef

I know that I can do that using PDFCreator.

I would like to save PDF from FiveWin PREVIEW. Do you know any class that I can use to create PDF report?


George

Posted: Mon Aug 21, 2006 2:16 pm
by Detlef Hoefner
Geaorge,

sorry i don't know a class like that which can be activated from inside of a preview.

Regards,
Detlef

Posted: Mon Aug 21, 2006 3:39 pm
by Manuel Valdenebro
George wrote: I would like to save PDF from FiveWin PREVIEW. Do you know any class that I can use to create PDF report?

George,

I have changed rpreview.prg class, for let us to select a printer from window's preview.- If you have installed a pdf printer, you can select that printer and "voilé".

Posted: Mon Aug 21, 2006 4:24 pm
by George
>Manuel write:
>I have changed rpreview.prg class, for let us to select a printer from >window's preview.- If you have installed a pdf printer, you can select >that printer and "voilé".


Manuel

That is a good start. Can I get the modification that you did to rpreview.prg?

George

Posted: Mon Aug 21, 2006 5:54 pm
by Manuel Valdenebro
George wrote: Can I get the modification that you did to rpreview.prg?
George,

You can download from:

http://hyperupload.com/download/02caf68 ... w.prg.html

All lines with "mcn" has been changed for me.

Regards

Posted: Mon Aug 21, 2006 8:05 pm
by George
Manuel,

Thanks for your RPREVIEW.PRG modified.

When I try to compiler I get the following errors:

Syntax error: "parse error at "IMAGELIST"
Syntax error: "parse error at "TOOLBAR"
Syntax error: "parse error at "TBBUTTON"
Syntax error: "parse error at "TBSEPARATOR"

Also I get FixSay() and IsWin64() undefined function

Maybe the errors are because I am using FWH 2.5

Regards


George

Posted: Mon Aug 21, 2006 8:54 pm
by Antonio Linares
George,

> Maybe the errors are because I am using FWH 2.5

Yes, those classes and functions are in FWH 2.7. You may upgrade from www.fivetechsoft.com

Posted: Mon Aug 21, 2006 8:56 pm
by Manuel Valdenebro
George wrote:Maybe the errors are because I am using FWH 2.5
George,

May be.- Perhaps you have in FWH\SOURCE\CLASSES an old rpreview.prg version 2.5.- You can compare it with my version, and modifing/adding in your version only "mcn-lines".

Posted: Mon Aug 21, 2006 9:27 pm
by Enrico Maria Giordano
If I'm not missing something obvious you have a resource leak here:

Code: Select all

func f_CamImpre (oDevice, cCbx )
local cPrinter

    cPrinter := GetProfString( "windows", "device" , "" )
    WriteProfString( "windows", "device", cCbx )
    SysRefresh()
    PrinterInit()
    oDevice:hDC := GetPrintDefault( GetActiveWindow() )
    SysRefresh()
    WriteProfString( "windows", "device", cPrinter  )

RETURN nil
You should release oDevice:hDC before replacing it:

Code: Select all

DeleteDC( oDevice:hDC )
oDevice:hDC := GetPrintDefault( GetActiveWindow() )
EMG

Posted: Mon Aug 21, 2006 9:42 pm
by George
Manuel

Thanks. Work perfect!

I'll have to upgrade to FWH2.7 and xHarbour Professional ASAP

George

Posted: Mon Aug 21, 2006 10:25 pm
by George
Manuel

The only *PROBLEM* that we have is when select a different printer in preview screen, the output does not fit in the new printer. Please try selecting differents printer (e.g. Winfax)

George

Posted: Mon Aug 21, 2006 11:43 pm
by George
Manuel

Here your function with a minor modification

//------------------------------------------------------------------------
// función para cambiar la impresora desde previo (mcn)
//------------------------------------------------------------------------
func f_CamImpre (oDevice, cCbx )
local cPrinter

cPrinter := GetProfString( "windows", "device" , "" )
WriteProfString( "windows", "device", cCbx )
SysRefresh()
PrinterInit()
DeleteDC( oDevice:hDC ) // Sugestion by Enrico M. Giordano
oDevice:hDC := GetPrintDefault( GetActiveWindow() )
oWnd:End() // To close current preview
// Insert here the function to create the report
SysRefresh()
WriteProfString( "windows", "device", cPrinter )

RETURN nil



Regards


George

Re: PDF From Preview

Posted: Sun Aug 27, 2006 1:41 am
by eduardofreni
I resolved this problem a year ago.
For to give at my customers professional printed documents, i cannot use arrangiament. The invoice, the look and feel and easy to use, have not price.
I have studyed for some time crystal report, after have tested many report generator free and not free.
I tested crw 8 and 8.5 for to create report directly wrapping dll.
But the result was not stable.
After tested crw 9 and 10 and 11 i make a simple program in visual basic, for resolve runtime problem of crw.
After i have coded a fivewin program for printer control and control of visual basic program, for mail the invoice and other documents in many file formats. The user see only the fivewin dialog, the Vb program are not visible.
Now i have a professional program in fivewin, who control:
1) the select type of file of document as xls, doc, rtf, pdf, or printer.
2) select the printer prior of print a document, and his status.
3) a professional preview.
4) Mail the document at customers across outlook express, or smtp server of fivewin (i modify the class).
After a long time for debug, i have begun to sell it with my programs and the customers are content.

Laborious is to make by themselves, but at end is big satisfactions.

Eduardo Freni








George wrote:Does exists any version de PREVIEW than can save in PDF format?

Regards


George