Background Color:
Background Pattern:


Please Log In

We want you to contribute! 

This forum is a moderated environment. 
We try to keep it neat and tidy. In order to access the forum content we would like you to either or register.

HomeHomeScryberScryberDevelopment Que...Development Que...Custom Complex Binding StylesCustom Complex Binding Styles
New Post
1/13/2016 4:07 AM


I have built a custom complex binding control for version like shown in

It works and my complex content is bound correctly, however styles are not applying to components.  

Any ideas?

New Post
1/13/2016 4:23 PM


As long as you have updated the namespaces for v0.9 in the source it should be fine.

We have included the PlaceHolder component in v0.9 with includes the capabilities of the sample, if this is what you are looking for.

However - there should be no issue with the sample and it's styles. If you can post the xml content you are adding and the content of the file it is being added to, then we can take a look and see what is going on.

New Post
1/13/2016 11:22 PM

Hi - thanks for the quick response.

I tried the PlaceHolder component with the same result - no styling.  Here's the information:

This is the content being placed into the placeholder:

This is a test<pdf:Div><pdf:Br/></pdf:Div><pdf:Div><pdf:Span style:class='redact'>This paragraph should be styled</pdf:Span></pdf:Div><pdf:Div><pdf:Br/></pdf:Div><pdf:Div>This should not</pdf:Div>

This is the pdfx file:

<?xml version="1.0" encoding="utf-8" ?>

<?scryber parser-mode='Strict' parser-log='false' append-log='false' log-level='Warnings' ?>

<pdf:Document xmlns:pdf="Scryber.Components, Scryber.Components, Version=, Culture=neutral, PublicKeyToken=872cbeb81db952fe"

              xmlns:style="Scryber.Styles, Scryber.Styles, Version=, Culture=neutral, PublicKeyToken=872cbeb81db952fe"

              xmlns:data="Scryber.Data, Scryber.Components, Version=, Culture=neutral, PublicKeyToken=872cbeb81db952fe"

              xmlns:smartSquad="SmartSquad.PDFComponents, SmartSquad.Service"

              id="NoteExport" compression="Compress" auto-bind="true">


    <style:Style applied-type="pdf:Section" >

      <style:Font size="14pt" />

      <style:Text leading="20pt"/>


    <style:Style applied-type="pdf:Page" >

      <style:Font size="14pt" />

      <style:Text leading="20pt"/>

      <style:Margins left="15mm" right="15mm" bottom="10mm" top="10mm"/>

      <style:Page size="Letter" orientation="Portrait"/>


    <style:Style applied-class="pageContainer" >

      <style:Padding bottom ="-15mm"/>


    <style:Style applied-class="flowing">

      <style:Overflow action ="NewPage" split ="Any" />

      <style:Text whitespace-significant="true" />


    <style:Style applied-class="redact" >

      <style:Background color ="#FFD700"/>





      <pdf:Label text="{item:title}" />




    <data:XMLDataSource id="NoteData" xml-data="{item:note-data}"></data:XMLDataSource>

    <data:XMLDataSource id="NoteHistory" xml-data="{item:note-history}"></data:XMLDataSource>

    <pdf:Section id="FirstSection" >

      <Outline title="Summary" style:open="true" />


        <data:ForEach select="/Note" datasource-id="NoteData" >


            <pdf:Para style:class="flowing">

              <pdf:PlaceHolder contents ="{item:formatted-content}" />








New Post
1/14/2016 12:16 AM

OK - I think I get it.  A Span is an inline element so a background color cannot be assigned.  

Any suggestions on how to get some content inline to be highlighted?


New Post
1/14/2016 11:10 AM

Easiest way is to put a rectangle or panel behind the text (higher in the layout) with a background colour and relative positioning (x, y, width, height). It will not flow within your dynamic content, but will flow within the rest of the document.

Alternatively, use text colour, bold italic, underline to accentuate the text, rather than a specific background colour to the text.

Hope this helps.

HomeHomeScryberScryberDevelopment Que...Development Que...Custom Complex Binding StylesCustom Complex Binding Styles