PDF generation using XSL FO

I am trying to generate a dynamic PDF with 'PDF from XSL FO Transformation', it is generating a PDF but after opening it I'm getting an error stating 'The file is damaged and could not be repaired.' Has anyone came across such scenario? I'm not able find the issue here.

  Discussion posts and replies are publicly visible