Results 1 to 4 of 4

Thread: QT3.3.8 setOutputFileName

  1. #1
    Join Date
    Aug 2011
    Posts
    2
    Qt products
    Qt3
    Platforms
    MacOS X Windows

    Cool QT3.3.8 setOutputFileName

    Hi All,

    I am new to QT and have a Client who wanted to capture their print output to a printer and save it to PDF. Currently using QT3.3.8 and Visual Studio 2005 on a Windows Platform.

    I have used QPrinter::setOutputFileName(pdfFileName.c_str()); to create the PDF. The filename has got a ".pdf" extension and from Documentation I have read should produce a PDF. I have also tried a ".ps" which should give me a Postscript File, but again I get something similar to what I have shown below.

    A File gets created but does not look like a PDF. When investigating the file it looks like a ZIP Archive. I copied it to a MAC and investigated the file there.

    See below:

    mac:test2 $ file *
    test.pdf: Zip archive data, at least v2.0 to extract
    mac:test2 $
    mac:test2 $ unzip test.pdf
    Archive: test.pdf
    inflating: Metadata/Job_PT.xml
    inflating: Metadata/MXDC_Empty_PT.xml
    extracting: Documents/1/Metadata/Page1_Thumbnail.JPG
    inflating: Documents/1/Pages/_rels/1.fpage.rels
    inflating: Documents/1/Pages/1.fpage
    inflating: Documents/1/Resources/Fonts/8D7A9FD8-12FC-43B7-A717-5A04442C2A33.odttf
    inflating: Documents/1/Resources/Fonts/037CA718-DE6A-4195-825B-FDF980D25DB9.odttf
    inflating: Documents/1/Resources/Fonts/74C9641C-5694-46AD-BE0A-E33EFB322F5C.odttf
    inflating: Documents/1/_rels/FixedDocument.fdoc.rels
    inflating: Documents/1/FixedDocument.fdoc
    inflating: _rels/FixedDocumentSequence.fdseq.rels
    inflating: FixedDocumentSequence.fdseq
    inflating: _rels/.rels
    inflating: [Content_Types].xml
    mac:test2 $

    Any ideas on this, it has me stumped. Looks nothing like a PDF File ????

    Would be much appreciated.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT3.3.8 setOutputFileName

    Qt3 doesn't print to pdf by itself. What you got is probably a regular printer job file.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Aug 2011
    Posts
    2
    Qt products
    Qt3
    Platforms
    MacOS X Windows

    Default Re: QT3.3.8 setOutputFileName

    That makes sense, It obviously does not output Postscript either as that is what I tried first...

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT3.3.8 setOutputFileName

    If you install a postscript printer driver then it's likely you'll be able to generate postscript output.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QPrinter setOutputFileName
    By maartenS in forum Qt Programming
    Replies: 2
    Last Post: 17th November 2008, 13:59

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.