Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6655911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:34:44+00:00 2026-05-26T01:34:44+00:00

I am not familiar with PowerBuilder at all. We have a problem in our

  • 0

I am not familiar with PowerBuilder at all. We have a problem in our application that is built in powerBuilder 12.

The application calls a WCF service written in .Net. The service returns path of a document that it downloaded.

Is there a way I can print the document without opening it in PowerBuilder? Once the service returns the path, I need to print the document in the default printer.

Any help greatly appreciated.

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:34:44+00:00Added an answer on May 26, 2026 at 1:34 am

    You can hook up one of the standard Windows API calls ShellExecute

     Function long ShellExecute( long hwnd,  string lpOperation, string lpFile, string                  
              lpParameters,  string lpDirectory,  integer nShowCmd ) Library "shell32.dll"   
              alias for "ShellExecuteW"
    

    Once you have done this, you can send your path/file to this function and tell it to print, like so:

     integer        li_return_code
     string     ls_null
     long       ll_null
    
     SetNull(ls_null)
     SetNull(ll_null)
    
     li_return_code = ShellExecute(ll_null, "print", "C:\File.pdf", ls_null, ls_null, 0)
    

    The return code can be a number of values, but anything greater than 32 means success. Lower values dictate an error, which you can get descriptions for off of MSDN.

    One of the ‘pre-reqs’, if you will, is that you will have to have the proper application installed and registered for the file extension of the file you’re passing in for this to work.

    And, just FYI, we seem to always have problems with “.txt” files. They never work through this call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am not familiar at all with using WPF and the application that I
I am not familiar with dojo. I have this application I am using that
I'm not familiar with ADO.NET Data Services but it looks usable. All I need
I kind of not familiar with all that JS stuff and everything but today
I 'm not familiar with C#.NET at all. I need to convert this to
I'm not familiar with Capistrano at all, I've just read some basic posts about
I'm not familiar at all with JQuery and I'm not very good with CSS,
I'm not familiar with bitwise operators, but I have seem them used to store
I am not familiar at all with connection pooling library. I've just discovered it
I am not familiar with javascript and I have had some exposure to java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.