Nominate our 2022 Qt Champions!

Open Pdf Within Qt application and go to specific page.

  • I have spent couple of days to search my answer but not lucky to get the i need help to all my friends.

    Within my Qt application I'm able to open a PDF using the OS default viewer thru the following code:


    This works fine.but now i want the functionality like if i want to directly go to specific page eg page number 20 so we can directly go to that page.
    So basicly i want a function in my class where we can specify the page number of pdf file and directly jump to that page number.

    thanks for help in advance

  • Lifetime Qt Champion

    I dont think u can as you just tell system,
    "please open what ever application that like this file."

    It also depends on viewer how to go to a page.,

    For Acrobat reader, it takes
    Acrobat /A "page=<pagenum>" %1.pdf

    /A command line to open at a page but for other viewers it will be different.

Log in to reply