Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PDF reports with AmyUni?
Message
 
To
01/06/2002 22:18:49
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00661566
Message ID:
00663977
Views:
36
I use a similar funciton to create pdf files, and found that I need to go into the control pnl - printers, go to the propertites page, select printing prefrences, - papaer quality, and select color output. then of course apply, and ok.

I know know windows scripting well enough to handle this anymore automatic way, but you do need to define the postscript printer, to send the output as color- When they are installed, even thow its a color printer, the default of the prefrences are set to black and white.

I use the adobe generic ps driver, and set the printer to be a
HP Color LaserJet 8500 PS 8500.


Bob Lee

>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
In the beginning, there was a command prompt, and all was well.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform