Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PDF reports with AmyUni?
Message
From
01/06/2002 22:18:49
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
 
 
To
30/05/2002 15:19:58
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00661566
Message ID:
00663838
Views:
38
Andrus,

The most basic sample is using Tastrade reports, any report
that comes with the Logo like 'Salessum' or 'Topcust' reports.
I just run those reports and they are perfect, but the logo
of the reports hasnt color in the PDF file but it has in the
report preview and when printed.
Also the "T"s of Tasmanian Traders when printed are in Blue,
but in the PDF file they are black.

Apple Color LaserWriter 12/600 shipped with Windows 2K

I just run this code:
REPORT FORM c:\test\salessum.frx NOCONSOLE TO FILE c:\test\salessum.ps
X = "c:\test\salessum.ps"
Y = "c:\test\salessum.pdf"
= frx_ps2pdf(X,Y)

FUNCTION frx_ps2pdf
DECLARE LONG gsapi_init_with_args IN gsdll32.DLL ;
	LONG lngGSInstance, LONG lngArgumentCount, ;
	LONG lngArguments
DECLARE LONG gsapi_exit IN gsdll32.DLL ;
	LONG lngGSInstance

SET PROCEDURE TO clsheap ADDITIVE
= ConvertFile(cFile_in,cFile_out)
RETURN
*-------------------------------------------------------

FUNCTION ConvertFile(tcFileIn, tcFileOut)
DIMENSION  laArgs[11]
laArgs[1] = "ps2pdf" 			&&
laArgs[2] = "-dNOPAUSE"
laArgs[3] = "-dBATCH"
laArgs[4] = "-dSAFER"
laArgs[5] = "-r300"
laArgs[6] = "-sDEVICE=pdfwrite"
laArgs[7] = "-sOutputFile=" + tcFileOut
laArgs[8] = "-c"
laArgs[9] = ".setpdfwrite"
laArgs[10] = "-f"
laArgs[11] = tcFileIn
RETURN CallGS(@laArgs)
*-------------------------------------------------------

FUNCTION CallGS(taArgs)
loHeap = CREATEOBJECT('Heap')	&& class HEAP de ED Raugh
lnGSInstanceHandle = 0
lnCallerHandle = 0
* Load Ghostscript and get the instance handle
lnReturn = gsapi_new_instance(@lnGSInstanceHandle, @lnCallerHandle)
IF (lnReturn < 0)
	loHeap = NULL
	RETURN .F.
ENDIF
lnElementCount = ALEN(taArgs)
lcPtrArgs = ""
FOR lnCounter = 1 TO lnElementCount
	lcPtrArgs = lcPtrArgs + NumToLONG(loHeap.AllocString(taArgs[lnCounter]))
ENDFOR
lnPtr = loHeap.AllocBlob(lcPtrArgs)

lnReturn = gsapi_init_with_args(lnGSInstanceHandle, lnElementCount, lnPtr)

* Stop the Ghostscript interpreter
gsapi_exit (lnGSInstanceHandle)
* release the Ghostscript instance handle'
gsapi_delete_instance (lnGSInstanceHandle)
loHeap = NULL
RETURN lnReturn
ENDFUNC
I dont know why it doesnt create a color PDF file.

Thanks in Advance

Peter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform