Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxypreviewer printed reports and pdf are different
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
01671639
Message ID:
01671716
Views:
55
Hi Koen,

thanks a lot, i will try it.

Best regards

Thomas

Hi Thomas
I would not use the Helper, but use FoxyPreviewer as an object.
Check the Help/information pages : https://archive.codeplex.com/?p=foxypreviewer
Regards,
Koen
>Hi there,
>
>I am using the foxypreviewer app to print invoices and also save them as pdf.
>But when it comes to printing the pdf of a needed "reprint", the output is slightly different and does not fit the used format for paper for invoices. Fonts seem to be slightly smallerm blank lines are not the same size as on the report.
>
>This is how I print the report
>
>
>dofoxyrep(oReport.vesrfaktur,.T.,.F.,cFDruck4)
>IF i = 1
>   dopdf(oReport.vesrfaktur,pnRGNummer,"RG")
>Endif   
>
>FUNCTION dofoxyrep
>LPARAMETERS cReportname, lDirect, lListener, cPrinter
>LOCAL loReport AS "PreviewHelper" OF "FoxyPreviewer.App" 
>loReport = CREATEOBJECT("PreviewHelper") 
>loReport.AddReport(cReportname) &&' FRX File, Clauses 
>loReport.lUseListener = lListener
>loReport.lDirectPRINT = lDirect
>loreport.nButtonsize = 1
>IF LEN(ALLTRIM(cPrinter)) > 0
>   loReport.cPrintername = ALLTRIM(cPrinter)
>Endif
>loReport.RunReport() 
>loReport = Null
>Endfunc
>
>Function dopdf
>LPARAMETERS cReportname, nNummer, cMode
>cMode = cMode + "_"
>cPDFName = oPfade.cAltReportpath + cMode + PADL(nNummer,10,"0") + ".pdf"
>lret = pdf2save(cPDFName,cReportname)
>IF ! lRet
>   MESSAGEBOX("Fehler beim Erstellen des PDF!",48,cProgtitle)
>ENDIF
>RETURN (lRet)
>Endfunc
>
>FUNCTION pdf2save
>LPARAMETERS cOutputfile,cReportname
>LOCAL loReport as "PreviewHelper" OF "FoxyPreviewer.App" 
>loReport = CREATEOBJECT("PreviewHelper") 
>WITH loReport as ReportHelper 
>    .lpdfembedfonts = .T.
>    .AddReport((cReportname), "NODIALOG") 
>    .cDestFile = cOutputfile  &&' Use to create an output without previewing
>    .RunReport() 
>ENDWITH 
>loReport = NULL 
>Endfunc
>
>
>Can anyone tell me, if and what I might do wrong?
>
>Best regards
>
>Thomas
Previous
Reply
Map
View

Click here to load this message in the networking platform