Custom HTML importer/exporter, how to preserve HTML id, class, style

I need to implement a custom XHTML importer/exporter and CSSFormatResolver.
If I for example have a p-element: <p id="p1" class="xyz" style="margin:0.7em; color:#3300FF">lorem ipsum</p>
How do I map the HTML attributes: id, class and style in order to preserve them in the ParagraphElement in order to use them during the custom CSS cascade process and for custom HTML export purposes (the exporter needs to spit out <p id="p1" class="xyz" style="margin:0.7em;  color:#3300FF">lorem ipsum</p> again.
1. is this mapping correct or will this interfere with internal TLF formatting:
HTML attribute
ParagraphElement property
id
id
class
styleName
style
userStyles
2. What is the purpose of FlowElement.coreStyles (where are those styles applied)?
3. What is the actual purpose of FlowElement.userStyles, are those styles just for non TLF (end developer custom) purposes or does TLF use them at any point to set the element format properties?
4. Any other pointers or related (non flex framwork) examples are welcome
Thanks.
Cheers, Benny

Your mapping looks correct to me for id and styleName.
I think what you are saying about style mapping to userStyles is correct.  Yes userStyles is an object of key value pairs holding all the non-TLF styles for a FlowElement.  coreStyles holds all the TLF styles for a FlowElement. TLF does use userStyles itself for the linkHoverFormat, linkActiveFormat and linkNormalFormat styles.
Setting FlowElement.userStyles TLF will replace the current set of userStyles with those in the supplied Object.  That Object will be treated as a dictionary of stylenames and values.
Normally I'd expect you'd use the FlowElement.setStyle API which figures out if a particular style belongs to coreStyles or userStyles and then sets the new style appropriately without changing the others.
Richard

Similar Messages

  • Import/Export - How to get Quick Access Token?

    I am trying to create/submit an import/export job for the azure storage.  I located the place to activate the import/export service in the Preview Features.
    After clicking "Try it Now" button, I am prompted for the subscription name (no problem), but it is also asking for a Quick Access Token". 
    How / Where do I get the Quick Access Token?  There is an article about getting tokens from the API, but that does not appear to be related to my issue.
    Any help is greatly appreciated.
                Windows Azure Import/Export Service         
    Charges may be included
    <label for="subscription-selector">Subscriptions</label>             <select id="subscription-selector"><option selected="selected" value="06608935-fe6f-4336-bc3c-0239aae71ebf">Pay-As-You-Go</option><option
    value="167d8420-6b2f-4764-86a3-2e3b6eb39d18">SDI</option></select>        
    <label for="token">Quick Access Token                </label><input id="token" type="text" value="" />            
    You will receive an e-mail when this feature is enabled for your subscription.

    hi Dwight,
    From error message, I guess your subscription may didn't enable this features. I suggest you contact our azure support team to solve this question.
    SUPPORT CHANNEL:
    Please contact support team by creating a support ticket at http://www.windowsazure.com/en-us/support/contact/
    Or if that doesn't work because you don't have an active subscription you will need to contact general customer support to have them create a support ticket for you
    http://support.microsoft.com/gp/customer-service-phone-numbers?wa=wsignin1.0
    Please try it. Any questions, please let me know free.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • VRF Import/Export - how to filter routes

    Hi,
    Is there another way of filtering the routes you want to import into a vrf because the 'route-target export' and 'route-target import' imports ALL the routes tagged with the given 'asn:xx'. I wanted to have only selected routes imported from one vrf to another. Vrf 'import map' command does not work for me?
    Does filtering makes sense or practical at vrf-vrf level? Where do you use 'import map' command?
    thanks
    resti

    Hi Harold,
    Actually my needs are a little different. Instead of leaking between 2 VRFs, I need to leak to global. Have a default in my VRF that gets imported to global table.
    Goals:
    1. At hub and spoke both sites, let ISP connection run in a separate VRF. Gets a little extra security from internet.
    2. When ISP connection is active, let each site route its traffic out to internet directly. However when the local ISP connection fails, remove the default route that points to ISP so that OSPF learned default from the hub site routes all traffic to hub and puts on internet.
    What's working:
    DMVPN tunnels work fine across INET VRF.
    What's not working:
    1. The IP SLA tracked route leak to global VRF is not working. Traffic doesn't go out to internet directly using local connection.
    I followed following example for this configuration.
    http://www.cisco.com/c/en/us/support/docs/multiprotocol-label-switching-mpls/multiprotocol-label-switching-vpns-mpls-vpns/47807-routeleaking.html
    Any suggestions? Is it possible or supported configuration?
    Below is a diagram of my setup.
    Below is my relevant config snapshot. 2.2.2.1 is actually my another FW in front in the lab that does all NAT and provides internet connection to this lab.
    ip sla auto discovery
    ip sla 1
     icmp-echo 8.8.8.8 source-ip 2.2.2.2
     vrf INET
    ip sla schedule 1 life forever start-time now
    ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/1 2.2.2.1 track 1
    ip route vrf INET 0.0.0.0 0.0.0.0 2.2.2.1
    Lab-RTR#sh ip sla sumary
    IPSLAs Latest Operation Summary
    Codes: * active, ^ inactive, ~ pending
    ID           Type        Destination       Stats       Return      Last
                                               (ms)        Code        Run
    *1           icmp-echo   8.8.8.8           RTT=32      OK          4 seconds ago
    Lab-RTR#sh ip route | in 0.0.0.0
    Gateway of last resort is 10.254.2.99 to network 0.0.0.0
    O*E1  0.0.0.0/0 [110/221] via 10.254.2.99, 00:00:59, Tunnel2
    As you can see, its learning default from Tunnel instead of taking the static default.

  • Import error: File is not a valid HTML DB export file

    Hi,
    This is driving me a bit nuts: I have made a change to a page and want to move it to another HTMLDB environment. I have 3 environments, DEV, TEST and PROD, they are all version 1.6.0.00.87. I export the page from DEV, then when I try and import it into TEST I get an error "File is not a valid HTML DB export file". The file looks OK to me, I have regenerated it several times, I have tried both DOS and UNIX formats, same result. How can I find out the root cause of this issue, I've been able to export/import individual pages without any problems up to now.
    Thanks,
    Steve

    This was tripping me up for a while too. Make sure that the workspace id (1236351 or some such large number) is the same across all environments. You can ensure this by taking a export of the DEV workspace itself from the Admin interface (login to workspace internal) and importing it into TEST and PROD.
    Once the workspace id is the same, you can export/import pages between them without a problem.
    Thanks

  • How to export the report in HTML format for desktop application

    Hi,
    i have wrote the JRC desktop application to export the report and i am able to export it in PDF and other formats as mentioned in "ReportExportFormat" API.
    i would like to know is there any API there which can export the report in HTML format.
    i know it would be possible with web based application of JRC, but how can i do it in desktop application?

    There's no mechanism for static HTML pages that displays the report.
    You can use the CrystalReportViewer DHTML viewer, but that's 'interactive'.
    Sincerely,
    Ted Ueda

  • How to style a custom form that's been inserted as HTML into Muse

    Apologies in advance if something similar already exists, and as a print-based designer I'm likely to use incorrect terminology.
    I've created a basic website that requires a custom form. I've created this form using dreamweaver as it requires a dropdown and a check box. The unstyled html from DW I then insert into Muse via the 'Insert HTML' function, on a page called 'booking form'
    To style it I did the following...
    - Opened the form I created back in DW and added classes to the labels .formname, and added a class to some terms and conditions that sits somewhere in the form and called that .formsubtext
    - Copied all of this code and inserted it back into Muse via Insert HTML
    - The form shows up unstyled as expected
    - I export the site as HTML
    - Go into the exported folder into the CSS, and into the corresponding css file booking-form.css
    - Added some custom CSS styling to reflect the font and colour I wanted to use
    - Re-uploaded those edited files
    - The result was that it rendered the class .formsubtext reflecting the terms and conditions as it should but not all the other labels
    Would someone be able to tell me a better way to style a custom form or point out what I've done wrong.
    Thanks!!!

    If you have structured your HTML markup for the form well using appropriate class and id names, then you can just add corresponding CSS using the <style> element in the "HTML for <head>" section in Page Properites > Metadata.
    You may also choose to add all the CSS in a separate file and add reference to that in the HTML for <head> section and then upload the CSS file in appropriate location after publish.
    Cheers,
    Vikas

  • How to export rpt file to html in java

    Hello.
    Probably this subject appears already but after many hour searching I still canu2019t found how to export rpt file to html. To by clearly I need stream (but html will by good beginning). I won to display this html in my web application (application in IceFaces).
    I joust wno to simply example how to do this export in java.
    ps.Now I see that I should put this post in "Java Development - Crystal"

    Ok. I founded example how to export rpt file to html (but Iu2019m a little disappointed how this was made) I still need example how to export rpt file with image (or chart) to html.
    Do any one know how to do this?
    [Example how to export rpt to html|http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/d09a2df6-3d11-2c10-7fbc-9c2940cdc803]

  • How do i send an html file exported from muse as email blast with images and live links?

    My question it:
    How do i send an html file exported from muse as email blast with images and live links?
    I have designed a "website" in adobe muse and exported it as an html file. I am not sure how to send my .html file in an email!
    Best,
    Nicole

    Unfortunately, the answer is, you don't. The requirements for HTML displayed in an e-mail reader are very different than those for HTML displayed in a browser. The output of Muse won't work as an HTML e-mail. You could upload the Muse site as a website and provide a link to it in an e-mail, but the HTML generated by Muse is not suitable for direct display by an e-mail program.

  • How to aviod html tags from Report column heading while export to csv

    Hi All,
    How to aviod html tags from Report column heading while export to excel.
    We used like Employee<br> Department in column heading, but the problem is the <br> tag also exporting into csv file.
    If any column data 3/2009 formatt the it will exporting as marh 2009.
    Please help on this.
    Thanks,
    Nr
    Edited by: pnr on Jul 5, 2011 5:00 AM

    Hi Nr
    Here is how I approached this problem.
    Go to report attributes tab
    under column attributes check PLSQL radio button.
    Create a function to return the heading of your report as shown below in your database.
    create function get_heading return clob as
    v_request VARCHAR2(20) := V('REQUEST');
    v_col_heading CLOB;
    begin
    IF INSTR(v_request,'FLOW_EXCEL_OUTPUT',1) > 0 THEN
    v_col_heading := 'Employee Number:Employee Name';
    ELSE
    v_col_heading := 'Employee breaktag Number:Employee break tag Name';
    END IF;
    return v_col_heading;
    end;
    Type the function below under ( Function returning colon delimited headings:) as follows.
    return get_heading;
    Similarly for data base it on PLSQL function body returning SQL and follow the same approach as headings.
    Hope this helps.
    Thanks
    Sukarna
    Edited by: user513776 on Jul 5, 2011 2:24 PM
    Edited by: user513776 on Jul 5, 2011 2:27 PM

  • How to Export InDesign Interactivities into HTML 5 without converting it through any tool?

    I created some simple InDesign Interactivities like Drag and Drop, Text Input Fields, Drawing, Multiple check box, Radio selection, Drop Down etc.
    When i export that interactivities in HTML, It will give me output of HTML page with interactivity in flash file. I expect that interactivities JavaScripts, CSS files. I also refer other suggestions on Adobe InDesign forum like below
    1. http://forums.adobe.com/message/4962514
    2. http://forums.adobe.com/message/4447318#4447318
    3. http://forums.adobe.com/message/4907133#4907133
    They suggested Export interactivities into .fla/.swf and Convert it into javascript and Css using some online tolls like wallaby or Swiffy.
    Is there any direct way available in InDesign that will give me proper HTML output with JavaScript and CSS that also compatible with devices like iPad, iPhone, Smartphones and other mobile devices?

    They suggested Export interactivities into .fla/.swf and Convert it into javascript and Css using some online tolls like wallaby or Swiffy.
    Last I checked Swiffy and Wallaby have limited ActionScript capabilities—they work best with simple timeline animations. I doubt you'd have much sucess converting ID .swf exports.

  • NEED HELP! How do I export UTF-8 encoded HTML to PDF?

    Right now my HTLM to output is in Japanese, and encoded in UTF-8 format.
    I tried to use html_entity_decode(), however that does not work, all I get are a bunch of weird characters.
    If anyone have any experience with exporting UTF-8 encoded HTML in Japanese or any foreign glyph-like language to PDF, please help me on this.

    Ellis home wrote:
    In File/Document Setup do you have bleed set to 0?
    Yeah.
    [Jongware] wrote:
    What are 'the obvious export settings'? You are looking at these as well?
    Right. Export > Marks and Bleeds. (I was posting from my phone and couldn't check InDesign to see what it was called.) Those are my settings, at any rate.
    With its default settings, there are no 'blue' bleed lines. You may have changed its color (this can be done in Preferences), or you may mistake the default Purple of margins for blue, or you may mistake any empty frame for 'bleed' (as the default 'new layer' color is blue). Or maybe someone did draw a blue frame to act as 'Bleed' -- but calling it that is not going to work. InDesign can only use its own kind of Bleed, the one you set up in Page Size, that displays outside of the Document Page, and that you can switch off in the PDF Export dialog
    Sorry, I was wrong about about the colour, too. I need it to be cropped to the line I have circled in red - it's the innermost border.

  • How i can write a plug in for ai cs6 in c# for import/export of web type document

    can i write a plug in c#(or any other language) for import/export  a screen of the adobe illustrator cs6 in html (or any other format) if document of web type.

    If I understand you correctly, yes, you could write a plugin that imported an HTML file into Illustrator. You could also write one that exported to HTML. I'm not sure how easy it would be, and you won't find any HTML parsing help in the Illustrator SDK, but it's quite easy to create artwork with the SDK.

  • Keep exported image size in HTML as shown in PDF

    I have many inline formulas (imported from Word file via using mathtype) in PDF article made by ID. But when I export the articles as HTML, the images for formulas become much larger than shown in PDF version. How can i keep the exported images to the same size as they are shown the PDF file? I know I can edit the html file to specify image size, but that is the ideal work flow.
    Thank you.

    Hi Eric,
    If i'm getting you right. you have the formulas placed as the images.
    So, to keep the size fixed, In HTML export Options in image tab keep the image size as fixed.
    Snapshot to refer:
    Now you have image of same size as it appears in InDesign.

  • Apply formatting in a JEditorPane and export the content in HTML.

    Hi,
    I'm writing, a program to allow the user to enter a formated text and even add images in a JEditorPane.
    Here is a simple sample of the code:
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.*;              //for layout managers and more
    import java.awt.event.*;        //for action events
    import java.net.URL;
    import java.io.IOException;
    public class EditorPane extends JPanel{
        private String newline = "\n";
        private JPanel buttonPanel;
        private JPanel textPanePanel;
        private JEditorPane myEditorPane;
        private JButton boldButton;
        private JButton colorButton;
        private JButton imgButton;
        private JButton saveButton;
         public EditorPane() {
            createGUI();
        private void createGUI() {
            buttonPanel = new JPanel();
            boldButton = new JButton("Bold");
            boldButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    boldButtonActionPerformed(evt);
            colorButton = new JButton("Color");
            colorButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    colorButtonActionPerformed(evt);
            imgButton = new JButton("Image");
            imgButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    imgButtonActionPerformed(evt);
            saveButton = new JButton("Save");
            saveButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    saveButtonActionPerformed(evt);
            buttonPanel.setLayout(new GridLayout(1, 4));
            buttonPanel.add(boldButton);
            buttonPanel.add(colorButton);
            buttonPanel.add(imgButton);
            buttonPanel.add(saveButton);
            textPanePanel = new JPanel();
            textPanePanel.setLayout(new BorderLayout());       
            myEditorPane = this.createEditorPane();
            JScrollPane paneScrollPane = new JScrollPane(myEditorPane);
            textPanePanel.add(paneScrollPane, BorderLayout.CENTER);
            this.setLayout(new BorderLayout());
            this.add(buttonPanel, BorderLayout.NORTH);
            this.add(textPanePanel, BorderLayout.CENTER);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                     JFrame frame = new JFrame("TextSamplerDemo");
                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   EditorPane newContentPane = new EditorPane();
                    //newContentPane.setOpaque(true); //content panes must be opaque
                    frame.setContentPane(newContentPane);
                    frame.pack();
                    frame.setSize(300,300);
                    frame.setVisible(true);
    private JEditorPane createEditorPane() {
            JEditorPane editorPane = new JEditorPane();
            editorPane.setEditable(true);
            java.net.URL helpURL = TextSamplerDemo.class.getResource(
                                            "simpleHTMLPage.html");
            if (helpURL != null) {
                try {
                    editorPane.setPage(helpURL);
                } catch (IOException e) {
                    System.err.println("Attempted to read a bad URL: " + helpURL);
            } else {
                System.err.println("Couldn't find file: simpleHTMLPage.html");
            return editorPane;
        private void boldButtonActionPerformed(java.awt.event.ActionEvent evt) {
        System.out.println("boldButtonNextActionPerformed");
        //myEditorPane
            // TODO add your handling code here:
        private void colorButtonActionPerformed(java.awt.event.ActionEvent evt) {
        System.out.println("colorButtonActionPerformed");
            // TODO add your handling code here:
        private void imgButtonActionPerformed(java.awt.event.ActionEvent evt) {
        System.out.println("imgButtonActionPerformed");
            // TODO add your handling code here:
        private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {
        System.out.println("saveButtonActionPerformed");
        String newStr = new String("this is the new String");
        //newStr.setFont(new java.awt.Font("Tahoma", 0, 14));
        this.myEditorPane.replaceSelection("sdfsdfsd");
            // TODO add your handling code here:
    }and the HTML Code of simpleHTMLPage.html is
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <p>Simple text</p>
    <p><strong>Bold text</strong></p>
    <p><em>Italic text</em></p>
    <p align="center">Center text</p>
    <p><font color="#000099"><strong>Color text</strong></font></p>
    <p>image here : <img src="images/Pig.gif" width="121" height="129"></p>
    <p> </p>
    </body>
    </html>By pressing the Save button I can change the selected text.
    I don�t know the way to get and apply the format (size, color �) to only the selected text and display the selected image in real time in the EditorPane. Like if you press the Bold button, the selected text font will be change to bold.
    I would like to get or save the HTML code of the content of the EditorPane by pressing the Save button, How to make it?
    I can apply the formatting on the selected text in a JTextPane, but I don't know the way to save or export the content in HTML. By doing that it could fix my problem too.
    So any help to do that will be much appreciated.
    Thanks.

    Hi,
    Tks for your answer. That one I can do it. I would like to display the selected text in bold instead of adding the tag in the JEditorPane. If I get you right, you get the hole content of the JEditorPane and save it. How did you get it ? And before saving that in the database, did you fing the keysWord to convert the HTML tag in the corresponding entities ?
    Bellow you have a sample of code to make the formatting in the JTextPane.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.text.*;
    import javax.swing.text.Highlighter;
    import javax.swing.event.*;
    import java.util.*;
    import javax.swing.text.*;
    import javax.swing.text.BadLocationException;
    public class MonJTextPane extends JFrame implements CaretListener, ActionListener
              *     Attributs :
         private JTextPane monTextPane;
         private JLabel monLabel;
         private JButton monBouton;
         private StyleAide style; // class qui defini les effets de style de l'editeur
              *     Constructeur :
         public MonJTextPane ()
         {     super ("Aide");
              // construction du composant Texte
              this.style = new StyleAide (new StyleContext ());
              this.monTextPane = new JTextPane ();
              this.monTextPane.setDocument (style);
              this.monTextPane.addCaretListener (this);
              // construction de la fenetre :
              this.getContentPane ().setLayout (new BorderLayout ());
              this.setBounds (150,150,600,550);
              this.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
              this.monLabel = new JLabel ("Auncune ligne saisie...");
              this.monBouton = new JButton ("change de style");
              this.monBouton.addActionListener (this);
              JPanel panel = new JPanel ();
              panel.setLayout (new GridLayout (1,2));
              panel.add (monLabel);
              panel.add (monBouton);
              this.getContentPane ().add (panel, BorderLayout.SOUTH);
              this.getContentPane ().add (this.monTextPane, BorderLayout.CENTER);
              this.setVisible (true);
              *     Methodes :
         private int getCurrentLigne ()
         {     return ( this.style.getNumLigne (monTextPane.getCaretPosition ())+1 );
         public int getCurrentColonne ()
         {     return ( this.style.getNumColonne (monTextPane.getCaretPosition ())+1 );
              *     Methodes CaretListener:
         // ecoute les deplacements du curseur d'insertion
         public void caretUpdate(CaretEvent e)
         {     int debut = java.lang.Math.min (e.getDot (), e.getMark ());
              int fin   = java.lang.Math.max (e.getDot (), e.getMark ());
              this.monLabel.setText ("Ligne numero : "+ this.getCurrentLigne ()+" Colonne : "+this.getCurrentColonne ()+" (debut : "+debut+", fin : "+fin+")");
              *     Methodes ActionListener:
         public void actionPerformed (ActionEvent e)
         {     int start     = monTextPane.getSelectionStart();
              int end          = monTextPane.getSelectionEnd();
              int debut     = java.lang.Math.min (start, end);
              int fin          = java.lang.Math.max (start, end);
              int longueur= fin - debut;
              this.style.changeStyleSurligne (debut, longueur);
         // lance le tout ....
         public static void main (String argv [])
         {     new MonJTextPane ();
    // la Classe DefaultStyledDocument correspond a la classe utilise comme Model pour les
    // composant Texte evolue comme : JTextPane ou JEditorPane
    // en derivant de cette derniere nous pouvons donc redefinir les methodes d'insertion afin de personnalise
    // le style d'ecriture en fonction du texte et creer une methode permettant de modifier le style utilise pour
    // une partie de texte deja ecrite.
    class StyleAide extends DefaultStyledDocument
              *     Constructeur :
         public StyleAide (StyleContext styles)
         {     super (styles);
              initStyle (styles);
              *     Methodes :
         // redefini pour choisir l'effet de style a utiliser
         public void insertString(int offs, String str, AttributeSet a) throws BadLocationException
         {     try
              {     // si le texte insere est egale a HELP le texte s'ecrit avec le style "styleOp"
                   if ( str.equals ("HELP") )
                   {     super.insertString (offs, str, getStyle ("styleOp"));
                   else // sinon le texte est ecrit avec le style "styleNormal"
                   {     super.insertString (offs, str, getStyle ("styleNormal"));
              catch (BadLocationException e)
              {     System.out.println ("Tuuuttt erreur Insere");
         // modifie le style d'ecriture d'un texte deja ecrit compris
         public void changeStyleSurligne (int positionDepart, int longueur)
         {     setCharacterAttributes (positionDepart, longueur, getStyle ("styleKeyWord"), true);
         // le Model d'un composant texte est enregistre sous form d'un arbre
         // cette methode permet de recuperer le noeud root de l'arbre
         private Element getRootElement ()
         {     return this.getDefaultRootElement ();
         // methode permettant d'obtenir la ligne correspondant a un offset donnee
         public int getNumLigne (int offset)
         {     Element eltR = getRootElement ();
              int numLigne = eltR.getElementIndex (offset);
              Element elt  = eltR.getElement (numLigne);
              if ( offset != elt.getEndOffset () )
              {     return numLigne;
              else
              {     if ( numLigne != 0 )
                   {     return numLigne+1;
              return 0;
         public int getNumColonne (int offset)
         {     Element eltR = getRootElement ();
              Element elt = eltR.getElement (eltR.getElementIndex (offset));
              int numColonne = offset-elt.getStartOffset ();
              return numColonne;
         // Defini les differents styles
         private static void initStyle (StyleContext styles)
         {     // definition du style pour le texte normal (brute)
              javax.swing.text.Style defaut = styles.getStyle (StyleContext.DEFAULT_STYLE);
              javax.swing.text.Style styleNormal = styles.addStyle("styleNormal", defaut);
              StyleConstants.setFontFamily (styleNormal, "Courier");
              StyleConstants.setFontSize (styleNormal, 11);
              StyleConstants.setForeground(styleNormal, Color.black);
              javax.swing.text.Style tmp = styles.addStyle("styleKeyWord", styleNormal);
              // Ajout de la couleur blue et du style gras pour les mots cle
              StyleConstants.setForeground(tmp, Color.blue);
              StyleConstants.setBold(tmp, true);
              tmp = styles.addStyle("styleOp", styleNormal);
              // Ajout de la couleur rouge pour le style des operateurs
              StyleConstants.setForeground(tmp, Color.red);
    }But it hard for me to convert it in the corresponding HTML document.
    Did you have and idea
    Tkks

  • Insert HTML and export to PDF problem (ID CS6)

    Greetings,
    A new feature in Indesign CS6 is to insert HTML snippets in an Indesign document via the Object > Insert HTML option.
    This will insert a frame in the page containing the rendered HTML content.
    There are several issues that I have encountered using this feature in Indesign CS6. Can anyone advise if these are bugs/ux issues and provide any alternatives/solutions.
    1) After inserting any HTML content (even the default "This is an HTML snippet"), when I try to export to PDF format (Interactive or Print), the  HTML content or rather its frame container is rendered in black. I've noticed that the HTML content is exported as a image so all I get are black rectangles.
    There is no problem when I try to export to HTML format.
    2) There seems to be a paste size limit in the Insert HTML text area/field as I can only paste 16566 characters of HTML code. (Haven't checked yet if the limit is in characters or tags or newlines).
    3) How can you set such that the HTML object frame will span multiple pages for cases where the HTML content is larger than the height of the page? Since it is not a text frame, I can't find a threading feature or a possible workaround. Or is the "Insert HTML" feature not really applicable for PDF export workflows but only for epubs?
    Thanks

    Oh ok. I guess direct HTML import is still not possible in ID CS6 (either import as XML or convert to DOC/RTF) for PDF export.
    Thanks

Maybe you are looking for