itskay007
27th September 2010, 13:27
I'm developing a simple bill generator. For that i have to use HTML to format the output, and generate a pdf file or print a bill.
In the first module, the output goes to a pdf file, formatted using html.
I can use QTextDocument, and then its setHtml() function, but it does not have good looks [older version of css i guess]
i tried to use QWebView, it looked superb [in the pdf file], except that, the logo was not visible. so, <img> is not working.
I searched everywhere for its solution, and tried these:
- use a png file instead of jpg file
- copy/paste the folder imageformats from plugins directory to current directory
- give the absolute path [i gave "file:///home/user/Bill.jpg"]
- set base url [i set "file:///home/user/Bill" as base url]
none of the above solutions worked.
what should i do to get images there?
or is there any alternative to QWebView? or any thing which i can use for printing better quality bills?
In the first module, the output goes to a pdf file, formatted using html.
I can use QTextDocument, and then its setHtml() function, but it does not have good looks [older version of css i guess]
i tried to use QWebView, it looked superb [in the pdf file], except that, the logo was not visible. so, <img> is not working.
I searched everywhere for its solution, and tried these:
- use a png file instead of jpg file
- copy/paste the folder imageformats from plugins directory to current directory
- give the absolute path [i gave "file:///home/user/Bill.jpg"]
- set base url [i set "file:///home/user/Bill" as base url]
none of the above solutions worked.
what should i do to get images there?
or is there any alternative to QWebView? or any thing which i can use for printing better quality bills?