locked
Some questions about print in Windows Store App.

    Question

  • Dear all,

     

    I have some questions about printing in Windows Store App:

    1. Is it possible to print silently?

        I think it is impossible. There has been a discussion from stackoverflow. But it is for Win8. Would anyone help to confirm this in Win8.1 Update 1?

    2. Is it possible to change the default printer in code?

    3. Is there any way to get the printing parameters of the default print that it is using?

     

    Thank you all.

    • Edited by B0L Wednesday, July 2, 2014 8:26 AM
    Tuesday, July 1, 2014 2:08 PM

Answers

  • You substantially altered your original post - please don't do that in the future. The response I initially gave you makes no sense now.

    The StackOverflow post is correct - you cannot print silently, you can't change the default printer from Windows Store apps, and I don't know if you can get the default properties of the printer.  Why do you need to do any of this?


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by B0L Friday, July 4, 2014 5:24 AM
    Wednesday, July 2, 2014 12:10 PM
    Moderator

All replies

  • If you have the stream, you can write it to a textfile... is there part of this question I am missing?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, July 1, 2014 7:04 PM
    Moderator
  • Hi, Matt, thank you very much. I've updated my original question. Would you please have a look at it?
    Wednesday, July 2, 2014 4:51 AM
  • You substantially altered your original post - please don't do that in the future. The response I initially gave you makes no sense now.

    The StackOverflow post is correct - you cannot print silently, you can't change the default printer from Windows Store apps, and I don't know if you can get the default properties of the printer.  Why do you need to do any of this?


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by B0L Friday, July 4, 2014 5:24 AM
    Wednesday, July 2, 2014 12:10 PM
    Moderator
  • Hi, Matt, thanks for the reminder!

    There is a (potential) requirement that the remote server would print its local files (such as a text file) to a PDF one based on our client's default printer configurations. Any suggestion or hint? Thanks.


    • Edited by B0L Wednesday, July 2, 2014 2:03 PM
    Wednesday, July 2, 2014 2:02 PM
  • This seems more like a general Windows printing issue.  How do Store APIs come into play? Is this a Store-submitted app, or an LOB?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, July 2, 2014 2:08 PM
    Moderator
  • Hi, Matt, it is a store app, and hasn't been submitted.

    So there is no way to do that in an Store App? Thanks.

    Wednesday, July 2, 2014 2:18 PM
  • I'm still confused here.  How exactly do you envision this working?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, July 2, 2014 2:21 PM
    Moderator
  • Hi, Matt, our scenario is: given that the client and the server installed the same printer but the printer configuration on the client side might be different from the one on the server. If there is a requirement that the server should print some document based on the print configuration of the client (of course the server side could modify its printer configurations, and the client has a communication mechanism to transfer the config to the server side).

    Have I make myself understood? Thanks for the patience...Matt

    Wednesday, July 2, 2014 2:29 PM
  • I think your best bet is to have a "Server Printer" settings that your app would save and send to the server when the client wants to send a print job.  Of course, if the client is sending a print job, and both the client and the server have the same printer installed, why wouldn't the client just send it to his own printer?

    I am confused as well about why this would be a Store-submitted app.  It certainly does not sound like one, especially with a printer that is accessible by both the client and a server.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, July 2, 2014 2:53 PM
    Moderator
  • Hi, Matt, thanks for the suggestion. Yeah, the "Server Printer" setting is really a good one.

    1. It is possible that the client and the server installed the same type of printer (virtual or physical). "Microsoft XPS Document Writer" is a good example. Another example is some public or internal virtual printers, such as the PDF printer. They could share the same settings.

    2. We assume that the server has the ability to process more types of documents into PDF format than the client, thus comes the idea to send the setting to the server.

    3. Would you please explain a little more about the "Store-submitted app" here and why my idea is not suitable?

    Thank you very much!


    • Edited by B0L Thursday, July 3, 2014 2:02 AM
    Wednesday, July 2, 2014 9:29 PM
  • I just don't know enough about your app to say if this is a good idea or not.  I still don't have any idea how/why you would get a remote server to connect to the same printer that the client does in the case that the app is submitted and is purchased by random people around the internet. 

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, July 3, 2014 3:25 PM
    Moderator
  • Hi, Matt, thank you very much. I will refine the requirement later and post another thread when necessary. Thanks for your suggestions and comments to my questions.
    • Edited by B0L Friday, July 4, 2014 5:24 AM
    Friday, July 4, 2014 5:24 AM