replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - FTN95 and Ideal Software's Visual Print Engine (VPE) Library
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTN95 and Ideal Software's Visual Print Engine (VPE) Library

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
aldavhu221



Joined: 13 Apr 2011
Posts: 13

PostPosted: Wed Jul 27, 2011 9:48 pm    Post subject: FTN95 and Ideal Software's Visual Print Engine (VPE) Library Reply with quote

Has anyone experience of using VPE with FTN95?

I can envisage doing it by writing a custom interface of C/C++ routines to match each of the VPE library routines but there must be a simpler way!

The general form taken by VPE routines is:

// Type of VPE Handles
typedef void * VpeHandle;

// Open new document
VpeHandle hdoc = VpeOpenDoc( NULL, "Test", 0 );

// Write text line to document
VpeWriteLine( hdoc, ix, iy, "Some message at specified page coords" );


So the question is: can the VpeHandle hdoc pointer be captured by an initial C_EXTERNAL call from within a FTN95 subroutine in the form

C_EXTERNAL VPEOPEN 'VpeOpenDoc' (REF, OUTSTRING, VAL)

and then text line written with

C_EXTERNAL VPEWRITE 'VpeWriteLine' (REF, VAL, VAL, OUTSTRING)

and, if so, would the REF be a Fortran long integer variable?
Back to top
View user's profile Send private message
aldavhu221



Joined: 13 Apr 2011
Posts: 13

PostPosted: Fri Jul 29, 2011 2:46 am    Post subject: Reply with quote

After a day's trial and error, the following worked:

PROGRAM VPETEST

STDCALL VPEOPENDOC 'VpeOpenDoc' (VAL,INSTRING,VAL) : INTEGER*4
STDCALL VPEWRITEBOX 'VpeWriteBox' (VAL,VAL,VAL,VAL,VAL,INSTRING)
STDCALL VPELINE 'VpeLine' (VAL,VAL,VAL,VAL,VAL)
STDCALL VPEWRITEDOC 'VpeWriteDoc' (VAL,INSTRING)
!
INTEGER*4 HDOC
REAL*8 X1,X2,X3,X4,Y1,Y2,Y3,Y4
DATA X1/1.0D0/,Y1/1.0D0/,X2/5.0D0/,Y2/1.5D0/
DATA X3/1.5D0/,Y3/3.0D0/,X4/5.0D0/,Y4/6.5D0/
!
HDOC = VPEOPENDOC(0,"TEST",0)
CALL VPEWRITEBOX(HDOC,X1,Y1,X2,Y2,"Hello Aldavhu221!")
CALL VPELINE(HDOC,X3,Y3,X4,Y4)
CALL VPEWRITEDOC(HDOC,"Hello_221.pdf")
!
STOP
END

I would be pleased to discuss successes and issues with anyone else combining FTN95 and the Ideal Software Virtual Print Engine which is truly an awesome DLL commercial library, enabling reports to be produced in RTF and PDF formats in the most intrincate detail.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group