DCPRINT with Microsoft Print To PDF

If you are converting a text-based Clipper application, a FoxPro application or just writing an application from scratch, use this forum for your eXpress++ questions.
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4340
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCPRINT with Microsoft Print To PDF

#11 Post 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
The eXpress train is coming - and it has more cars.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: DCPRINT with Microsoft Print To PDF

#12 Post 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.

Post Reply