> On 24 Mar 2018, at 21:58, Paul Libbrecht <p...@hoplahup.net> wrote:
> 
> Hello Mohammed,
> 
> have you googled for paged-media html to css converters?
> 
> Surely an option is to let it be done by the browser but there must also be 
> engines.

We have evaluated this in the past and there are lots of limitations, see 
https://markmail.org/message/ztcwibiuoqfjcnjo

> E.g. I think that phantomJS of weasyprint can do that. However, I haven’t 
> found yet in java (which would simplify things).

Note that phantomjs is dead now:
https://www.puzzle.ch/blog/articles/2018/02/12/phantomjs-is-dead-long-live-headless-browsers

> As Vincent says, print with LaTeX in the middle is a way to get high-quality 
> but there are many losses too: it is really hard to get CSS rules to be all 
> implemented in TeX.

Yes indeed, that’s very hard. CSS shouldn’t be used as a way to style the LaTeX 
output. The LaTeX exporter itself should provide its own way of controlling the 
style of the output. This is what I do in the LaTeX exporter. Basically I 
provide some default styles (sometimes with some config options) and the user 
has the ability to control exactly the styles he/she wants applied if the 
default style is not enough. It’s not trivial though and will take a bit of 
time if you need a heavily styled document.

Thanks
-Vincent

> 
> I’m wondering if CSSbox could do the job.
> 
> paul
> 
> On 24 Mar 2018, at 20:51, Mohamed Ashraf wrote:
> 
>> Yes this is part of GSOC project
>> 
>> Sent from my iPhone
>> 
>>> On Mar 24, 2018, at 9:29 PM, Vincent Massol <vinc...@massol.net> wrote:
>>> 
>>> Hi Mohamed,
>>> 
>>>> On 24 Mar 2018, at 19:12, Mohamed Ashraf <mory...@gmail.com> wrote:
>>>> 
>>>> Currently, the PDF export of XWiki is implemented based on XSL-FO and
>>>> transformation of XHTML to FO. This poses a couple of problems, mainly
>>>> related to the current level of support of FO from libraries implementing
>>>> FO to PDF transformation, as well as the limitations of automatized
>>>> transformation of XHTML to FO. The problems are mainly related to styling
>>>> limitations, auto-layouting, etc.
>>>> 
>>>> The idea is to try to replace this with a pure XHTML & CSS (paged CSS)
>>>> export, using an open source library for producing PDFs out of this
>>>> ,
>>> 
>>> Sure, but which one?
>>> 
>>> The only alternative I know is flying saucer (which is dead: 
>>> https://github.com/flyingsaucerproject/flyingsaucer). Is that what you mean?
>>> 
>>> Do you know a maintained fork of it? One that I know is used by a competing 
>>> wiki: https://bitbucket.org/atlassian/xhtmlrenderer-atlassian
>>> 
>>> Are you doing this as part of this GSOC project: 
>>> http://dev.xwiki.org/xwiki/bin/view/GoogleSummerOfCode/ImplementPDFexportwithXHTMLpagedCSS
>>>  ?
>>> 
>>> Thanks
>>> -Vincent
>>> 
>>>> and I will see LaTeX ,
>>>> thanks
>>>> 
>>>> 2018-03-24 19:52 GMT+02:00 Vincent Massol <vinc...@massol.net>:
>>>> 
>>>>> Hi Mohamed,
>>>>> 
>>>>>> On 24 Mar 2018, at 18:44, Mohamed Ashraf <mory...@gmail.com> wrote:
>>>>>> 
>>>>>> If we should replacing the XSL-FO which we use to export PDF file out of
>>>>>> XML,
>>>>>> with XML and CSS only with open-source library ,
>>>>>> 
>>>>>> and I think  * ”CSS Paged Media “ *
>>>>>> 
>>>>>> is this good enough to do that ,
>>>>>> or there are any suggestion
>>>>> 
>>>>> Sorry but I don’t understand your question. Why would you want toi replace
>>>>> XSL-FO in your XWiki install?
>>>>> 
>>>>> If you’d like to contribute to XWiki dev, then could you provide more
>>>>> context and explain why you want to replace XSL-FO and by what.
>>>>> 
>>>>> You may also be interested by the LaTeX exporter which can be used to
>>>>> generate PDFs: http://extensions.xwiki.org/xwiki/bin/view/Extension/LaTeX/
>>>>> 
>>>>> Thanks
>>>>> -Vincent
>>>>> 
>>>>> 
>>>>> 
>>> 

Reply via email to