Hi,
I have a qrc resource file which contains some image, htm and pdf file. I'm able to load the images and htm files perfectly without any problem, however whenever I try to load the PDF files(using poppler), I get the following error :
Couldn't open file 'qrc:/file/money.pdf' : Invalid argument "
HOWEVER,
When I open the PDF file from outside the resource, it works flawlessly.
Below is a code snippet of what I'm trying to do :
........
txt = new QWebView(this);
QUrl url
("qrc:/file/00101.htm");
//THE .HTM FILE LOADS FLAWLESSLY txt->load(url);
Poppler::Document *document = Poppler::Document::load("qrc:/file/money.pdf"); // DOESEN'T WORK IF I LOAD FROM RESOURCE
Poppler::Document *document = Poppler::Document::load("C:/Users/el33t/Documents/QT EXPERIMENTS/Pro1/file/money.pdf"); // WORKS FLAWLESSLY IF I LOAD IT EXTERNALLY.
........
txt = new QWebView(this);
QUrl url("qrc:/file/00101.htm"); //THE .HTM FILE LOADS FLAWLESSLY
txt->load(url);
Poppler::Document *document = Poppler::Document::load("qrc:/file/money.pdf"); // DOESEN'T WORK IF I LOAD FROM RESOURCE
Poppler::Document *document = Poppler::Document::load("C:/Users/el33t/Documents/QT EXPERIMENTS/Pro1/file/money.pdf"); // WORKS FLAWLESSLY IF I LOAD IT EXTERNALLY.
To copy to clipboard, switch view to plain text mode
Any help would be greatly appreciated.
Regards,
Bookmarks