error on rendering pdf in the cms

csaladores's Avatar

csaladores

29 Nov, 2010 02:14 PM

Hi,

I got this error when rendering a pdf using stock xslt pdf transformation in the cms. Here is the error.

=================== Nov 29, 2010 9:08 AM
An error occurred: An error occurred while rendering the PDF: org.apache.fop.fo.ValidationException: null:43:53: Error(43/53): fo:list-block is missing child elements. Required Content Model: marker* (list-item)+

You may choose to retry the operation. If the problem persists, please contact a system administrator.

The error has been logged to the system console.

Home

I'm attaching a log file. It might have something to do about either multiple content in the data definition or images.

  1. 1 Posted by Ross on 29 Nov, 2010 05:01 PM

    Ross's Avatar

    That looks to me that the xhtml2fo2pdf format is encountering an HTML <ul> or <ol> element that doesn't have any <li> children. It unwittingly generates the <fo:list-block> element from the unordered or ordered list element, but then no <fo:list-item> elements get generated, causing the error.

    Let us know if you can't find any content with missing list items.

  2. 2 Posted by csaladores on 29 Nov, 2010 07:01 PM

    csaladores's Avatar

    Thanks Ross. There was a <ul> tag without <li>. Now I get this error:
    ==========================

    Nov 29, 2010 1:57 PM
    An error occurred: An error occurred while rendering the PDF: org.apache.fop.fo.ValidationException: null:59:32: Error(59/32): fo:inline is not a valid child element of fo:list-block.

    You may choose to retry the operation. If the problem persists, please contact a system administrator.

    The error has been logged to the system console.

    Home
    ==========================

    What does this mean?

  3. 3 Posted by Ross on 29 Nov, 2010 07:09 PM

    Ross's Avatar

    Sounds like there is another list that has a (direct) child other than <li>.
    HTML elements like <b>, <strong>, <i>, <em>, <code>, <big>, <small>, <span>,
    etc. all generate <fo:inline> elements. They're allowed INSIDE of <li>
    elements but not directly under <ul> or <ol>.

    On Mon, Nov 29, 2010 at 2:01 PM, csaladores <
    [email blocked]<tender%[email blocked]>
    > wrote:

  4. 4 Posted by csaladores on 29 Nov, 2010 07:35 PM

    csaladores's Avatar

    Yup, i removed any tag other than <li> in the <ul> tag. When I removed that, it gave me this error:

    =======================
    Nov 29, 2010 2:34 PM
    An error occurred: An error occurred while rendering the PDF: Gap in the kids list!

    You may choose to retry the operation. If the problem persists, please contact a system administrator.

    The error has been logged to the system console.

    Home
    =======================

    I'm not sure what this means.

  5. 5 Posted by Ross on 29 Nov, 2010 07:48 PM

    Ross's Avatar

    Basically what Gap in the kids list means is that one of the pages of the PDF failed to render properly. This can be caused by any number of issues in the HTML to PDF conversion; the error message is frustratingly vague.

    I'd recommend that you first check the cascade.log file in the server's log directory to see if there are any other PDF-related errors. If you're only encountering this on one Page asset, then the problem is likely with the WYSIWYG content of that page. If it is occurring on all pages, we may need to take a different tack.

    If you're seeing the problem just on one (or a few) pages, paste the WYSIWYG content of the page into a very basic HTML template like the following, and validate that content at http://validator.w3.org

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    
    <html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Content Test</title>
    </head>
    <body>
        Put your WYSIWYG content here.
    </body>
    </html>
    
  6. 6 Posted by csaladores on 29 Nov, 2010 08:48 PM

    csaladores's Avatar

    Great, thanks Ross for the tip. It's just one page asset. It may have to do with the WYSIWYG content. I'll use the validator to validate content for the pdf. Thanks again.

  7. Ross closed this discussion on 04 Mar, 2011 06:16 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac