Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foxypreviewer printed reports and pdf are different
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
01671639
Message ID:
01671717
Vues:
58
Hi Thomas, my point is to understand if in basic mode the report works fine. So change the preview for this:
DO FOXYPREVIEWER.APP
cOutputfile  = "pathofthefile.PDF"
Report Form (oReport.vesrfaktur) OBJECT TYPE 10 TO FILE (cOutputfile )
>Hi John, thanks für your advice, this is how I started, but in this case I need direct printing and pdf generation.

Best regards

Thomas

>>>
Give it a try to the default behavior of the foxypreviewer and take notes from there:
DO FOXYPREVIEWER.APP
_Screen.oFoxyPreviewer.cLanguage = "GERMAN"
_screen.Visible= .T.
ccom="REPORT FORM "+oReport.vesrfaktur+" PREVIEW"
&ccom
From the preview window, generate the pdf several times and verify what happens. If everything goes right, check this default behavior compared with your customization. If still you get the same problem, check using a different default printer than the "cFDruck4"

John.

>>>
>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
John Harold Belalcázar Lozano
Associate Director Of Development
http://www.belvicto.co/
jhbelalc@gmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform