You need to sign in to do that
Don't have an account?
acl5
Custom Component background not rendering in repeat and not rendering in pdf?
I have a requirement to print a few SObject fields onto a postcard that will be printed. My plan was to create a custom component and get the CSS all set up then add the custom component to an <apex:repeat> tag on a VF page with a controller set-up to grab the two fields I need on the post card. After some trial and error I was able to get my custom component set-up the way I want but when I add it to the repeat tag the background image is only rendered for the first item in my repeat list. The SOBject data is rendered for the entire iteration, but the background image is missing.
Then when I render the page as PDF so it is printable, the page displays the CSS syntax instead of displaying the component?
I'm not sure what to do next. If I use and <apex:image> tag in the repeat the image repeats without issue as well as renders as a pdf.
Any all suggestions are appreaciated.
Then when I render the page as PDF so it is printable, the page displays the CSS syntax instead of displaying the component?
I'm not sure what to do next. If I use and <apex:image> tag in the repeat the image repeats without issue as well as renders as a pdf.
Any all suggestions are appreaciated.
I don't have a lot of exposure to CSS so to see if this was my issue I removed all the css from my component except for the background definition
body {
background-image: url({!image});
background-repeat:no-repeat;
}
which I believe is supported in CSS 2.1.
My custom component is pretty simple:
And it renders ok as HTML, but when I use renderas="pdf"
I get this:
So instead of setting the defined image as the background, the page renders the CSS definition. Not sure what to do next.