AMYUNI: directly print a pdf-file in powerbuilder

Hello anybody!

I have problems defining and printing with the amyuni print driver (with
CDIntf.DLL) directly to a pdf-file in powerbuilder 7.0.3
Has anyone tried this?
Is it possible to get an example code with the defining of the external
functions, generate a new amyuni-printerdriver, print an PB-datastore,
close the printdriver?

It seems that the definition of the external functions is a little bit
difficult. Running my code results in:
Error: Specified argument type differs from required argument type at
runtime in DLL function getlasterrormsg.
 (invalid stack pointer on return from function call) at line 85 in
function do_print_ws_db of object j_print.

I would be glad getting some hints defining the external
functions/subroutines for the amyuni-functions.

thanks,
Ludwig



The way I tried this (don't use it, it's wrong).....

1) Define local external functions in my NVO-print object for all amyuni
functions (like an API-call)

// Functions from CDIntf to print directly to a PDF-file
Function Long DriverInit (Ref String Printer) LIBRARY "CDIntf"
Function Long PDFDriverInit (Ref String Printer) LIBRARY "CDIntf"
Subroutine DriverEnd (Long hPrinter) LIBRARY "CDIntf"                //
no return value, is Subroutine ok ???????
Function Long SetDefaultDirectory (Long hPrinter, String Directory)
LIBRARY "CDIntf"
Function Long SetDefaultFileName (Long hPrinter, String FileName)
LIBRARY "CDIntf"
Function Long SetFileNameOptions (Long hPrinter, Integer Options)
LIBRARY "CDIntf"
Function Long SetResolution (Long hPrinter, Long Resolution) LIBRARY
"CDIntf"
Function Long GetResolution (Long hPrinter) LIBRARY "CDIntf"
Function Long SetBookmark (Long hDC, Long ParentBM, String Title)
LIBRARY "CDIntf"
Function Long SetDefaultConfig (Long hPrinter) LIBRARY "CDIntf"
Function Long SetDefaultPrinter (Long hPrinter) LIBRARY "CDIntf"
Function Long GetLastErrorMsg (Ref String Msg, Long maxmsg) LIBRARY
"CDIntf" // no return value, I tried subroutine also

2) Methode to print
..........
// Initialise a new pdf-printer with
.....
ll_newPdfPrinter = PDFDriverInit(ls_PrinterName)    // ll_  means local
long type, ls_ local string
if ll_newPdfPrinter = 0 then
    ls_msg = space(1024)
    ll_maxmsg = 1024
    GetLastErrorMsg(ls_msg, ll_maxmsg)
    // write ls_msg into a tracefile ....
    return -1
end if
ll_resolution = 300
SetResolution(ll_newPdfPrinter, ll_resolution)
SetDefaultPrinter(ll_newPdfPrinter)
SetDefaultFileName(ll_newPdfPrinter, ls_prnfile)
//NoPrompt=1, UseFileName=2, Concatenate=4, DisableCompression=8,
EmbedFonts=16, BroadcastMessages=32
li_options = 1+2
SetFileNameOptions(ll_newPdfPrinter, li_options)

ll_prnjob = PrintOpen(ls_prnfile)
PrintDataWindow(ll_prnjob, lds_compdw)    // print one or more
datastores
PrintClose ( ll_prnjob )

DriverEnd(ll_newPdfPrinter)    // close amyuni-printer
// end

0
SIL
1/10/2001 5:02:21 PM
sybase.easerver 11371 articles. 0 followers. Follow

0 Replies
1110 Views

Similar Articles

[PageSpeed] 55

Reply:

Similar Artilces:

Print a pdf file in powerbuilder
Hello How to print a pdf filein powerbuilder? I mean if i have a file call XXX.pdf, how can i coding in the button cb_button, so that the document will print automatically when i click the button cb_button. Thank You Very Much!!! ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp To be able to print to PDF you need to have Adobe Acrobat PDFWriter installed on your machine. To make it easier to implement printing to PDF you can get the printer utility for PB apps from www.powerwhizz.com. They provide you with the source-code that...

how to print a PDF file in PowerBuilder ?
hello: how to print a PDF file in PowerBuilder ? I read online help but I don't get useful messages thanks Gino Lin If you are using powerbuilder 9, you will need to download and install ghostscript. Once you get that install, you should be able to print pdf files. But if you already have Adobe Distiller, you might be able to just print to distiller. try PrintSetup() to setup the distiller printer, then print the datawindow. HTH James "Gino Lin" <jh_802@hotmail.com> wrote in message news:3FA5E586.113733CC@hotmail.com... > hello: &...

how to print a PDF file in PowerBuilder
hello: how to print a PDF file in PowerBuilder ? I read online help but I don't get useful messages thanks Gino Lin Hello, This newsgroup is for Open Client, Open Server and SDK. You might want to post your question to one of the PowerBuilder newsgroups: http://www.sybase.com/detail_list_multi/1,6902,11507,00.html?dynamic_query_yn=N&dropdown_product=1248 Maybe this one would be best: news://forums.sybase.com/sybase.public.powerbuilder.general Gino Lin wrote: > hello: > > how to print a PDF file in PowerBuilder ? > I read online help but ...

Batch printing PDF files from powerbuilder...
Has anyone implemented batch printing of pdf files from powerbuilder. I tried RUN ( acrobat32.exe + /p /o /h + fileargs ) I would like to have adobe open before i issue the shell command as there is some performance improvement, but the problem is after the batch printing process is completed i want to kill adobe. Is there any win32 functions available to kill an application or something. Which is the best way to implement this. Thanks in advance, -Ram Steve, You can use FindWindowA to get a handle to any window that you can specify the title text for. Then use SendMessag...

Print a PDF file in Powerbuilder 5
I need a way to print a pdf file using powerscript in Powerbuilder 5. I tried creating a datastore and doing and insertdocument function call but keep getting a -1 error code. I need help.... Thanks, Tom you would need a PDF print driver (e.g. Acrobat PDFWriter) installed and then print on that to generate PDF. u can also look at printer utility from www.powerwhizz.com that helps u with swicthing printers etc. On 16 Jun 2004 09:54:00 -0700, in sybase.public.powerbuilder.general <Thomas Rundo> wrote: >I need a way to print a pdf file using powerscript ...

Printing to pdf file from the powerbuilder 11
Hi All, I'm new to powerbuilder. I need to print my data window or report window to pdf files. I didn't know how to do. please help me. Printing to pdf file from the powerbuilder 11 application. please advice. Rgds & Thks, Chidambaram Please don't crosspost. I've answered your question in the .datawindow forum. Paul Horan[Sybase] <chithu.palaniappan@gmail.com> wrote in message news:69bfb3e6-69eb-4e76-a6a8-3048db57b6a1@q26g2000prq.googlegroups.com... > Hi All, > > I'm new to powerbuilder. > > I need to print my data...

Printing to pdf file from the powerbuilder 11
Hi All, I'm new to powerbuilder. I need to print my data window or report window to pdf files. I didn't know how to do. please help me. Printing to pdf file from the powerbuilder 11 application. please advice. Rgds & Thks, Chidambaram ...

Printing to pdf file from the powerbuilder 11 #2
Hi All, I'm new to powerbuilder. I need to print my data window data directly to pdf files. I didn't know how to do. please help me. Printing to pdf file from the powerbuilder 11 application. please advice. Rgds & Thks, Chidambaram You posted this same request yesterday - and have responses. See 'objects' Newsgroup post 'Saveas PDF on Client Machine' on 10/16/08 HTH KL > Hi All, > > I'm new to powerbuilder. > > > I need to print my data window data directly to pdf files. > > > I didn'...

Amyuni Print Driver (PDF Converter) usage in EAServer
Hi I'm evaluating the PDF Converter (print driver) product from Amyuni. The product looks great. I've got it working well within a PB component...but not using the multi-threading model. When I convert to the multi-threading model (which is what I require), I consistently get a -1 return code from DW.Print() . All Amyuni function calls return positive responses. I have the multi-threading model working from the PB Sample app (using nearly identical code) I downloaded from Amyuni, so I suspect my problem may relate to configuration. I've placed the following DL...

How to print a .pdf file directly to printer using asp.net ?
Hi Friends, I am developing an application in asp.net. I am generating a PDF File and then I have to send this file directly to printer. Now my problem is how to send this file directly to the client side printer ? This file resides at one of folder of my virtual directory, I can read it but i dont know can I send this file to the printer directly ? Means suppose anyone has opened this application from anywhere, and when he clicks on print button, that file gets generated on one of folder in server and then i have to send it to the printer of that machine fromwhich this applicati...

FF 3.0 Printing to PDF file with generating WPS Object for the PDF File and Growth of obsolete WPS handles
FF 3.0 Printing to PDF file with generating WPS Object for the PDF File and Growth of obsolete WPS handles Every time yout print to WPS and delete the WPS object after processing, you generate an obsolete WPS handle. Hint to Readme to schedule an WPS "Clean Operation" regulary ( e. g. by Checkini tool ) ? Kind Regards Rainer On 02.07.2008 13:20, Rainer Stroebel wrote: > Every time yout print to WPS and delete the WPS object after processing, > you generate an obsolete WPS handle. > > > Hint to Readme to schedule an WPS "Clea...

output crystal report directly to printer, or, printing pdf file in background
does anyone know how to output crystal report directly to printer, or, printing pdf file in background?  Please help me. I use the following code to export the report to a pdf and open the pdf.'This subroutine receives rptName and exports the report to PDF and returns the content type and 'the full report path back to the calling program to open the reportPublic Sub ExportReport(ByVal rptName As String, _ByRef rptPath As String, _ByRef docContentType As String)Dim dfdoRpt As New CrystalDecisions.Shared.DiskFileDestinationOptionsDim refQuoteRpt As New rptQuoteMasterDim exportDi...

Printing TIFF image file to PDF file
Hi We are running a 3-tier application. The application server is Jaguar v3.6.1 Build 36105 What we want is to make a component on the Jaguar that is able to print a TIFF image file to a PDF file through an installed Amyuni PDF Driver. I guess it isn't possible to open the TIFF image in a datawindow and print the datawindow(?). Any help is appreciated. Yours Anders Rodahl >>We are running a 3-tier application. The application server is Jaguar v3.6.1 Build 36105 What we want is to make a component on the Jaguar that is able to print a TIFF image file to a P...

"Print to File" PDF file
As with a prior subject I am trying to print Reports to PDF files, I have seen a number of ways to get rid of the "Print to File" prompt on Win NT but is there anyway to get rid of the "Print to File" prompt under Windows 95 and 98? Ed Powell Check out Bill Green's [TeamSybase] PDFWriter wrapper NVO on SDN (3rd party section). -- pbm_hopethishelps, Roy Kiesler [TeamSybase] Sybase Developer Network (SDN) - http://www.sybase.com/sdn "Ed Powell" <epowell@syntech.com.au> wrote in message news:38B86D4E.456F8469@syntech.com.au... > As ...

Web resources about - AMYUNI: directly print a pdf-file in powerbuilder - sybase.easerver

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
... Win32 or newer style .Net development After several years of work, Sybase is ready to deliver on the final step in its plan to move PowerBuilder ...

Jim O'Neil (@jimoneil) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

The HP Booth Staff (Goons) Owe Me an Apology
... when you might need to use it. For instance, when I was in the WinRunner world there were plugins for driving terminal emulators and powerbuilder ...

Contact Us - Sybase Inc
Thanks for visiting the 主页 section of Sybase.com. Here you will find information about Contact Us. For more information about Business Intelligence, ...

热门搜索 - 我的异常网
... 我的异常网 » 热门搜索 sdpnet2 移动【A111】其它用户原因鉴权失败,是什么意思啊 http:// 192.168.1.102:22578 本网站服务器位于美国,受美国法律保护 MiniUI js 破解 http://192.168.1.103:8080/ powerbuilder ...

Mobile app security: Always keep the back door locked
The best way to keep mobile apps safe is to secure the services they connect to.

10 Tech Skills That Will Instantly Net You A $100,000+ Salary
... that let's developers run Java applications. Java is highly popular language for writing web apps and custom enterprise apps. No. 8: PowerBuilder ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Resources last updated: 12/14/2015 1:12:39 PM