Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. create a new pdf file with password using QT4.3.2
Qt 6.11 is out! See what's new in the release blog

create a new pdf file with password using QT4.3.2

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • srikanthS Offline
    srikanthS Offline
    srikanth
    wrote on last edited by
    #1

    i want to create a pdf file with password using QT4.3.2 , i created pdf File successfully but i need to create a password to that file am struck here please help me

    my code is

    QTextDocument doc;
    doc.setHtml("<h1>hello, I'm an head</h1>");
    QPrinter printer;
    printer.setOutputFileName("E:\\pdf file\\file.pdf");
    printer.setOutputFormat(QPrinter::PdfFormat);
    doc.print(&printer);
    

    here am creating a pdf file , now i want to create a password to that file
    any help is appreciated , Thanks in advance.

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Not doable with Qt alone. see https://stackoverflow.com/questions/1265327/library-for-password-protecting-pdf-from-copying-editing-and-printing-not-view for ideas

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved