PDF From Preview

George
Posts: 710
Joined: Tue Oct 18, 2005 6:49 pm

PDF From Preview

Post by George »

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

Regards


George
User avatar
Detlef Hoefner
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany
Contact:

Post by Detlef Hoefner »

George,

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

Regards,
Detlef
George
Posts: 710
Joined: Tue Oct 18, 2005 6:49 pm

Post 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
User avatar
Detlef Hoefner
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany
Contact:

Post by Detlef Hoefner »

Geaorge,

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

Regards,
Detlef
User avatar
Manuel Valdenebro
Posts: 706
Joined: Thu Oct 06, 2005 9:57 pm
Location: Málaga-España

Post 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é".
Un saludo

Manuel
George
Posts: 710
Joined: Tue Oct 18, 2005 6:49 pm

Post 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
User avatar
Manuel Valdenebro
Posts: 706
Joined: Thu Oct 06, 2005 9:57 pm
Location: Málaga-España

Post 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
Un saludo

Manuel
George
Posts: 710
Joined: Tue Oct 18, 2005 6:49 pm

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Manuel Valdenebro
Posts: 706
Joined: Thu Oct 06, 2005 9:57 pm
Location: Málaga-España

Post 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".
Un saludo

Manuel
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post 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
George
Posts: 710
Joined: Tue Oct 18, 2005 6:49 pm

Post by George »

Manuel

Thanks. Work perfect!

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

George
George
Posts: 710
Joined: Tue Oct 18, 2005 6:49 pm

Post 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
George
Posts: 710
Joined: Tue Oct 18, 2005 6:49 pm

Post 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
User avatar
eduardofreni
Posts: 12
Joined: Sat Aug 26, 2006 12:27 am
Location: Florence (Italy)

Re: PDF From Preview

Post 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
Post Reply