frank100
24th February 2011, 11:20
I want my application to open a PDF file. Something like this:
QDesktopServices::openUrl(QUrl("file:///C:/Data/help.pdf", QUrl::TolerantMode));
My problem is when I want to open the file at an specific location which should work like this:
QDesktopServices::openUrl(QUrl("file:///C:/Data/help.pdf#page=23", QUrl::TolerantMode));
However the above line will only work if I type the URL within a browser (safari, firefox, iexplorer...) but not from Qt, neither from rundll.exe
Which one is the best and most portable way? I do not want to look for Acrobat myself for launching a detached process with the right parameters
thanks in advance!
QDesktopServices::openUrl(QUrl("file:///C:/Data/help.pdf", QUrl::TolerantMode));
My problem is when I want to open the file at an specific location which should work like this:
QDesktopServices::openUrl(QUrl("file:///C:/Data/help.pdf#page=23", QUrl::TolerantMode));
However the above line will only work if I type the URL within a browser (safari, firefox, iexplorer...) but not from Qt, neither from rundll.exe
Which one is the best and most portable way? I do not want to look for Acrobat myself for launching a detached process with the right parameters
thanks in advance!