Page 1 of 1

XEP - PDF transformation

Posted: Wed Jul 20, 2011 12:17 pm
by Speeder21
Hi folks (or only Radu :D),

I have next problem with PDF transformation. I try XEP processor. I install and set it as documentation say but after transformation (oxygen say BUILD SUCCESSFUL) Adobe Reader give me a msg that .pdf file could not be opened because file is demaged or type of file isnt supported.

in log i get only this error
...
[java] ERROR: Attribute 'extent' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'extent' cannot have a value of "$page-margin".
[java] Rendering failed: Invalid XSL FO source 'file:/C:/Documents%20and%20Settings/vladimir.poluch/Desktop/um%20oxygen/topic.fo': 21 errors found during validation
thx for answer

Regards,
Vladis

Re: XEP - PDF transformation

Posted: Wed Jul 20, 2011 2:09 pm
by Radu
Hi Vladis,

Are you making the PDF transformation on a DITA Map (using the DITA Open Toolkit) or as a post-processing step after applying an XSLT stylesheet on an XML document?

From what it seems in the resulting FO file there are some values for the "extent" attribute which have not been expanded properly to sizes. So you could open the resulting FO file and see then how these values have been generated by the stylesheets.

Regards,
Radu

Re: XEP - PDF transformation

Posted: Wed Jul 20, 2011 2:26 pm
by Speeder21
HI Radu,

How are you??

I am making on DITA Map (Dita OT).

this is all errors from log:

Code: Select all

transform.fo2pdf.xep:
[java] ERROR: Attribute 'margin-bottom' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-left' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-right' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-top' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-bottom' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-left' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-right' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-top' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'extent' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'extent' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-bottom' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-left' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-right' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-top' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'extent' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-bottom' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-left' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-right' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'margin-top' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'extent' cannot have a value of "$page-margin".
[java] ERROR: Attribute 'extent' cannot have a value of "$page-margin".
[java] Rendering failed: Invalid XSL FO source 'file:/C:/Documents%20and%20Settings/vladimir.poluch/Desktop/um%20oxygen/topic.fo': 21 errors found during validation
but topic.to exist only when transformation is processing. So when I do transformation with FOP apache processor all is OK. I dont know what is wrong.

Regards,
Vladis

Re: XEP - PDF transformation

Posted: Wed Jul 20, 2011 5:22 pm
by Radu
Hi Vladis,

Did you make any modifications in the DITA Open Toolkit stylesheets? One of them probably triggers this problem. Did you make any modifications to the XSL below?

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/cfg/fo/attrs/basic-settings.xsl

The XSL mentioned above has a variable declared like:

Code: Select all

<xsl:variable name="page-margins">20mm</xsl:variable>
Did you make any changes to its value?

In order to retain the "topic.fo" file after the PDF transformation you can edit the PDF transformation scenario and in the Parameters tab set the parameter retain.topic.fo to yes. After the transformation the "topic.fo" should be found in the output folder.

Regards,
Radu

Re: XEP - PDF transformation

Posted: Wed Jul 20, 2011 5:39 pm
by Speeder21
yes, I do.

Solved.

I dont know if i change it or it was default setting but in layout-masters.xsl was $page-margin variable instead of {$page-margins}. I fix it and all is OK.

Thx you for leadership to fix it :) Radu

Regards,
Vladis