PDF From Preview

PDF From Preview

Postby George » Mon Aug 21, 2006 12:28 pm

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

Regards


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

Postby Detlef Hoefner » Mon Aug 21, 2006 12:56 pm

George,

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

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

Postby George » Mon Aug 21, 2006 1:58 pm

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

Postby Detlef Hoefner » Mon Aug 21, 2006 2:16 pm

Geaorge,

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

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

Postby Manuel Valdenebro » Mon Aug 21, 2006 3:39 pm

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

Postby George » Mon Aug 21, 2006 4:24 pm

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

Postby Manuel Valdenebro » Mon Aug 21, 2006 5:54 pm

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

Postby George » Mon Aug 21, 2006 8:05 pm

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

Postby Antonio Linares » Mon Aug 21, 2006 8:54 pm

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

Postby Manuel Valdenebro » Mon Aug 21, 2006 8:56 pm

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

Postby Enrico Maria Giordano » Mon Aug 21, 2006 9:27 pm

Manuel Valdenebro wrote:http://hyperupload.com/download/02caf68c16/rpreview.prg.html


If I'm not missing something obvious you have a resource leak here:

Code: Select all  Expand view  RUN
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  Expand view  RUN
DeleteDC( oDevice:hDC )
oDevice:hDC := GetPrintDefault( GetActiveWindow() )


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

Postby George » Mon Aug 21, 2006 9:42 pm

Manuel

Thanks. Work perfect!

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

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

Postby George » Mon Aug 21, 2006 10:25 pm

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: 725
Joined: Tue Oct 18, 2005 6:49 pm

Postby George » Mon Aug 21, 2006 11:43 pm

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

Re: PDF From Preview

Postby eduardofreni » Sun Aug 27, 2006 1:41 am

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

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 56 guests