Re: Mismatch between PDF and DOCx generation
Hussein Shafie <[email protected]> Tue, 29 May 2018 10:15:38 +0200
| Newsgroups | gmane.text.xml.xfc.general |
|---|---|
| Message-ID | <[email protected]> |
On 05/28/2018 04:37 PM, Tim Butterworth wrote: > Hi, I wonder if you can help - I am pulling my hair out! > > So : I have attached three files: > > - an XSL file > - a resulting pdf file (generated on xsl-server running on linux) > - a resulting docx file (also generated on ssl-server running on linux) > > On the pdf file, you will see that the background/watermark images defined in the three page masters and the front cover images/overlaid logo on the output document are all rendering fine). > > But on the docx version there is no sign of the watermark images nor the front cover image nor the logo. > > So pdf is doing what I want; docx is just not including the images at all - although OTHER image elsewhere in the document are being produced fine. > > Can you shed any light as to why? > It's very difficult to help you as you have sent us a ".xsl" file and not a ".fo" file as explained here: "Writing a usable bug report", http://www.xmlmind.com/foconverter/support_policy.html#bug_report Anyway, in order to show you our good will, we very roughly simplified your "def_quotation.xsl" to obtain attached "quotation.fo". The result of the conversion quotation.docx has its "map-contours.gif" watermark image. See attached "quotation.docx". I used XMLmind XSL-FO Converter v5.5 to generate "quotation.docx" with Java 7, 8, 9 or 10. --- fo2docx quotation.fo quotation.docx --- I used MS-Word 2013 (NOT Pages, OpenOffice, LibreOffice, etc) to open "quotation.docx". It definitely does not work with Java 6 (due to a Java bug, which is not specific to our product): --- warning: failed to load image "https://mnlive.eecsoftware.com/clientlibrary/magneticnorth/ImageLibrary/map-contours.gif": java.lang.RuntimeException: Could not generate DH keypair (file:/home/hussein/tmp/quotation.fo, line #12, column #27) ... warning: failed to load image "https://mnlive.eecsoftware.com/clientlibrary/magneticnorth/ImageLibrary/QAEmblemIT2018.png": java.lang.RuntimeException: Could not generate DH keypair (file:/home/hussein/tmp/quotation.fo, line #99, column #225) --- but I don't think this is relevant as you are unlikely to use Java 6 or older. We are sorry but we cannot reproduce your issue here at XMLmind. We suggest that you closely look at the error messages reported by XMLmind XSL-FO Converter during the conversion. These error messages should help you solve this issue which seems specific to your working environment. -- XMLmind FO Converter Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xfc-support
quotation.fo
(text/x-xslfo, 12.7 KB)
<?xml version="1.0" encoding="UTF-8" ?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="frontcover">
<fo:region-body
margin-left="0.001cm"
margin-right="0.001cm"
background-image="url(https://mnlive.eecsoftware.com/clientlibrary/magneticnorth/ImageLibrary/map-contours.gif)"
background-position="center"
background-repeat="repeat"
margin-bottom="0.001cm" margin-top="0.001cm"
/>
</fo:simple-page-master>
<fo:simple-page-master master-name="my-page">
<fo:region-body margin-top="0.001cm" margin-bottom="0.001cm" margin-left="0.001cm"
margin-right="0.001cm" padding-bottom="1.5cm" padding-top="1.5cm"
background-image="url(https://mnlive.eecsoftware.com/clientlibrary/magneticnorth/ImageLibrary/map-contours.gif)"
background-position="center"
background-repeat="repeat"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="info-page">
<fo:region-body margin-top="1cm" margin-bottom="1cm" margin-left="1cm" border="1px solid"
margin-right="1cm" padding-left="0.5cm" padding-right="0.5cm" padding-top="1cm" padding-bottom="1cm"
background-image="url(https://mnlive.eecsoftware.com/clientlibrary/magneticnorth/ImageLibrary/map-contours.gif)"
background-position="center"
background-repeat="repeat"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="info-page">
<fo:flow flow-name="xsl-region-body" font-size="10pt" margin-left="1cm" margin-right="1cm" margin-top="1cm" font-family="Trebuchet">
<fo:block-container border="1px solid" padding="0.6cm">
<fo:block text-align="center" font-weight="bold" margin-bottom="0.8cm" color="red">Why book with Magnetic North Travel</fo:block>
<fo:block margin-bottom="0.2cm" >
There's a reason why travelers book their holidays with destination specialists like ourselves. Ever since our founder
spent her honeymoon in Scandinavia, she knew that the region had endless possibilities for adventure, wilderness, and
encounters - both of the human and wildlife kind.
</fo:block>
<fo:block margin-bottom="0.2cm" >
Here at Magnetic North Travel we're continually searching for the best experiences throughout
the Nordic countries and Canada, trying many of them ourselves so we can offer you real, first hand advice.
This love for a region will never be diluted by yet more destinations- only deepeend and updated every day
by our team.
</fo:block>
<fo:block margin-bottom="0.2cm" >
Your holiday starts with a conversation so we can listen to your dreams and design a holiday
to match those dreams. Think of us as your inspiration, planners and back up.
</fo:block>
<fo:block>
<fo:external-graphic margin-left="0.4cm"
src="url(https://mnlive.eecsoftware.com/clientlibrary/magneticnorth/ImageLibrary/Why%20Book%20With%20Us.jpg)" content-width="16cm" />
</fo:block>
<fo:block>
<fo:table margin-top="0.2cm">
<fo:table-column column-width="60mm"/>
<fo:table-column column-width="120mm"/>
<fo:table-body>
<fo:table-row font-family="Trebuchet" font-size="10pt" padding-bottom="0.3cm" >
<fo:table-cell margin-left="0.1cm" padding-right="0.8cm" >
<fo:block text-align="center" margin-bottom="0.5cm">
<fo:external-graphic margin-left="0.4cm" margin-top="0.4cm" src="url(https://mnlive.eecsoftware.com/clientlibrary/magneticnorth/ImageLibrary/IATA%20logo.gif)" content-width="3cm" />
</fo:block>
</fo:table-cell>
<fo:table-cell margin-left="0.2cm" padding-right="0.8cm">
<fo:block margin-left="0.3cm" margin-top="0.8cm">
Magnetic North Travel Ltd is an IATA-accredited agent (IATA code: 9128652)
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row font-family="Trebuchet" font-size="10pt" padding-bottom="0.3cm">
<fo:table-cell margin-left="0.1cm" padding-right="0.8cm" >
<fo:block text-align="center" margin-bottom="0.5cm">
<fo:external-graphic margin-left="0.4cm" margin-top="0.4cm" src="url(https://mnlive.eecsoftware.com/clientlibrary/magneticnorth/ImageLibrary/ATOL.png)" content-width="3cm"/>
</fo:block>
</fo:table-cell>
<fo:table-cell margin-left="0.2cm" padding-right="0.8cm">
<fo:block margin-left="0.3cm" margin-top="0.3cm">
Flight inclusive holidays are protected by ATOL (UK customers only). Our license number is 10706. When you buy an ATOL protected flight or flight inclusive holiday from us you will receive an ATOL Certificate. This lists what is financially protected, where you can get information on what this means for you and who to contact if things go wrong.
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row font-family="Trebuchet" font-size="10pt" padding-bottom="0.3cm">
<fo:table-cell margin-left="0.1cm" padding-right="0.8cm" >
<fo:block text-align="center" margin-bottom="0.5cm">
<fo:external-graphic margin-left="0.4cm" margin-top="0.3cm" src="url(https://mnlive.eecsoftware.com/clientlibrary/magneticnorth/ImageLibrary/QAEmblemIT2018.png)" content-width="3cm" />
</fo:block>
</fo:table-cell>
<fo:table-cell margin-left="0.2cm" padding-right="0.8cm">
<fo:block margin-left="0.3cm" margin-top="0.8cm">
The team at Magnetic North Travel was awarded Britain’s most coveted commercial prize, the
<fo:inline font-weight="bold">Queen's Award for Enterprise: International Trade 2018. </fo:inline>
The Award is in recognition of our high growth in international sales and dedication to our global clients.
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:block-container>
<fo:block page-break-before="always"></fo:block>
<fo:block-container border="1px solid" padding="0.6cm">
<fo:block text-align="center" font-weight="bold" margin-top="0.4cm" margin-bottom="0.8cm" color="red">Taking responsibility for the Magnetic North</fo:block>
<fo:block margin-bottom="0.25cm" >
Many people travel with us to experience the region’s impressive natural beauty and to delve below the surface of their chosen destination. It’s our responsibility to ensure that we maintain a positive impact on the people and places we encounter. Our aim is to help people develop a deepened respect for nature and their place on the planet which extends beyond their time away.
</fo:block>
<fo:block margin-bottom="0.25cm" font-weight="bold">
Economic responsibility
</fo:block>
<fo:block margin-bottom="0.25cm" >
In each of our destinations, local people represent Magnetic North as guides and leaders. They will each have different skills – we work with outdoor leaders (e.g. kayakers, walkers, cross country skiers) and craftspeople (e.g. felt makers, foragers, fishermen). They receive a fair payment for their work. We also support independent accommodation providers as much as possible, often owned by families. Similarly, they work with suppliers of food and other provisions that are local to them and provide wonderful flavours of the region for our guests. Altogether this helps to create economic prosperity within our destination communities and Magnetic North Travel will continue to support this.
</fo:block>
<fo:block margin-bottom="0.25cm" font-weight="bold">
Environmental responsibility
</fo:block>
<fo:block margin-bottom="0.25cm" >
At Magnetic North Travel, our philosophy is based on the Norwegian idea of 'Friluftsliv'. Translated literally as 'Free air living', it inspires people to value their outdoor life through learning from traditions and seeking enjoyment in nature. It’s a simple but powerful philosophy that originates in the Magnetic North, and Norway in particular. It’s helped generations of families to explore their surroundings and to breath and live with nature – together. Our landscapes are home to communities – some have come and gone – but they all provide endless tales that capture the imaginations of our guests, young and old alike. We weave these stories into our holidays and use traditional ways to explore nature – at nature’s pace. The many regions of the Magnetic North also add their own local flavours, characters and settings. We immerse our guests in awe-inspiring environments with the cultural guidance of local people. They lead our guests in learning about how their traditions from the past and present sustain them into the future.
</fo:block>
<fo:block margin-bottom="0.25cm" >
We pick our suppliers and activities carefully to ensure that our holidays retain a high standard of environmental responsibility. Our guides are all trained to understand the outdoors and how to respect areas of outstanding natural beauty. They follow the local guidelines on using public space and ensure that their groups leave absolutely no trace. Energy and water consumption is an important factor when choosing accommodation providers. We ensure that hotels, cabins and guesthouses operate a rigorous environmental policy with regard to energy and water consumption. We support providers which use renewable forms of energy such as wind and sustainably harvested bio-fuel.
</fo:block>
<fo:block margin-bottom="0.25cm" font-weight="bold">
Social responsibility
</fo:block>
<fo:block margin-bottom="0.25cm" >
Our trips promote ‘landfull’ experiences which encourage engagement with the physical and cultural properties of the land. Our holidays aim to help people return home with fresh perspectives on nature. Each of our holidays provides a unique insight into the destinations and we believe that it’s important to draw distinctions between them so as to preserve traditions and ways of life – in particular ones which have always respected nature. Wherever possible, we integrate experiences that will provide guests with further cultural insight, by, for example, visiting local events, festivals and families. We also offer opportunities to learn traditional skills and advise guests on any cultural norms or traditions that need to be respected.
</fo:block>
<fo:block margin-bottom="0.25cm" >
Please chat with a member of our team to learn more about responsible travel in the Magnetic North.
</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
quotation.docx
(application/vnd.openxmlformats-officedocument.wordprocessingml.document, 407.4 KB) - not displayed