[xwiki-users] Images to large at PDF Export
Hi, We're just verifying XWiki Enterprise as a base to a corporate InfoCenter. Virtual Wikis are really fine to separate global infos from division infos. To make some infos viewable offline we want to use the PDF export function with hierarchical output via macro. The problem seems to be that pictures (.jpg,...) are exported in a big scale - even exports from the site www.xwiki.org create large images. Is it possible to keep the size of pictures "as is" at PDF export - or scale them down to page-width? It would be nice to start each page of the hierarchy tree on a new page... Is the developer team working on any PDF related point? Best regards, Rudolf EISENMANN AG i. A. Rudolf Tronicek Postfach 1252 - 71085 Holzgerlingen Daimlerstraße 5 - 71088 Holzgerlingen Tel.: +49 7031 78 2909 Fax.: +49 7031 78 222909 E-Mail: [email protected] Internet: http://www.eisenmann.de _________________________________________________________________________ Sitz: Böblingen, AG Stuttgart HRB 245891 USt.-IdNr.: DE 145 141 533 Vorstand: Dr. Matthias von Krauland (Sprecher), Dr. Thomas Beck, Günther Dingler Vorsitzender des Aufsichtsrates: Peter Eisenmann Diese E-Mail sowie etwaige Anlagen sind ausschließlich für den Adressaten bestimmt und können vertrauliche oder gesetzlich geschützte Informationen enthalten. Wenn Sie nicht der bestimmungsgemäße Empfänger sind, unterrichten Sie bitte den Absender und vernichten Sie diese Mail. Anderen als dem bestimmungsgemäßen Adressaten ist es untersagt, diese E-Mail zu speichern, weiterzuleiten oder ihren Inhalt, auf welche Weise auch immer, zu verwenden. Wir verwenden aktuelle Virenschutzprogramme. Für Schäden, die dem Empfänger gleichwohl durch von uns zugesandte, mit Viren befallene E-Mails entstehen, schließen wir jede Haftung aus. The information contained in this e-mail or attachments is intended only for its addressee and may contain confidential and/or privileged information. If you have received this e-mail in error, please notify the sender and delete the e-mail. If you are not the intended recipient, you are hereby notified, that saving, distribution or use of the content of this e-mail in any way is prohibited. We use updated virus protection software. We do not accept any responsibility for damages caused anyhow by viruses transmitted via e-mail.
Hi, [email protected] wrote:
Hi,
We're just verifying XWiki Enterprise as a base to a corporate InfoCenter. Virtual Wikis are really fine to separate global infos from division infos.
To make some infos viewable offline we want to use the PDF export function with hierarchical output via macro. The problem seems to be that pictures (.jpg,...) are exported in a big scale - even exports from the site www.xwiki.org create large images. Is it possible to keep the size of pictures "as is" at PDF export - or scale them down to page-width?
Should be done by changing the pdf css. I also noticed this issue, and I think it should be fixed. Later edit: Just tried it, and there are several bugs in Apache FOP. First, max-width does not seem to be implemented ( http://xmlgraphics.apache.org/fop/compliance.html#fo-property-max-width ), second, scale-down-to-fit isn't working either. I looked at the source code, and in the trunk it seems to be implemented, but not on the released versions. So, what can be done, is to create a file called pdf.css in <xwiki_dir>/templates, and put the following content: img { content-width: scale-to-fit; width: 100%; } Now, all the images will have the same width... So not only large images will be scaled down to fit in the page, but smaller images will be scaled up to the same width, too... I'm sorry, but with the curent FOP implementation, that's the best we can get. A workaround is to manually put the large images inside a <div class="largeimagewrapper"> and change the css rule to match only these, like: div.largeimagewrapper img { ... }
It would be nice to start each page of the hierarchy tree on a new page...
A CSS + velocity template issue. Between documents add a <div class="newpagehere"></div>, and in the pdf css add a rule like: div.newpagehere { page-break-after: always; }
Is the developer team working on any PDF related point?
Regarding the planned improvements in the PDF-export area, I am working on adding support for UTF, and we're also planning to add UI for exporting more than one document (children, linked pages, or even a variable list of documents).
Best regards, Rudolf
And season's greetings to you, Sergiu
participants (2)
-
Rudolf.Tronicek@eisenmann.de -
Sergiu Dumitriu