Page 2 of 2

Re: DCPRINT with Microsoft Print To PDF

Posted: Thu Apr 13, 2017 6:46 am
by rdonnay
Here is a new _DCPRC.PRG.
Copy it to your \exp20\source\dclipx folder and run BUILD19_SL1.BAT or BUILD20.BAT to rebuild DCLIPX.DLL.

This now supports the Microsoft Print to PDF driver as the ACROBAT previewer.
Run this sample program:

Code: Select all

#INCLUDE "dcdialog.CH"
#INCLUDE "dcprint.CH"

FUNCTION Main()

LOCAL oPrinter, i, aOptions

aOptions := { 0, nil, '5', nil, nil, .f., 'Microsoft Print to PDF', 3, nil, .F., .F. }

DC_PrintPreviewAcrobatOpt( aOptions )

DCPRINT ON ACROBAT TO oPrinter ;

IF oPrinter = NIL .OR. !oPrinter:lActive
  RETURN .f.
ENDIF

FOR i := 1 TO 50
   @ i,10 DCPRINT SAY 'This is line ' + Alltrim(Str(i))
NEXT

DCPRINT OFF

RETURN nil

* ----------

PROC appsys ; RETURN

Re: DCPRINT with Microsoft Print To PDF

Posted: Thu Apr 13, 2017 7:41 am
by Cliff Wiernik
I did not either, but after looking at the c# code (I know very little about it currently) it appears to be using the c# equivalent functionality of xbpPrinter. So I gave it a try and it appears to work.