Dear all,

this issue is really a showstopper for us.
What I did now was adding two hacks to PdfExportImpl.java:

1) Remove call to JTidy in convertToStrictXHtml() and instead just
do a trim() on the html string.

2) Do not apply the user CSS rules if there are none (i.e. don't call
applyCSS() if css equals "")

No I have somewhat better output. On the other hand, now the
generation of the table of contents doesn't seem to work anymore.
Strange.

Is there any chance that someone from the XWiki team will
investigate the issue any time soon? Otherwise we'll try to stick
to my current solution (not really satisfactory, but at least partially
does what we need). ;-)

Kind regars,
Alex


Alexander Pokahr schrieb:
> Hi Tomas, all,
>
> debugging XWiki in eclipse, I found at least part of the problem:
> In PdfExportImpl.convertToStrictXHtml() the page is converted
> to strict xhtml using jtidy. Unfortunately, jtidy also imposes its own
> indentation on the document, which effectively breaks any <pre>
> environment like the one generated by the code macro.
>
> I haven't used jtidy. Can it be configured to keep the original
> indentation and whitespaces of an input document?
>
> Cheers,
> Alex
>
>
> Thomas Mortagne schrieb:
>   
>> On Fri, Jun 11, 2010 at 17:22, Alexander Pokahr
>> <pok...@informatik.uni-hamburg.de> wrote:
>>   
>>     
>>> Dear Thomas,
>>>
>>> thanks for your quick reply.
>>> I tried following the instructions at:
>>> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HCustomizingthePDFexportLook26Feel
>>>
>>> I even tried with very simple css snippets such as:
>>> h1
>>> {
>>>   color: blue;
>>> }
>>> but it doesn't seem to have any effect on the PDF output.
>>>     
>>>       
>> Actually maybe the issue you have is related to
>> http://jira.xwiki.org/jira/browse/XWIKI-4869
>>
>>   
>>     
>>> BTW, i was wondering why there is no pdf.css in my XWiki
>>> installation. I'm using XWiki Enterprise 2.1.1.
>>>     
>>>       
>> I could not say sorry, i can't find it either in the latest versions.
>> I guess the default css are somewhere else or maybe there is none by
>> default.
>>
>>   
>>     
>>> I have looked in the release notes to check that the PDF export
>>> hasn't changed in newer versions, right?
>>>
>>> Any ideas how I could debug this issue? Are the intermediary files
>>> during generation available somewhere?
>>>     
>>>       
>> I don't think so. You would have to run XWiki in debug mode in Eclipse
>> or something.
>>
>>   
>>     
>>> Cheers,
>>> Alex
>>>
>>>
>>> On 11.06.2010 15:21, Thomas Mortagne wrote:
>>>     
>>>       
>>>> On Fri, Jun 11, 2010 at 14:50, Alexander Pokahr
>>>> <pok...@informatik.uni-hamburg.de>  wrote:
>>>>
>>>>       
>>>>         
>>>>> Dear all,
>>>>>
>>>>> we are using XWiki for the project websites and online
>>>>> documentation of our open source projects and are
>>>>> (almost) very happy with it.
>>>>>
>>>>> For releasing distributions and for easy printing of multi-page
>>>>> documents, we would like to use the PDF export facility
>>>>> of XWiki. The problem is that the {code} snippets used
>>>>> often in our documentation are nearly unreadable in PDF.
>>>>>
>>>>> Here is an example (web page and PDF export):
>>>>> http://jadex-agents.informatik.uni-hamburg.de/xwiki/bin/view/Standalone+Platform+Guide/01+Introduction
>>>>> http://jadex-agents.informatik.uni-hamburg.de/xwiki/bin/export/Standalone+Platform+Guide/01+Introduction?format=pdf
>>>>>
>>>>> We browsed the documentation, but found it a little bit confusing.
>>>>> Can anyone please point us in the right direction for solving
>>>>> this issue or (even better) suggest a fix?
>>>>>
>>>>>         
>>>>>           
>>>> The display of code macro is controlled by a css class, maybe it's
>>>> missing in the css used with PDF export or it's not supported by PDF
>>>> export.
>>>>
>>>>
>>>>       
>>>>         
>>>>> Kind regards and thanks in advance,
>>>>> Lars
>>>>> Alex
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> users mailing list
>>>>> users@xwiki.org
>>>>> http://lists.xwiki.org/mailman/listinfo/users
>>>>>
>>>>>
>>>>>         
>>>>>           
>>>>       
>>>>         
>>> _______________________________________________
>>> users mailing list
>>> users@xwiki.org
>>> http://lists.xwiki.org/mailman/listinfo/users
>>>
>>>     
>>>       
>>
>>   
>>     
>
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>   

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to