Page 1 of 1

I need a PDF to attach to an email but without the user seeing the preview

Posted: Thu Mar 03, 2022 4:21 pm
by Diego Euri Almanzar
aOptions := { 0, NIL , '5', nil, nil, .f., 'Microsoft Print to PDF', 3, nil, .F., .F. }
DC_PrintPreviewAcrobatOpt( aOptions )
TMPpdf := "C:\APPWX\ALLPDF\"+alltrim(bcpimpor)+".PDF"
//
IF FILE(TMPpdf)
DELETE FILE (TMPpdf)
ENDIF

DCPRINT ON ACROBAT TO oPrinter TOFILE OUTFILE (TMPpdf)

I am very satisfied, I liked it a lot, how well these sentences work. But sometimes I want to prevent the user from looking at the result. Since on some occasions, I only want the PDF to send it by email. How do I avoid the preview, how do I hide it?

Best regards

Re: I need a PDF to attach to an email but without the user seeing the preview

Posted: Fri Mar 04, 2022 12:01 am
by Wolfgang Ciriack
Use the "Microsoft Print to PDF" printer without the ACROBAT option.

DCPRINT ON NAME "Microsoft Print to PDF" TOFILE OUTFILE (TmpPDF) TO oPrinter

Re: I need a PDF to attach to an email but without the user seeing the preview

Posted: Thu Mar 10, 2022 1:10 am
by Diego Euri Almanzar
Wolfgang,

thanks to your collaboration or recommendation, you can do the job. Everything was excellent.

Best regards.