On Fri, Mar 20, 2015 at 5:59 PM, Lubomir I. Ivanov <neolit...@gmail.com> wrote: > On 20 March 2015 at 17:06, Gehad Elrobey <gehadelro...@gmail.com> wrote: >> On Fri, Mar 20, 2015 at 2:43 AM, Lubomir I. Ivanov <neolit...@gmail.com> >> wrote: >>> On 18 March 2015 at 23:22, Gehad Elrobey <gehadelro...@gmail.com> wrote: >>>> Hello Lubomir, >>>> >>>> I am attaching a draft of my proposal in pdf format, Please review it. >>>> your feedback is most welcome :) >>> >>> Gehad, your application is very well formed. >>> other students can take this into account when they write their own >>> applications. >>> >>> here are some entry level notes and questions that will emphasize on >>> eventual topics of interest for the *actual* user base. >>> >>>> Pre Existing layouts technical information >>>> ● Supported Paper size : A4 – A5 >>>> ● Supported Quality : 300 dpi >>>> ● Supported Orientation : Portrait >>> >>> we need to extract settings from the QPrinterDialog and from the user >>> configuration QSettings and adjust the CSS ".media" related sections >>> before the pagination. >>> i'm pretty sure this is doable. >>> >> >> My intention was to extract the settings from the QPrintDialog and >> save the user preferences as QSettings, but I think we have to put >> some constraints on the resolution (page size and Dpi ) and the page >> orientation to produce good quality templates that are able to make >> use of the paper area, for sure this constraints can be extended by >> writing additional templates, so I think this constraints are on the >> templates I am planing to develop in the scope of the project only. >> > > i don't think the page size should be hardcoded per template or > constrained (as long as the dimensions don't reach the 32bit integer > cap or something like that). > from my tests if i simply modify the CSS the resulted pages were exact > fit to a certain page size (e.g. A2 ) when printed and the HTML layout > adapted quite well. > the available space for a page in QPrinter is just numbers, you *can* > adapt your layout to fit on it. the current printer implementation > does exactly that. > > say, if the CSS is in a QString after the user has made his picks, we > can search-and-replace certain variables. > for instance like SSRF_PAGE_W, SSRF_PAGE_H, SSRF_MARGIN: > > @page { > size: SSRF_PAGE_W SSRF_PAGE_H; > margin: SSRF_MARGIN; > } > > for A4: > SSRF_PAGE_W becomes "21cm" > SSRF_PAGE_H becomes "29.7cm" > (for landscape the reverse happens.) > SSRF_MARGIN becomes for instance "1cm" > > ...or instead of these variables, we can keep some default values so > that the CSS is not invalid and do some smarter search-and-replace. > only once the CSS is adapted to the user preferences we feed it to the > HTML, load the HTML in QWebView and render it. > > do you see any problems with these ideas? >
No, I ll add this into the proposal, thanks for the clarification. I also wanted to suggest the idea of printing dive photos may be on "glossy paper", I don't know if this use-case may be interesting to someone? -- regards, Gehad _______________________________________________ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface