Results 1 to 3 of 3

Thread: Editing existing PDF file

  1. #1
    Join Date
    Mar 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Editing existing PDF file

    Hello fellow Qt programmers

    I got the task of developing a small program logging program. One of the requirements is to print the result to a PDF file.

    My idea is to have an existing PDF made like a form and use Qt to insert the different values at the appropriate places.

    I have tried to use QPdfWriter but it deletes the existing form using this example:
    http://www.codeprogress.com/cpp/libr...erColoredTexts

    Any ideas how to make it work or alternatively, another approach?

    Kind regards
    Sebastian Aslund

  2. #2
    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: Editing existing PDF file

    I have tried to use QPdfWriter but it deletes the existing form using this example
    Well, yes, of course it replaces the original file (if it exists) because that's what the code in the example has been told to do.

    There is no built-in Qt support for reading and modifying PDF files. If you are working on a linux platform, you might be able to use a library like Poppler.

  3. #3
    Join Date
    Jun 2018
    Location
    Asheboro, NC
    Posts
    2
    Qt products
    Qt/Embedded PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: Editing existing PDF file

    Quite a necro, but this thread is still pretty popular, so I think it would be nice to explain things here some more. Speaking of QPDFWriter, the point of the tool is to write data in the PDF extension but nothing more than this. It means that it could write your values as a different file but not layer. For such purposes, you need an editor, like this one for example https://boston-real-estate-board-form.pdffiller.com/ not just a simple writer. Have no clue if Qt has something similar with this feature, but doubting that, it would be way more complicated piece of code

Similar Threads

  1. Qt Creator open existing .pro file
    By check_in in forum Qt Tools
    Replies: 0
    Last Post: 21st October 2012, 21:11
  2. How to display an existing pdf file
    By newbie43 in forum Qt Programming
    Replies: 3
    Last Post: 4th February 2011, 17:11
  3. Replies: 3
    Last Post: 3rd August 2010, 14:12
  4. How to save an existing file
    By rk0747 in forum Qt Programming
    Replies: 1
    Last Post: 27th February 2010, 11:11
  5. printing a(n existing) file in Qt
    By caduel in forum Qt Programming
    Replies: 3
    Last Post: 21st July 2008, 08:20

Tags for this Thread

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.