[Okular-devel] Review Request 111554: SVG support for Epubs

Albert Astals Cid aacid at kde.org
Fri Jul 19 09:52:06 UTC 2013



> On July 18, 2013, 2:31 p.m., Albert Astals Cid wrote:
> > generators/epub/converter.cpp, line 220
> > <http://git.reviewboard.kde.org/r/111554/diff/1/?file=171295#file171295line220>
> >
> >     Where does this 718/560 come from?
> 
> Jaydeep Solanki wrote:
>     Width of a page is 600, and as we are having a padding of 20px around a page, it gives 560(600 - 20[left] - 20[right]).
>     Similarly in the case of height, we have a page of size 800 leaving the padding we get 760.
>     A page break is inserted after a page delimiter(PD) is encountered. A PD also takes up some space, so if we just count the paddings & the size of the content then including the PD will exceed a page's size & the second page will contain PD + page break, which makes it a blank page.
>     So, to fit all that in a single page, I made it 718 (800 - 20[top] - 20[bottom] - height of PD).
>     
>     I found the height of PD, with some trial & error.

it'd be cool if we could have some static conts int around for those values.

Also, can you check where that PD value comes from? Maybe it depends on the style you are using and thus we should query it using QStyle?


- Albert


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111554/#review36121
-----------------------------------------------------------


On July 17, 2013, 8:13 p.m., Jaydeep Solanki wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111554/
> -----------------------------------------------------------
> 
> (Updated July 17, 2013, 8:13 p.m.)
> 
> 
> Review request for Okular.
> 
> 
> Description
> -------
> 
> Epubs use the below syntax to load svg images
> 
> <svg>
> <image width="592" height="900" xlink:href="images/cover.svg" />
> </svg>
> 
> I just replace that with <img> tags & add QImage as a resource.
> 
> 
> Diffs
> -----
> 
>   generators/epub/epubdocument.h 714ede6 
>   generators/epub/converter.cpp 74df151 
>   generators/epub/CMakeLists.txt 9442f61 
> 
> Diff: http://git.reviewboard.kde.org/r/111554/diff/
> 
> 
> Testing
> -------
> 
> The below link contains two epub files having svg images as cover.
> https://www.dropbox.com/sh/xcqfwn8khbqac0d/vDRuFRw9vq
> 
> 
> Thanks,
> 
> Jaydeep Solanki
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20130719/9becb644/attachment.html>


More information about the Okular-devel mailing list