Help with email content type HTML

Hi,
Following is my control file code for sending the email message (just putting the delivery part, and not the while content from control file):
<xapi:delivery>
<xapi:email server="${DCRD_SMTP_HOST}" port="${DCRD_SMTP_PORT}"
from="${CP_DCRD_ADMIN_EMAIL}"
     reply-to="${CP_DCRD_ADMIN_EMAIL}">
<!-- Set the id for the delivery method -->
<xapi:message id="123" to="${CF_DCRD_CONTACT_EMAIL}" cc="${CP_DCRD_ADMIN_EMAIL}" bcc="[email protected], [email protected]" attachment="true" content-type="html"
subject="Datacard Maintenance Agreement Number ${CONTRACT_NUMBER} ">${CF_FINAL_EMAIL_CONTENT}
</xapi:message>
</xapi:email>
</xapi:delivery>
The formula column CF_FINAL_EMAIL_CONTENT get populated with some html content based on condition. Now, when I get the email, the text from the formula column get printed as is.......with tags and all. It's like I had unformatted plain text email. I need the content to be formatted and I need different content based on a condition. Has anyone done this before?
Appreciate any help on this.
Thanks,
Alka

I finally could fix the issue by still using a formula column to store the html text and using the following in my control file (in bold):
<xapi:message id="123" to="${CF_DCRD_CONTACT_EMAIL}" cc="${CP_DCRD_ADMIN_EMAIL}" bcc="[email protected], [email protected]" attachment="true" content-type="text/html"
subject="Datacard Maintenance Agreement Number ${CONTRACT_NUMBER} "> *<content><![CDATA[${CF_FINAL_EMAIL_CONTENT}]]></content>*
</xapi:message>
Hope this would help someone clueless like me :-)
Alka

Similar Messages

  • Email: content-type html

    Is it possible to send an email with html content from ALSB ? If I set the content-type to 'text/html' in the transport header, the ALSB is overriding it to 'text/plain'.
    Any ideas are appreciated.
    Thanks.

    I finally could fix the issue by still using a formula column to store the html text and using the following in my control file (in bold):
    <xapi:message id="123" to="${CF_DCRD_CONTACT_EMAIL}" cc="${CP_DCRD_ADMIN_EMAIL}" bcc="[email protected], [email protected]" attachment="true" content-type="text/html"
    subject="Datacard Maintenance Agreement Number ${CONTRACT_NUMBER} "> *<content><![CDATA[${CF_FINAL_EMAIL_CONTENT}]]></content>*
    </xapi:message>
    Hope this would help someone clueless like me :-)
    Alka

  • What's wrong with this content type definition?

    Could someone tell me what's wrong with this content type definition? When I click "New Folder" in a custom list, it should bring two fields 1) Name 2) Custom Order. However in my case when I click new folder, I see 1) Member (which is totally
    weird) 2) custom order. Where is it getting that Member field from?
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Parent ContentType: Folder (0x0120) -->
    <ContentType ID="0x012000c0692689cafc4191b6283f72f2369cff"
    Name="Folder_OrderColumn"
    Group="Custom"
    Description="Folder with order column"
    Inherits="TRUE"
    Version="0">
    <FieldRefs>
    <FieldRef ID="{35788ED2-8569-48DC-B6DE-BA72A4F87B7A}" Name="Custom_x0020_Order" DisplayName="Custom Order" />
    </FieldRefs>
    </ContentType>
    </Elements>

    Hi,
    According to your post, my understanding is that you had an issue about the custom content type with custom column.
    I don’t think there is any issue in the content type definition, and it also worked well in my environment.
    Did you have the Member field in the project?
    I recommend you create a simple project only with one custom Order column and one custom Folder_OrderColumn, then you can add more fields one by one.
    By doing this, it will be easier to find out the root cause of this error.
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Error when associating workflow with Task Content Type

    Using SharePoint Designer 2010, I have created a simple workflow that sends an email out when a tasks due date has past.  I created this as a Global Workflow and then tried to "Associated to Content Type", selecting "Task".  I am then taken
    to... COMPANY PORTAL--> Site Settings--> Site Content Types--> Task--> Add a Workflow. When I try to associate the new "Global" workflow and select OK I get the following error...
    Error
    Workflows may not be associated with content types whose base is on 'WorkflowTask'.
    I have looked up the error but find no real explination of what it means.  And I have associated global workflows with custom content types and never had this issue. 
    So what's going on?
    Thanks
    Steve
    Thanks in advance for your time. Steven

    Hi ,
    I understand that when you bind the workflow to Tasks content type, there is an error. I can reproduce this error. This is because we cannot add a reusable workflow to a workflow tasks content type. When you add the reusable workflow to the Tasks content
    type, you must have checked the ‘Add this workflow to all content types that inherit from this content type’. In this way, the workflow will be added to all the Tasks content type and workflowtasks content type. There will an error. After you close the error
    message, the workflow is added to the Tasks content type.
    The workaround is the check No to ‘Add this workflow to all content types that inherit from this content type’.
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

  • No lists or libraries with InfoPath content types can be found.

    I published an InfoPath form to two libraries in the site, one was a document library and one to a form library. I am using the InfoPath Web Part in the same sight and when I open the toolpane, I get the following message:
    No lists or libraries with InfoPath content types can be found. Use Microsoft InfoPath
    to design a form template for InfoPath Forms Services and publish it to a SharePoint library or list.
    Can you help?

    Looks like it has been a while since this post.  Hope this helps someone still facing this problem.
    If you're publishing the InfoPath form as a Content Type:
    Make sure that the Library (Form Templates) where the form is being published to has Content Types enabled.
    Check that the Library where form is being saved upon submittal (if different from above, as it should be) has Content Types enabled.
    The newly published form Content Type added the Library where forms are submitted.
    If you're publishing the InfoPath form without a Content Type:
    Just make sure that the Library you're publishing to is a Forms Library.
    Enjoy!
    Thank you in advance!

  • Schedule a job with email destination in BOXI R2 with email format as html

    Hello Guys, would it to possible to schedule a job with email destination in BOXI R2 with email format as html? we are able to get it running with plain text email format. we use Java SDK to interface with BO Enterprise servers.
    thanks for your thoughts,
    Venkat

    Hi
    your job should SMOF_DOWNLOAD can bring new material master if you set up correctly.
    as a smart method smof_download is the best way.
    doble check your filter condition. it should work as you expected. because we dont involve in  manual pulling...
    check your variant once again. in vari table,
    can you check r3ac1 - filter settings- source seetingsa--> source site nmae --> backendlogical system and filter sync..
    br
    Muthu

  • Managed metadata columns in document information panel with multiple content types

    Hi everyone,
    The problem I have is that for custom content types not all managed metadata columns are displayed in Document Information Panel (DIP) for the document in the Office client application. 
    However, everything works fine with 1 specific content type. Even though the others using exactly the same site columns. The content types are deployed using visual studio to the content type hub, and after this the content types are correctly published to
    the site collections, there are no publish issues here. 
    When I create a document based on the second content type in the same library, all fields are showed in the document information panel, except the managed metadata columns.
    Detailed explanation:
    Library: procedures
    Content types:
    - simple procedure (with 4 managed metadata fields and some other text fields)
    - procedure with approval (with the same 4 managed metadata fields and some other text fields)
    Scenario 1: I add the 'simple procedure' content type to the procedures library as only content type. Everything works fine, and all fields show correctly in the document information panel in Word.
    Scenario 2: I add the 'procedure with approval' content type to the procedures library as only content type. Everything works fine, and all fields show correctly in the document information panel in Word.
    Scenario 3: I add the 'simple procedure' and 'procedure with approval' content types to the document library procedures (added simple procedure first). When I create a new document based on the 'simple procedure'
    content type, everything works fine and he shows all metadata fields. When I add a new document based on the 'procedure with approval' content type, the document information panel shows correctly, except all managed metadata fields. These are not visible at
    all. Though they worked perfectly in scenario 1 and 2.
    Is this a known issue or is there a workaround for this? 
    Thanks in advance! 
    Kind regards, Davy

    Yes!
    This problem is solved right now.
    My issue was that I'm using custom content types deployed by Visual Studio in the content type hub. To create a managed metadata site column in visual studio, you need to have first of all your managed metadata field, but also a hidden field accompagnied
    to make the actual mapping like the example below:
    <Field ID="{B654D984-187A-471B-8738-F08F3356CFDA}"
    Type="TaxonomyFieldType"
    DisplayName="Countries"
    ShowField="Term1033"
    EnforceUniqueValues="FALSE"
    Group="Demo"
    StaticName="Countries"
    Name="Countries">
    <Customization>
    <ArrayOfProperty>
    <Property>
    <Name>TextField</Name>;
    <Value xmlns:q6="http://www.w3.org/2001/XMLSchema" p4:type="q6:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">{67308AC2-9556-456B-BF9E-43E8F23EBEE6}</Value>
    </Property>
    </ArrayOfProperty>
    </Customization>
    </Field>
    <Field Type="Note"
    DisplayName="Countries_0"
    StaticName="CountriesTaxHTField0"
    Name="CountriesTaxHTField0"
    ID="{67308AC2-9556-456B-BF9E-43E8F23EBEE6}"
    ShowInViewForms="FALSE"
    Required="FALSE"
    Hidden="TRUE"
    CanToggleHidden="TRUE"
    Group="Demo"
    RowOrdinal="0"
    />
    </Elements>
    VERY important here is that when you create your content type using visual studio, you not only have to add the managed metadata site column in your xml (which let the content type work already perfectly) but also add the hidden field to your content type
    xml !! This way, SharePoint knows that when you have multiple content types with the same site columns in the same library, the second content type also need to get the hidden field from this site columns like in the example below!
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Parent ContentType: Document (0x0101) -->;
    <ContentType ID="0x010100571ebc0f478a49d5a775039347ee1535"
    Name="Document Location"
    Group="Demo"
    Description="A content type containing Managed Metadata Column."
    Inherits="TRUE"
    Version="0">
    <FieldRefs>
    <FieldRef ID="{B654D984-187A-471B-8738-F08F3356CFDA}" Name="Countries"/>
    <FieldRef ID="{67308AC2-9556-456B-BF9E-43E8F23EBEE6}" Name="CountriesTaxHTField0"/>
    <FieldRef ID="{f3b0adf9-c1a2-4b02-920d-943fba4b3611}" Name="TaxCatchAll"/>
    <FieldRef ID="{8f6b6dd8-9357-4019-8172-966fcd502ed2}" Name="TaxCatchAllLabel"/>
    </FieldRefs>
    </ContentType>
    </Elements>
    I'm very happy I found this solution, because in the whole project i'm implementing, this was used a lot!
    Special thanks to the blog of @cann0nf0dder (http://cann0nf0dder.wordpress.com/2013/04/01/creating-a-site-column-with-managed-metadata) which let me think about this! 
    This ticket is answered now! :-)
    Kind regards,
    Davy

  • Help with code to print HTML in Java 5

    Hi,
    The following code works and runs successfully..
    However, the printing in Java 1.4.2_03 is better than Java 5 (latest version).
    i.e in particular the characters are not monospaced compared with compiling with Java 1.4.2_03. e.g si so ss squashed together.
    This issue does not seem to occur when running the same code in Java 1.4.2_03. (I haven't tried other 1.4.2 java versions).
    Any help would be appreciated. We really need this working under Java 5 or bust.
    Here is the complete listing ... PrintHtml.java (it uses the DocumentRenderer)
    and following this is the input file.
    import javax.swing.text.html.HTMLDocument;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.io.IOException;
    import java.io.DataInputStream;
    import java.io.InputStream;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import java.lang.reflect.*;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Rectangle;
    import java.awt.Shape;
    import java.awt.print.PageFormat;
    import java.awt.print.Printable;
    import java.awt.print.PrinterException;
    import java.awt.print.PrinterJob;
    import javax.swing.JEditorPane;
    import javax.swing.text.Document;
    import javax.swing.text.PlainDocument;
    import javax.swing.text.View;
    import javax.swing.text.html.HTMLDocument;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.print.*;
    import java.text.ParseException;
    public class PrintHtml {
         * Utility helper to convert HTML Text to HTML Document.
         * @param baseUrl URL to be used in order
         * to resolve relative HTML references, in lieu of an
         * HTML BASE tag. May be null, if not required or HTML
         * BASE tag is to be used.
         * @see jbox.view.jfx.JboxHtmlEditor
         * @see jbox.utility.JboxPrint
         * @see jbox.utility.JboxPrintUtil
      public static HTMLDocument htmlTextToHtmlDoc(String htmlText, URL baseUrl)
              try
              //  JboxHtmlEditorKit editorKit = new JboxHtmlEditorKit();
                HTMLEditorKit editorKit = new HTMLEditorKit();
                HTMLDocument doc = (HTMLDocument)editorKit.createDefaultDocument();
                   if (baseUrl != null)
                        try
                             doc.setBase(baseUrl);
                        catch(Exception e)
                             //JboxTraceManager.trace(e);
                   StringReader reader = new StringReader(htmlText);
                   editorKit.read(reader, doc, 0);
             return doc;
              catch(Exception e)
                   //JboxTraceManager.trace(e);
                   return null;
       public static void main(String[] args) {
          System.out.println("printing...");
          HTMLDocument x = new HTMLDocument();
          DocumentRenderer invoice = new DocumentRenderer();
          //invoice.setScaleWidthToFit(false);
          String s = "";
          try {
            BufferedInputStream bis = new BufferedInputStream(new FileInputStream("mark.html"));
            InputStreamReader in = new InputStreamReader(bis , "ASCII");
            StringWriter sw = new StringWriter();
            while (true) {
               int datum = in.read();
               if (datum == -1) break;
               sw.write(datum);
            in.close();
            s = sw.toString();
            System.out.println("s="+s);
          catch (IOException e) {
             System.err.println(e);
          HTMLDocument htmldoc = htmlTextToHtmlDoc(s, null);
          invoice.print(htmldoc);
    // the good old infamous DocumentRenderer.
    /*  Copyright 2002
        Kei G. Gauthier
        Suite 301
        77 Winsor Street
        Ludlow, MA  01056
    class DocumentRenderer implements Printable {
    /*  DocumentRenderer prints objects of type Document. Text attributes, including
        fonts, color, and small icons, will be rendered to a printed page.
        DocumentRenderer computes line breaks, paginates, and performs other
        formatting.
        An HTMLDocument is printed by sending it as an argument to the
        print(HTMLDocument) method. A PlainDocument is printed the same way. Other
        types of documents must be sent in a JEditorPane as an argument to the
        print(JEditorPane) method. Printing Documents in this way will automatically
        display a print dialog.
        As objects which implement the Printable Interface, instances of the
        DocumentRenderer class can also be used as the argument in the setPrintable
        method of the PrinterJob class. Instead of using the print() methods
        detailed above, a programmer may gain access to the formatting capabilities
        of this class without using its print dialog by creating an instance of
        DocumentRenderer and setting the document to be printed with the
        setDocument() or setJEditorPane(). The Document may then be printed by
        setting the instance of DocumentRenderer in any PrinterJob.
      protected int currentPage = -1;               //Used to keep track of when
                                                    //the page to print changes.
      protected JEditorPane jeditorPane;            //Container to hold the
                                                    //Document. This object will
                                                    //be used to lay out the
                                                    //Document for printing.
      protected double pageEndY = 0;                //Location of the current page
                                                    //end.
      protected double pageStartY = 0;              //Location of the current page
                                                    //start.
      protected boolean scaleWidthToFit = true;     //boolean to allow control over
                                                    //whether pages too wide to fit
                                                    //on a page will be scaled.
    /*    The DocumentRenderer class uses pFormat and pJob in its methods. Note
          that pFormat is not the variable name used by the print method of the
          DocumentRenderer. Although it would always be expected to reference the
          pFormat object, the print method gets its PageFormat as an argument.
      protected PageFormat pFormat;
      protected PrinterJob pJob;
    /*  The constructor initializes the pFormat and PJob variables.
      public DocumentRenderer() {
        pFormat = new PageFormat();
        pJob = PrinterJob.getPrinterJob();
    /*  Method to get the current Document
      public Document getDocument() {
        if (jeditorPane != null) return jeditorPane.getDocument();
        else return null;
    /*  Method to get the current choice the width scaling option.
      public boolean getScaleWidthToFit() {
        return scaleWidthToFit;
    /*  pageDialog() displays a page setup dialog.
      public void pageDialog() {
        pFormat = pJob.pageDialog(pFormat);
    /*  The print method implements the Printable interface. Although Printables
        may be called to render a page more than once, each page is painted in
        order. We may, therefore, keep track of changes in the page being rendered
        by setting the currentPage variable to equal the pageIndex, and then
        comparing these variables on subsequent calls to this method. When the two
        variables match, it means that the page is being rendered for the second or
        third time. When the currentPage differs from the pageIndex, a new page is
        being requested.
        The highlights of the process used print a page are as follows:
        I.    The Graphics object is cast to a Graphics2D object to allow for
              scaling.
        II.   The JEditorPane is laid out using the width of a printable page.
              This will handle line breaks. If the JEditorPane cannot be sized at
              the width of the graphics clip, scaling will be allowed.
        III.  The root view of the JEditorPane is obtained. By examining this root
              view and all of its children, printView will be able to determine
              the location of each printable element of the document.
        IV.   If the scaleWidthToFit option is chosen, a scaling ratio is
              determined, and the graphics2D object is scaled.
        V.    The Graphics2D object is clipped to the size of the printable page.
        VI.   currentPage is checked to see if this is a new page to render. If so,
              pageStartY and pageEndY are reset.
        VII.  To match the coordinates of the printable clip of graphics2D and the
              allocation rectangle which will be used to lay out the views,
              graphics2D is translated to begin at the printable X and Y
              coordinates of the graphics clip.
        VIII. An allocation Rectangle is created to represent the layout of the
              Views.
              The Printable Interface always prints the area indexed by reference
              to the Graphics object. For instance, with a standard 8.5 x 11 inch
              page with 1 inch margins the rectangle X = 72, Y = 72, Width = 468,
              and Height = 648, the area 72, 72, 468, 648 will be painted regardless
              of which page is actually being printed.
              To align the allocation Rectangle with the graphics2D object two
              things are done. The first step is to translate the X and Y
              coordinates of the graphics2D object to begin at the X and Y
              coordinates of the printable clip, see step VII. Next, when printing
              other than the first page, the allocation rectangle must start laying
              out in coordinates represented by negative numbers. After page one,
              the beginning of the allocation is started at minus the page end of
              the prior page. This moves the part which has already been rendered to
              before the printable clip of the graphics2D object.
        X.    The printView method is called to paint the page. Its return value
              will indicate if a page has been rendered.
        Although public, print should not ordinarily be called by programs other
        than PrinterJob.
      public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) {
        double scale = 1.0;
        Graphics2D graphics2D;
        View rootView;
    //  I
        graphics2D = (Graphics2D) graphics;
        disableDoubleBuffering(jeditorPane);
    //  II
        jeditorPane.setSize((int) pageFormat.getImageableWidth(),Integer.MAX_VALUE);
        jeditorPane.validate();
    //  III
        rootView = jeditorPane.getUI().getRootView(jeditorPane);
    //  IV
        if ((scaleWidthToFit) && (jeditorPane.getMinimumSize().getWidth() >
        pageFormat.getImageableWidth())) {
          scale = pageFormat.getImageableWidth()/
          jeditorPane.getMinimumSize().getWidth();
          graphics2D.scale(scale,scale);
    //  V
        graphics2D.setClip((int) (pageFormat.getImageableX()/scale),
        (int) (pageFormat.getImageableY()/scale),
        (int) (pageFormat.getImageableWidth()/scale),
        (int) (pageFormat.getImageableHeight()/scale));
    //  VI
        if (pageIndex > currentPage) {
          currentPage = pageIndex;
          pageStartY += pageEndY;
          pageEndY = graphics2D.getClipBounds().getHeight();
    //  VII
        graphics2D.translate(graphics2D.getClipBounds().getX(),
        graphics2D.getClipBounds().getY());
    //  VIII
        Rectangle allocation = new Rectangle(0,
        (int) -pageStartY,
        (int) (jeditorPane.getMinimumSize().getWidth()),
        (int) (jeditorPane.getPreferredSize().getHeight()));
    //  X
        if (printView(graphics2D,allocation,rootView)) {
          return Printable.PAGE_EXISTS;
        else {
          pageStartY = 0;
          pageEndY = 0;
          currentPage = -1;
          return Printable.NO_SUCH_PAGE;
      /** The speed and quality of printing suffers dramatically if
       *  any of the containers have double buffering turned on.
       *  So this turns if off globally.
       *  @see enableDoubleBuffering
      public static void disableDoubleBuffering(Component c) {
        RepaintManager currentManager = RepaintManager.currentManager(c);
        currentManager.setDoubleBufferingEnabled(false);
      /** Re-enables double buffering globally. */
      public static void enableDoubleBuffering(Component c) {
        RepaintManager currentManager = RepaintManager.currentManager(c);
        currentManager.setDoubleBufferingEnabled(true);
    /*  print(HTMLDocument) is called to set an HTMLDocument for printing.
      public void print(HTMLDocument htmlDocument) {
        setDocument(htmlDocument);
        printDialog();
    /*  print(JEditorPane) prints a Document contained within a JEDitorPane.
      public void print(JEditorPane jedPane) {
        setDocument(jedPane);
        printDialog();
    /*  print(PlainDocument) is called to set a PlainDocument for printing.
      public void print(PlainDocument plainDocument) {
        setDocument(plainDocument);
        printDialog();
    /*  A protected method, printDialog(), displays the print dialog and initiates
        printing in response to user input.
      protected void printDialog() {
        if (pJob.printDialog()) {
          pJob.setPrintable(this,pFormat);
          try {
            pJob.print();
          catch (PrinterException printerException) {
            pageStartY = 0;
            pageEndY = 0;
            currentPage = -1;
            System.out.println("Error Printing Document");
    /*  printView is a recursive method which iterates through the tree structure
        of the view sent to it. If the view sent to printView is a branch view,
        that is one with children, the method calls itself on each of these
        children. If the view is a leaf view, that is a view without children which
        represents an actual piece of text to be painted, printView attempts to
        render the view to the Graphics2D object.
        I.    When any view starts after the beginning of the current printable
              page, this means that there are pages to print and the method sets
              pageExists to true.
        II.   When a leaf view is taller than the printable area of a page, it
              cannot, of course, be broken down to fit a single page. Such a View
              will be printed whenever it intersects with the Graphics2D clip.
        III.  If a leaf view intersects the printable area of the graphics clip and
              fits vertically within the printable area, it will be rendered.
        IV.   If a leaf view does not exceed the printable area of a page but does
              not fit vertically within the Graphics2D clip of the current page, the
              method records that this page should end at the start of the view.
              This information is stored in pageEndY.
      protected boolean printView(Graphics2D graphics2D, Shape allocation,
      View view) {
        boolean pageExists = false;
        Rectangle clipRectangle = graphics2D.getClipBounds();
        Shape childAllocation;
        View childView;
        if (view.getViewCount() > 0 &&
              !view.getElement().getName().equalsIgnoreCase("td")) {
          for (int i = 0; i < view.getViewCount(); i++) {
            childAllocation = view.getChildAllocation(i,allocation);
            if (childAllocation != null) {
              childView = view.getView(i);
              if (printView(graphics2D,childAllocation,childView)) {
                pageExists = true;
        } else {
    //  I
          if (allocation.getBounds().getMaxY() >= clipRectangle.getY()) {
            pageExists = true;
    //  II
            if ((allocation.getBounds().getHeight() > clipRectangle.getHeight()) &&
            (allocation.intersects(clipRectangle))) {
              view.paint(graphics2D,allocation);
            } else {
    //  III
              if (allocation.getBounds().getY() >= clipRectangle.getY()) {
                if (allocation.getBounds().getMaxY() <= clipRectangle.getMaxY()) {
                  view.paint(graphics2D,allocation);
                } else {
    //  IV
                  if (allocation.getBounds().getY() < pageEndY) {
                    pageEndY = allocation.getBounds().getY();
        return pageExists;
    /*  Method to set the content type the JEditorPane.
      protected void setContentType(String type) {
        jeditorPane.setContentType(type);
    /*  Method to set an HTMLDocument as the Document to print.
      public void setDocument(HTMLDocument htmlDocument) {
        jeditorPane = new JEditorPane();
        setDocument("text/html",htmlDocument);
    /*  Method to set the Document to print as the one contained in a JEditorPane.
        This method is useful when Java does not provide direct access to a
        particular Document type, such as a Rich Text Format document. With this
        method such a document can be sent to the DocumentRenderer class enclosed
        in a JEditorPane.
      public void setDocument(JEditorPane jedPane) {
        jeditorPane = new JEditorPane();
        setDocument(jedPane.getContentType(),jedPane.getDocument());
    /*  Method to set a PlainDocument as the Document to print.
      public void setDocument(PlainDocument plainDocument) {
        jeditorPane = new JEditorPane();
        setDocument("text/plain",plainDocument);
    /*  Method to set the content type and document of the JEditorPane.
      protected void setDocument(String type, Document document) {
        setContentType(type);
        jeditorPane.setDocument(document);
    /*  Method to set the current choice of the width scaling option.
      public void setScaleWidthToFit(boolean scaleWidth) {
        scaleWidthToFit = scaleWidth;
    }The sample input file is "mark.html":::
    <html>
    <head>
    <style type="text/css">
    <!--
    ol { list-style-type: decimal; margin-top: 10; margin-left: 50; margin-bottom: 10 }
    u { text-decoration: underline }
    s { text-decoration: line-through }
    p { font-weight: normal; font-size: medium; margin-top: 15 }
    dd p { margin-top: 0; margin-left: 40; margin-bottom: 0 }
    ol li p { margin-top: 0; margin-bottom: 0 }
    address { color: blue; font-style: italic }
    i { font-style: italic }
    h6 { font-weight: bold; font-size: xx-small; margin-top: 10; margin-bottom: 10 }
    h5 { font-weight: bold; font-size: x-small; margin-top: 10; margin-bottom: 10 }
    h4 { font-weight: bold; font-size: small; margin-top: 10; margin-bottom: 10 }
    h3 { font-weight: bold; font-size: medium; margin-top: 10; margin-bottom: 10 }
    dir li p { margin-top: 0; margin-bottom: 0 }
    h2 { font-weight: bold; font-size: large; margin-top: 10; margin-bottom: 10 }
    b { font-weight: bold }
    h1 { font-weight: bold; font-size: x-large; margin-top: 10; margin-bottom: 10 }
    a { color: blue; text-decoration: underline }
    ul li ul li ul li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    menu { margin-top: 10; margin-left: 40; margin-bottom: 10 }
    menu li p { margin-top: 0; margin-bottom: 0 }
    table table { border-color: Gray; margin-right: 0; border-style: outset; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    sup { vertical-align: sup }
    body { margin-right: 0; font-size: 14pt; font-family: SansSerif; color: black; margin-left: 0 }
    ul li ul li ul { list-style-type: square; margin-left: 25 }
    blockquote { margin-right: 35; margin-top: 5; margin-left: 35; margin-bottom: 5 }
    samp { font-size: small; font-family: Monospaced }
    cite { font-style: italic }
    sub { vertical-align: sub }
    em { font-style: italic }
    table table table { border-color: Gray; margin-right: 0; border-style: outset; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    ul li p { margin-top: 0; margin-bottom: 0 }
    ul li ul li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    var { font-weight: bold; font-style: italic }
    table { border-color: Gray; margin-right: 7; border-style: outset; margin-top: 7; margin-left: 7; margin-bottom: 17 }
    dfn { font-style: italic }
    menu li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    strong { font-weight: bold }
    ul { list-style-type: disc; margin-top: 10; margin-left: 50; margin-bottom: 10 }
    center { text-align: center }
    ul li ul { list-style-type: circle; margin-left: 25 }
    kbd { font-size: small; font-family: Monospaced }
    dir li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    th p { font-weight: bold; padding-left: 2; padding-bottom: 3; padding-right: 2; margin-top: 0; padding-top: 3 }
    ul li menu { list-style-type: circle; margin-left: 25 }
    dt { margin-top: 0; margin-bottom: 0 }
    ol li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    li p { margin-top: 0; margin-bottom: 0 }
    strike { text-decoration: line-through }
    dl { margin-top: 10; margin-left: 10; margin-bottom: 10 }
    tt { font-family: Monospaced }
    ul li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    dir { margin-top: 10; margin-left: 40; margin-bottom: 10 }
    pre p { margin-top: 0 }
    th { border-color: Gray; border-style: solid; padding-left: 3; padding-bottom: 3; padding-right: 1; padding-top: 1 }
    pre { font-family: Monospaced; margin-top: 5; margin-bottom: 5 }
    td { border-color: Gray; border-style: inset; padding-left: 3; padding-bottom: 3; padding-right: 1; padding-top: 1 }
    td p { padding-left: 2; padding-bottom: 3; padding-right: 2; margin-top: 0; padding-top: 3 }
    code { font-size: small; font-family: Monospaced }
    small { font-size: x-small }
    big { font-size: x-large }
    -->
    </style>
    </head>
    <body>
    <p style="margin-top: 0">
    </p>
    <table width="500" cellspacing="20" border="1">
    <tr>
    <td height="330" valign="top">
    <table border="0">
    <tr>
    <td>
    <font size="2">This is to certify that [[Client Name]], born
    on [[Client Date of Birth]], of [[Client Residential
                    Address]], was the holder of motor vehicle driver
    licence number [[Client Licence Number]], first issued on
    [[First Issue Date of Holding]] and expired on [[Holding
                    Expiry Date]].<br></font>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    <table width="500" border="2">
    <tr>
    <td>
    <table width="480" border="0">
    <tr>
    <td align="right">
    <font size="2"><br>
    <b>Fred Flintstone<br>Manager</b><br>Records Services Division<br>State
    Police<br>An authorised person for the purposes of the
    Road Act 1986</font>
    </td>
    </tr>
    <tr>
    <td align="left">
    <font size="2"><b>User ID: wzvqv7<br>Dated: 29 November 2006</b>
    </font>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </html>

    I have finally cracked it!!!!!!!!!!!!!!!!
    The issue is definitely with Java Sun. "Uneven character spacing when printing JTextComponent"
    It is raised on the http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6488219
    And currently in OPEN state, and raised on 31 Oct 2006 and mentions it was caused by fix 4352983.
    So where do we go from here. It's not good because I have tried all later version of the JVM and the issue is still there.
    Why? Because it hasn't been fixed yet. Read the bug report above, as it gives more insight -- and mentions the workaround is NOT good for existing code.
    So the way forward is to use an earlier version of the JVM 5.
    I download the JVM version 1.5.0 (starting version) and works Ok... I would probably think version prior to 4352983 would be Ok too.
    Please vote for this.... We have a workaround (use older version of the JVM).
    So I am very happy.

  • Issue with New Document in a document library with multiple content types

    Hi,
    I have a created a custom list definition based on a document library. I added 3 content types in this list, one is a document set (lets call it DOCSET), the two others are content types inheriting from Document (DOCA and DOCB).
    I deployed the list definition with a site scoped feature and the list instance with a web scoped feature. After activating the two features, the list is created and the content types are present in the list.
    When I click in the New Document button and choose either the DOCA or DOCB content type, a Word document opens and the DOCA content type is always associated to this Word document.
    With SharePoint Manager 2013 I saw that the template.dotx document was not in the Forms/DOCA or Forms/DOCB folder.
    So I decided to remove all the content types from the list definition and add them by code with the ListAdded event receiver. I used list.ContentTypes.Add to add the content types to the list.
    With this method the templates are correctly copied from the template.dotx in the RootFolder/Forms folder of my list. These templates have the rights content type id, but the New Document button still does not work properly.
    So I looked at the Content Types inside my library and saw that the DocumentTemplateUrl linked to the RootFolder/Forms/template.dotx and not the RootFolder/Forms/DOCA/template.dotx or RootFolder/Forms/DOCB/template.dotx.
    I debugged my code to look closer and see that right after the list.ContentTypes.Add, the DocumentTemplateUrl is correclty set but when my EventReceiver finishes, the DocumentTemplateUrl get back to the RootFolder/Forms/template.dotx.
    Have you any idea why this is not working ?
    Regards

    Hi,
    Per my understanding, there is an issue about the DOCA and DOCB content types which inherits from Document Content Type in your custom list definition.
    By default, if there is a custom content type inherits the OOTB Document Content Type, it will also inherits the template.dotx file from the OOTB Document Content Type.
    The template URL of a custom content type which inherits the OOTB Document Content Type:
    If you want to specify different templates for different content types, the code demo below would be helpful:
    http://www.learningsharepoint.com/2010/07/14/programmatically-create-a-new-content-type-in-sharepoint-2010/
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • File created with Document Content Type will not be saved back to Sharepoint library

    Recently some of our users, after upgrading to Windows 8.1 with Office 2013, intermittantly are not able to save files created using  document content types template back to sharepoint library. Instead the location is set
    to their local storage. The same templates used by Windows 7 users with Office 2010 are working fine. Setting the SP sites as Trusted location in IE and Clearing IE Cache did not help. Adding the SP site in Word Trusted Location did
    not help. Any suggestions how this can be resolved is appreciated. Thanks.     

    Hi,
    According to your post, my understanding is that you could not save office file back to the SharePoint Document library.
    It may have to something with your Word Settings. When you click new and it opens in MS Word, word treats it as unsafe because perhaps it is not saved. To make it work:
    Go to Word (2013) -> File Menu -> Options -> Trust Center -> Trust Center Settings
    -> Protected View Tab -> Uncheck "Enable Protected View for files located in potentially unsafe locations" (2nd option)
    Here is the similar post, you can take a look at:
    http://blogs.interfacett.com/word-2010-not-saving-back-to-sharepoint-2010-by-default
    If the issue persist, you can also check the event log and ULS log to see if anything unexpected occurred.
    To check event log, click the Start button and type “Event Viewer” in the Search box.
    For SharePoint 2010, by default, ULS log is at:
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Having templates appear when users click the "New Document" button in a document library with custom content types

    Hi all,
    I'm using SharePoint Online, but I'm seeing the same behavior in an on-prem 2013 instance as well. My situation is this:
    - I've created a document library
    - I've created a custom content type and attached a custom document template to it
    - I've assigned the custom content type to the document library, and disabled the default "document" option
    What I'm expecting to see is that when I browse to the document library and click "new document", that either a) a picklist appears allowing me to specify the document template I want (using the custom template I specified) or b) open the custom
    template itself. That doesn't happen - instead, when I click new document I'm prompted to upload a file, which seems to contradict the whole point of using a custom content type/custom document template combo.
    Am I missing something? The custom template isn't in the Forms library, which seems to be a problem if I wanted to use the custom document template instead of the default.
    Ideally I'd like a menu like the one shown here:
    http://social.msdn.microsoft.com/Forums/en-US/59ce3bd8-bf7f-4872-ae76-60d8c81dfc32/display-content-types-on-new-document-button-in-document-libraries?forum=sharepointgeneral, except with me being able to control the list of items that is shown.
    Any ideas? Thanks!

    Hi Brain,
    What you have done is by design behavior.
    If you want to show the Office document templates list (e.g. below image from your above referenced link) to select when click "+new document" link, this will need to install Office Web App 2013 which provides this feature,
    you can new document and see it is using WopiFrame.aspx page, please see more from below article about how to configure OWA 2013 for SharePoint 2013 on-premise.
    http://technet.microsoft.com/en-us/library/ff431687(v=office.15).aspx
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] 
    Daniel Yang
    TechNet Community Support

  • Adobe Drive and Alfresco Enterprise Fails to Check-in With Custom Content Types

    Hello all,
    I've been struggling with some drive limitations over the last few weeks as we try to utilize the CMIS connector to Alfresco.  I am currently testing with Adobe Drive 3.2.0.41 and Alfresco 4.0.1 Enterprise but have tested this behavior with Drive 4.0.2.6 paired with Alfresco 4.1.1.3 and seen the same behavior:
    The issue I am seeing is that I am unable to Check in a new document into the repository when there is a rule set up to apply a custom content type from our model.  After entering my check-in comment and pressing OK, I get an unknown error from Bridge, InDesign, or Photoshop.  It works fine if I do not specialize our type with a rule (leaving the content as cm:content).  The error I recieve in Alfresco is:  org.alfresco.service.cmr.repository.CopyServiceException: The source and destination node must be the same type.
    I understand that this might be a limitation of Drive and Alfresco working together, but I just wanted to see if anyone had any experience with this issue or any potential workaround, since it is pretty limiting for alfresco to not have any non OOTB content types.
    Thanks, your help would be appreciated.
    Mike

    Adobe Drive CC still has this issue. I can dra-n-drop a .PSD into Alfresco 4.2 and it will work perfectly - unless I use Adobe Drive to edit and check-in the file.

  • Can anyone help with email in my old G4 17"  ??

    My G4 17", bought December 2004, is considered an antique by Apple, and no longer supported. (I now mostly use my early 2011 MacBookPro.)
    But the big screen on by G4 is very useful for Sibelius 4, the music program I mostly use (Sibelius 7 in the MacBookPro - but much too fussy for me.)
    Sibelius 4 in the G4 continues to work flawlessly.
    But my email account recently sort of died. It's  POP account (whatever that means). I can no longer receive messages, BUT I can still create and
    send new messages, and of course forward any saved message to myself in the MacBookPro.
    ALSO:  if I have to shut down the G4, it usually reopens with a horizontally divided display, and it usually takes many restarts before it will open
    will a full screen display (seems to reopen correctly more often if left in a cool place overnight.)
    Can anyone help with one or both these issues? I want to keep the G4 going as long as I can.  BTW, I don't use it for browsing anyone, Safari installed,
    because it is now so slow. The MacBookPro handles all that for me.
    Thanks very much, James Johnson in Plattsburgh NY (where it is still cold and wintry, o f--k)

    To RCCHARLES: THANKS !!!!  I did the safe boot start, following the link you provided, then waited, and waited, and waited, and ---
    Well that is interesting. Amoung other things safe boot does:
    -- check and fixes up your file system.  The files system allows you to keep files on your harddrive.
    -- Does all video rendering in software.
    You could have a one time glitch or harddrive is slowly failing.  If you never replaced the harddrive, it is time for a new one.
    You may want to consider getting a new harddrive.  The easiest way is to get an external drive.  No disassembly of the machine is required.
    You need an external Firewire drive to boot a PowerPC Mac computer [ a few G5's will boot from USB ].
    I recommend you do a google search on any external harddrive you are looking at.
    I bought a low cost external drive enclosure. When I started having trouble with it, I did a google search and found a lot of complaints about the drive enclosure. I ended up buying a new drive enclosure. On my second go around, I decided to buy a drive enclosure with a good history of working with Macs. The chip set seems to be the key ingredient. The Oxford line of chips seems to be good. I got the Oxford 911.
    I'd give OWC a call. 1-815-338-8685.
    FireWire 800 + USB 3, + eSATA
    save a little money interface:
    FireWire 400 + USB 2.0
    This web page lists both external harddrive types. You may need to scroll to the right to see both.
    http://eshop.macsales.com/shop/firewire/1394/USB/EliteAL/eSATA_FW800_FW400_USB
         (2) FireWire 800/400 Ports (Up to 100MB/s / 50MB/s)
         (1) USB 3.0 Port (Up to 500MB/s / 60MB/s)
         (1) eSATA Port (Up to 300MB/s)
    Has a combo firewire 800/400 port.  Not sure what this is.  Looks like you will  need 400 cable.
    http://eshop.macsales.com/shop/ministack

  • Help with Spry Content Slideshow

    Hi,  I like the new widget browser and how easy it makes adding widgets in dreamweaver, Top marks to the developers.
    I have been having a play around with the spry content slideshow, with the possibility of using it on a small business website I am working on.  I have managed to alter the width and height of the widget and everything looks and works great.  I was however wondering how I would go about adding say a 250w x 80h logo above the banner on each slide, which would also require that the banner and story be lowered slightly.
    Thanks in advance for any help anyone can offer with this.

    I was just playing with Spry Content Slideshow earlier, and conveniently still have it open, so I'll give this one a shot, too. It looks like you've got two options embed a "logo bar" of some sort inside the the Slideshow, or (the easier method) wrap the Slideshow in another container. I just used a single banner image.
    I gave embedding a try and placed a <div class="logo"><img/></div> before the first article, but the JavaScript overrode this, and added a new article. Moving this construct inside the first article created a fairly nice banner, keeping the rounded corners at the top. The construct, however, will need to be added to each article. I didn't like that too much, but it's just a personal preference.
    The easy way (?) would be a wrapper, such as <div class="logo"><img /><div id="theSlideshow">...</div></div>, then style the ".logo" class as needed, maybe even copying portions of the style from ".WLBSlideShow" in "wanderlust-brown.css" for the rounded corners, and maybe giving ".logo" additional "padding-bottom" and ".WLBSlideShow" a negative "margin-top", to overlap the bottom of the logo area. Localized CSS modifications (placed after the linked CSS) might be something like the following?
    .logo { background-color: #491e16; width:700px; border: solid 1px #39312e; -webkit-border-radius: 7px; background-color: #491e16; -moz-box-shadow: 5px 5px 10px gray; -webkit-box-shadow: 5px 5px 10px gray; box-shadow: 5px 5px 10px gray; } .logo img { width:100%; height:100px; padding-bottom:40px; } .WLBSlideShow { margin-top:-60px; margin-left:-1px; } 
    If you'd like to see the first method, I can put that up, but the HTML is a bit repetitive.
    Hope this helps. If not you maybe someone!
    Richard

  • Access denied error while uploading the document into document library which is associated with a content type

    hi,
     am trying to upload a document in a document library which is associated  with content types [ the content type contains 10 site columns and one of them is taxonomy field]. i added this content type in the document library.
    this document library is residing in a team site which is saved as a template and  based on this template i have created sub sites.
    and when i tried to upload a file to the doc lib, it throws me "access denied error".
    what may be went wrong .
    any help is  appreciated!

    Access denied indicates the user account uploading the file doesn't have access to the library, or sometimes it means there's already a document in the library with the same name that was never checked in. It's also possible that your template contains
    custom code that tries to do something that is not allowed.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

Maybe you are looking for

  • Oracle 9i and oracle 10g features

    Looking for some info/link which could help me in understanding the newer features in oracle 9i database and in 10g dbase. Will be good to know the additional features which are in 10g release but not in 9i.

  • ERP 6.0 EHP4 IDES Installation

    Hi, I installed erp 6.0 ehp4 ides abap on a 32-bit win 2003 server following Note 1379040 - IDES ERP 6.0 ECC 6.0 incl. EHP4. The note suggests to install like a system copy changing label.asc and copying all the export files to EXP1 directory . ABAP

  • Include attributes in View criteria which are outside of written query

    I have a select query which is group by on a state column If i use date and status columns in my above query ... then i need to include those in my group by function and my number of rows displayed is increasing based on date and status My use case q

  • Applet can not read from servlet because of java.io.EOFException

    Hi all, i try to communicate my applet with a servlet. i examine lots of codes from internet and i did lots of things to get a working sample but i couldn't sucess on this work for 2 days so if anyone can help me i will be very happy. Anyway, here is

  • Just bought an iphone - blackberry user here...

    OK, I'm a longtime Mac guy, sort of long term Blackberry fan, heavy network engineering type living in an enterprise data environment, but I finally broke down and went iPhone due to the fact it is very easy to connect to my Exchange server. This may