Results 1 to 6 of 6

Thread: How to print text file to printer ?

  1. #1
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default How to print text file to printer ?

    Yes, it would be very nice if you could open a PDF file, read it into a "QPDFDocument", display it in a "QPDFView", and then print it, but unfortunately there are no such things yet.

  2. #2
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default How to print text file to printer ?

    Hi all,
    I have written some sample data to a text file. I would like to print the contents of the file to my printer in A4 size. Could anyone please tell me how will the code be in order to do this ?

  3. #3
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to print text file to printer ?

    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  4. The following user says thank you to amleto for this useful post:

    Roonyunlimited (11th July 2012)

  5. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to print text file to printer ?

    @Roonyunlimited: First you dig two long-dead threads out of the past, and then you ask the same question twice within 10 minutes. That's not very polite.

    If you have a *new* question, ask it in a *new* thread, then wait for an answer, at least a day. If no one answers, it is either becuase no one knows the answer or because they are waiting for you to do some very basic research on your own (like reading the Qt docs).

  6. The following user says thank you to d_stranz for this useful post:

    Roonyunlimited (11th July 2012)

  7. #5
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default Re: How to print text file to printer ?

    @d_stranz: Thank you for your reply. I will surely keep your tips in mind. I am new to these kind of stuffs like asking my question in the forum to get answers. I just finished QT console programming. So I am new to QT GUI. I have been referring on how to do programs in QT GUI but the code given in the websites I searched was a bit hard and confusing to understand. That is why I decided to ask this questions to someone who has had experience in QT GUI programming. I apologize if I have offended you in any way.

  8. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to print text file to printer ?

    I have been referring on how to do programs in QT GUI but the code given in the websites I searched was a bit hard and confusing to understand.
    Have you looked at the Qt tutorials, examples, and demos that come with Qt itself? There must be at least 50 demo programs that cover all areas of Qt. Searching random web sites for examples of Qt is not a very good way to learn it.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. How to print pdf file on Printer in windows
    By lekhrajdeshmukh in forum Qt Programming
    Replies: 9
    Last Post: 30th November 2011, 16:36
  2. Replies: 1
    Last Post: 9th November 2009, 09:27
  3. How to Print a doc file (or binary file) to printer
    By rmagro in forum Qt Programming
    Replies: 15
    Last Post: 5th September 2008, 15:46
  4. How to print textDocument on virtual printer?
    By mSergey in forum Qt Programming
    Replies: 8
    Last Post: 17th January 2008, 13:49
  5. Replies: 4
    Last Post: 18th December 2007, 08:31

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.