Creating RTF file

Hi all,
We are trying to send a RTF file (with images) in the response. For this, first a RTF file has to be generated at server and then written to the response. How can we write a file in RTF format (with images)?
Can anybody throw some light please?
Regards,
Mohan

Hello,
Maybe these will help:
http://www.jfor.org/
http://xml.apache.org/fop/
http://jakarta.apache.org/ecs/
Cheers,
Kare

Similar Messages

  • Got problems with creating RTF-files after OSX update

    Hi
    I don't know if this is really a MAC OS problem, but it occurred after I updated to 10.5.2 - so it's a likely suspect.
    Since the update I can't create RTF-files any more with Final Draft, my script writing program. A file is created, but when I try to open it I get an error message that it cannot be found. But the file is there: I can see it and click on it. It just won't open.
    Only today now I got the same error message with a doc-file I downloaded some months ago.
    The only big change I lately made to my Mac was the update to 10.5.2 and I got the new Office 2008 (both are the German versions). Could the problem come from either of them? I contacted Final Draft's support - they didn't know of the problem.
    Maybe someone else in this forum has encountered similar problems?

    Have you tried to Repair Permissions using Disk Utility?
    1. Open Disk Utility in your Applications/Utility folder.
    2. Click on the icon for your boot volume.
    3. Click on the First Aid tab and select Repair Permissions
    4. Click the repair permissions button.
    This is the first thing to try whenever any program goes wonky. It's free, but takes awhile for all the files that have to be checked and changed.

  • Xml publisher enterprise!!! create rtf file dynamically with load xml data

    i am new to xml publisher enterprise , i want a solution for this question ...
    i want create rtf file dynamically with loading xml data....means i wrote a program in jsp where the the output in xml file simultaneously create rtf file..but i enable load the xml data in rtf file but when i goto rtf file from where data in that load xml then it genrate the columns..but i want in dynamiclly to load the data will you please guide me ......

    Hi Atiq
    Im not quite clear on the requirement here:
    1. Do you just want to be able to extract the data and apply a template to the XML data from your jdp and render output?
    If so then you can use the XMLP APIs ... the are in the user guide. Particularly:
    RTFProcessor - converts RTF template to XSLFO stylesheet
    FOProcessor - takes, XML data, XSLFO stylesheet and output format and generates the required output.
    2. Do you want a template that will accept any data and just format it into rows and columns ? This can be written but your XML structure is going to have to be static, the data of course can be dynamic.
    Regards, Tim

  • Create rtf file, open in textedit

    i am very new to applescript, if anyone would have mercy, please respond.
    i am trying to create a script that will create a rich text file named by the date (in format of YY.MM.DD for purposes of sorting alphabetically) and open this file for edit in textedit. Preferably, I would like to be able to create a file named by date followed by a short description (for example, activate script - it asks for a summary and then creates a file named by date followed by a summary (for example "07.12.28 - this is an example") and opens that file in textedit.app for editing).
    i worked a lot with iptscrae but it's been a long time...and was nothing like this.
    edit: please note, i've had trouble with spaces in scripts when it deals with file names (date - summary)
    Message was edited by: eightyfiveonions
    Message was edited by: eightyfiveonions

    This is your script after I altered it a bit (and as you'll see it's for the purposes of journaling)
    I'm not sure exactly why I moved the current date and return instructions back to the bottom here but that's what I had to do to get it to work. I'm a trial and error learner more than anything else, I'm going to read up on this a bit but it's working like a charm.
    I guess it was because I set TheText variable back up for the RTF formatting and couldn't figure out how to incorporate the date there.
    edit: the formatting on this post is a bit messed up.. your rtf formatting stuff is moved from location in first script to accommodate the second script but nothing else is different about it. shrugs
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">-- get the current date text
    tell (current date) to get ((its year) * 10000 + (its month) * 100 + (its day)) as text -- yyyyMMdd
    tell the result to set TheDate to text 3 thru 4 & "." & text 5 thru 6 & "." & text 7 thru 8 -- yy.mm.dd
    set TheFolder to "OSX:Users:joseph:Documents:Journal:" -- or set TheFolder to (choose folder)
    set TheName to text returned of (display dialog "Enter the name for the new document:" with title "New text document" default answer TheDate & " - " buttons {"Cancel", "OK"} default button "OK")
    set TheFile to (TheFolder & TheName & ".rtf") as text
    set TheText to "{\\rtf1\\mac\\ansicpg10000\\cocoartf824\\cocoasubrtf440
    {\\fonttbl}
    {\\colortbl;\\red255\\green255\\blue255;}
    \\margl1440\\margr1440\\vieww9600\\viewh8400\\viewkind0
    try -- create a new text document
    tell application "System Events" to get exists of file TheFile
    if not (the result) then
    set TheOpenFile to open for access TheFile with write permission
    write TheText to TheOpenFile as «class utf8» starting at eof
    close access TheOpenFile
    else
    display alert "The file \"" & TheFile & "\" already exists" as critical
    error
    end if
    on error
    try
    close access TheOpenFile
    end try
    return
    end try
    tell application "Finder" to set extension hidden of (TheFile as alias) to true
    tell application "TextEdit" -- open the file and print date
    activate
    open file TheFile
    set the text of document 1 to ((current date) as text) & return
    end tell</pre>
    Unless u see any errors with what I've done, I'm going to run with it.
    Message was edited by: eightyfiveonions

  • Applescript - Create RTF File in Last Selected Finder Folder

    QUERY: As a fit-for-purpose Applescript user, I try to customize posted scripts (thanks to sharers who do the heavy lifting) to suit my needs. Someone posted a great Applescript for creating an RTF file, but I want one modification:  rather than having to declare/designate a folder in which to place the new RTF, I want it to create the new file in the active Finder file.  Interestingly enough, I also have an Appscript which, in fact, will create a TXT file (not RTF) in the active Finder file. How to take the desirable bit from the latter and working it into the former, I cannot figure. (More times than not, I can successfully blend scripts, but not so this time. I have hit something that requires expert help.)
    REFERENCE MATERIAL: First, the current Applescript for creating an RTF. Then, for reference, the Applescript for creating the TXT.
    Kind regards,
    Obenreizer
    =========start RTF creation applescript==========>
    tell (current date) to get ((its year) * 10000 + (its month) * 100 + (its day)) as text -- yyyyMMdd
    tell the result to set TheDate to text 3 thru 4 & "." & text 5 thru 6 & "." & text 7 thru 8 -- yy.mm.dd
    -- QUERY: CAN THIS BE CHANGED TO THE ACTIVE FINDER FOLDER?
    set TheFolder to choose folder
    -- or can assign a specific "path" (including quotation marks)
    set TheName to text returned of (display dialog "Enter the name for the new document:" with title "New text document" default answer TheDate & " - " buttons {"Cancel", "OK"} default button "OK")
    set TheFile to (TheFolder & TheName & ".rtf") as text
    set TheText to "{\\rtf1\\mac\\ansicpg10000\\cocoartf824\\cocoasubrtf440
    {\\fonttbl}
    {\\colortbl;\\red255\\green255\\blue255;}
    \\margl1440\\margr1440\\vieww9600\\viewh8400\\viewkind0
    try -- create a new text document
        tell application "System Events" to get exists of file TheFile
        if not (the result) then
            set TheOpenFile to open for access TheFile with write permission
            write TheText to TheOpenFile as «class utf8» starting at eof
            close access TheOpenFile
        else
            display alert "The file \"" & TheFile & "\" already exists" as critical
            error
        end if
    on error
        try
            close access TheOpenFile
        end try
        return
    end try
    tell application "Finder" to set extension hidden of (TheFile as alias) to true
    tell application "TextEdit" -- open the file and print date
        activate
        open file TheFile
        set the text of document 1 to ((current date) as text) & return
    end tell
    <=========end RTF creation applescript==========
    =========start TXT creation applescript==========>
    tell application "Finder"
        try
            set fileName to "untitled"
            set fileExt to ".txt"
            set thisFolder to the target of the front window as alias
            tell application "System Events"
                set fileList to get the name of every disk item of thisFolder
            end tell
            set newFile to fileName & fileExt
            set x to 1
            repeat
                if newFile is in fileList then
                    set newFile to fileName & x & fileExt
                    set x to x + 1
                else
                    exit repeat
                end if
            end repeat
            make new file at thisFolder with properties {name:newFile, file type:"TEXT", creator type:"ttxt"}
            --{TO HIGHLIGHT CREATED FILE:  select one one of the next three choices}
            --select (every file of target of front window whose name contains "untitled")
            --select (first file of target of front window whose name contains "untitled")
            select (last file of target of front window whose name contains "untitled")
        on error errMsg
            display dialog (errMsg)
        end try
    end tell
    <=========end TXT creation applescript==========

    Well, copy the above file into this file where the files is created.  See my comments.
    =========start TXT creation applescript==========>
    tell application "Finder"
        try
            set fileName to "untitled"
            set fileExt to ".txt"
            set thisFolder to the target of the front window as alias
            tell application "System Events"
                set fileList to get the name of every disk item of thisFolder
            end tell
            set newFile to fileName & fileExt
            set x to 1
            repeat
                if newFile is in fileList then
                    set newFile to fileName & x & fileExt
                    set x to x + 1
                else
                    exit repeat
                end if
            end repeat
    -- Here is the line where the text file is create.  it is in folder thisFolder  seems the name is in newFile.
            make new file at thisFolder with properties {name:newFile, file type:"TEXT", creator type:"ttxt"}
            --{TO HIGHLIGHT CREATED FILE:  select one one of the next three choices}
            --select (every file of target of front window whose name contains "untitled")
            --select (first file of target of front window whose name contains "untitled")
    -- don't know what this line is doing, but I suppose it is highlight the new file since it is named untitled.txt
            select (last file of target of front window whose name contains "untitled")
        on error errMsg
            display dialog (errMsg)
        end try
    end tell
    <=========end TXT creation applescript==========

  • View the .rtf file not display the data in BI Publisher Enterprise.

    Hi,
    Platform: OBIEE 10g in NT XPsp2
    View the .rtf file not display the data in BI Publisher Enterprise.
    Step 1, I created Answer-request, create .rtf file with Word and add the request name, Add bar chart and table, preview PDF is working fine with data, Upload this template to Answers, View Template from Answer is working fine with data.
    Step 2, Answers – More Products > BI Publisher > My Folders > Create a new report > Edit > Data Model > New > Type: SQL Query > Data Source: Oracle BI EE > Query Builder > from SupplierSales assign Customer, Periods, Sales Facts (select Region, state, Year, Units Shipped) > Results > Save > Save
    Click Layouts > New > enter Name ….. > Click Layouts > borrows .rtf file in Manage T file > Upload > Save > Click View
    It is showing only the .rtf file without data. Why there is no data?
    Please guide me to solve this issue.
    Thanks,
    Jo

    Thanks for you reply,
    Our scenario is this report is basically a dissconnected mode report... we are developing these reports for mobile clients.
    We dint face this kind of issue while developing other reports.
    So please let us know if you have any idea on why we are facing this issue.
    Regards,
    Maneesh

  • Basic question, how to create rtf template with a given xml file

    Hello guys
    I am new to BI publisher and I am learning how to create rtf templates using given xml fiel definitions by following the bi publisher guide
    The steps I am following is:
    1, create template using template builders, which is downloaded into MS words.
    2, In the empty template, map the xml columns with template field using BI publisher tag
    3, upload the template to BI Publisher as a layout.
    That's all I can understand.
    My question is:
    1,in which above step do I import XML file into template builder (if not bi publisher), how to do so?
    2,After template is created, how to associate this template layout with existing reports in BI Publisher, or is it necessary at all?
    3,In the template content in MS Word template builder, what should I enter other than BI publisher tags for mapping XML field to desired template field
    Or, if my understand of this process is entirely wrong, what's the right process of creating rtf template with a given XML file definition
    Thanks

    If you have a BI Publisher desktop installed, have a look a the demos,.. should answer most of your basic questions.
    (Windows) Start->Programs->Oracle BI Publisher Desktop->Demos
    Invoice Demo - good one for those with E-Business Suite
    Report Demo - Sample using BI Publisher

  • I can't open rtf files created using the 'touch' command in Terminal

    I don't know much about CLI but I like to play with my tech. When I create an RTF file using
    touch foo.rtf
    it creates the file but when I try and open it, it just says "The document “foo.rtf” could not be opened."
    What's the deal?

    Answered Here on StackOverflow:
    As you've likely discovered, touching a nonexistent file will create a zero-byte file with the name you specify. (touch is also used to update the modification time on an existing file. Seeman touch for further details.)
    The problem you're running into is that though a completely empty file is valid HTML, text, or Markdown, it is not valid RTF—this is true of many file formats, actually, which are structured in a particular way and require some data to be present be valid.
    Based on my experimentation, the bare minimum RTF file appears to be
    {\rtf1}
    If you'd like to create a blank RTF file from the shell, try this:
    echo '{\rtf1}' >Foo.rtf
    Note the above will overwrite Foo.rtf if it exists.
    Thank you user Zigg

  • RH 7 creates impossibly large RTF file

    I'm trying out RH 7 on XP, using Word 2003. It works fine for
    small files. When I try to import a large (27 MB) Word file with
    many graphics, RH creates an RTF file that is 2.1 GB. I don't have
    the time to wait to see if Word can save it. Is there a workaround
    for this?

    Here's a more detailed description of what I see; perhaps it
    will evoke some response.
    1. In RoboHelp for Word, I import a large Word document,
    saving it in the project directory.
    2. I am asked whether I also want to save the document
    template. I do.
    3. Graphics are converted.
    4. The "Converting style to topic" message appears repeatedly
    until Word runs out of memory. I am warned that no "undo" will be
    possible; I answer "Yes" to proceed anyway.
    5. The conversion apparently proceeds. But a check of CPU
    usage says there’s nothing happening. I must cancel both Word
    and RoboHelp.
    Left behind is the .doc file (which was a huge 27 MB) and the
    .rtf file RoboHelp created (which is 77 times bigger still).
    Bruce

  • Creating .RTF output files - PI7.0  Receiver file adapter

    Hi Experts,
    I am currently facing an issue with the Receiver File adapter where in the output files are required to be of the format of .RTF (Rich Text Format).
    The scenarios is an outbound proxy from SAP ABAP  - >  PI 7.0 ->  .RTF File
    All the data required to be present in the file will be coming in the source structure
    Can the File Receiver Adapter handle this ?
    Is there a way to generate Files with extension .rtf ??
    It is a requriement since the output files will be used as Reports , and so the desired format.
    I am unsure if I will have to use XSLT mapping , in this because i am new to that , Kindly let me know how to go about it ,. any links or pointers on how to achieve the same will be welcome.
    thanks
    Dev
    Edited by: sd on Feb 17, 2010 8:23 AM

    Thanks for your reponse Praveen
    Can you please let me know how can i put the extension as .rtf for the output files i am generating ??
    as far as the formatting is concerned ... it is like ... the header needs to be  of a particular Font , a particular font size , bold etc and  so is the case for line items
    I am unsure if it is possible using an Adapter module  as well
    thanks
    Dev

  • Unable to combine microcsoft word or rtf files when creating a .pdf

    We cannot add microsoft word or .rtf files when trying to combine them into a single .pdf file..
    When you click on Add files..the word or .rtf files are greyed out and you
    cannot select them..
    We are using Mountain Lion OS (ltatest version) and adobe acrobat version 10.1.5

    Before Acrobat XI, it was only possible in Windows, not on a Macintosh.
    http://indesignsecrets.com/new-acrobat-xi-and-reader-xi-can-change-workflows.php
    "In previous versions of Acrobat, Mac users were stymied when you wanted to open a Microsoft Word, PowerPoint, or Excel file into Acrobat to convert it to PDF, or to include these files when combining documents together. Now, if you have Microsoft Office installed on your Mac, you can include these files. (There are still no PDF Maker plug-ins installed on the Mac, and hyperlink and bookmark export from Word is not yet supported.)"

  • Creation of .RTF file in java

    Hi,
    I want to create/edit .RTF file through java application. In my RTF file, I should be able to edit data(formatting), inserting tables. This is already done. Now I want to create chart (like pie-chart) using java. I searched the net for the last couple of days but I couldn't get the proper help. I can do that in SWING but its of no use.
    can anyone help me in this?
    Thanks & Regards,
    mrP

    Hi,
    Can someone please point me in the right direction? I'm trying to create an RTF file from data in a database, so I have no need to use JTextPanel or any GUI components. I've been trying to use the RTFEditorkit with a DefaultStyledDocument, but can only manage to insert one line into the document(!) Does anyone have any suggestions or examples that would explain how to do this?
    Any ideas would be appreciated.
    Thanks in advance,
    Gillian

  • Import template defined in rtf file to another rtf file in BI Publisher

    I have two RTF files:
    (1) summary.RTF
    (2) detail.RTF
    detail.RTF has template named “subreport” with following syntax:
    <?template:subreport?>
    <?end subreport?>
    I am importing and calling this template in summary.RTF.
    <?import:file:///C:/Hitesh/Work/detail.rtf?>
    & <?call-template:subreport?>
    The report is working fine with template builder (like in Word “Load XML” and then preview and two RTF files are at my local machine).
    Now,
    I have created one report in BI Publisher(10.1.3.2) named “Summary” in folder named “Test” to deploy my report.
    I have uploaded these two RTF to BI Publisher with name (1) summary & (2) detail.
    But it’s not showing the report because of invalid import syntax.
    I have tried following syntaxes for import,
    <?import:http://bipapp:7777/xmlpserver/~development/Test/Summary/Summary.xdo?_xt=Detail?>
    <?import:xdo:Detail.rtf?>
    <?import:http://bipapp:7777/xmlpserver/~development/Test/Summary/Detail.RTF?>
    But it’s not working.
    Clearly the problem is in the import syntax.
    Can anyone please help me to correct the import syntax?

    Hi Tim,
    Below is the URL when I enter in browser, it is asking for download "Detail.rtf".
    <?import:http://10.253.80.59:15101/xmlpserver/servlet/res?t=bin&f=/TestReport/StatementSummary/Detail.rtf?>
    so, i have placed this URL in Summary.RTF.
    Still it's giving error--> "Caused by: java.util.EmptyStackException"
    If I remove the import and call to "subreport" template, then summary is displaying wihout detail part. Further if I run Detail.RTF then it is also running individually.
    Now, I am thinking that the problem is with "?" (question mark symbol) in URL, so, I have tried another like below:
    <xsl:import href="http://10.253.80.59:15101/xmlpserver/TestReport/StatementSummary/StatementSummary.xdo?_xt=Detail"/>
    Here the url:
    http://10.253.80.59:15101/xmlpserver/TestReport/StatementSummary/StatementSummary.xdo?_xt=Detail
    If i execute this url in browser then it is rendering the Detail.rtf.
    This is also not working, it's giving following exception:
    "Caused by: oracle.xdo.parser.v2.XMLParseException: End tag does not match start tag 'SCRIPT'."
    Thank you,
    Hitesh
    Message was edited by:
    htshekhada
    Message was edited by:
    htshekhada

  • Could not overwrite rtf file on report template in BI Publisher

    Hi All,
    I want to upload the rtf file for Bi publisher report. There is already an rtf file and I have edited the file and want to overwrite it . It shows that the only way is to delete the template and again
    create the template by uploading the rtf file. I tried to overwrite the existing template with edited rtf but it shows the error. Is there any other options rather than deleting the template and uploading again for edited rtf file.
    Thanks,
    Virat

    Hi,
    it seems, sometimes everyone would like to draw a vertical reference line at the data date of a line chart, so I would like to bring this thread up again.
    I assume, that there is no vertical reference line on line, bar or area charts, because of the following reason: The vertical reference line is made for X1Axis; that's why it's called X1ReferenceLine. Line, bar and area charts don't have any X1Axis, but a O1Axis (ordinal axis):
    from Graph.dtd: "
    <!-- Ordinal axis on bar, line, area graphs-->
    <!ELEMENT O1Axis EMPTY >
    <!-- Horizontal data axis on bubble and scatter graphs; center point in
         polar graph-->
    <!ELEMENT X1Axis (ViewFormat?) >
    There is no such thing as <!ELEMENT O1ReferenceLine EMPTY > in Graph.dtd.
    Is there any other solution, why it seems not to be possible, to draw a vertical reference line on line charts?
    Kind regards,
    Tobias
    ps: Regarding the difference between X-Axis and ordinal axis, I take the explanation from http://goorman.free.fr/ZedGraph/zedgraph.org/wiki/index1240.html?title=What_does_%27Ordinal%27_mean%3F .

  • How to include preset in RTF import option while importing RTF files?

    Dear all,
    I created a script which will place text from rtf files present in a folder to an active document on different page based on match. I am using a preset name "myRTF" which i will use when i import rtf files without script.
    Is there a way to include this preset in script?
    I have checked many places....... but did not found.
    #target Indesign
    var myDoc = app.documents.item(0);
    var sourceFolder = Folder("/Users/admin4/Desktop/ec_txt");
    myFiles = sourceFolder.getFiles("*.rtf");
    var myFrame1 = myDoc.pageItems.itemByID(111076);  // switerland
    var myFrame2 = myDoc.pageItems.itemByID(111114);  // eurozone
    var myFrame3 = myDoc.pageItems.itemByID(111146);  // germany
    for (var i=0; i < myFiles.length; i++)
        switch (myFiles[i].name.slice (6, myFiles[i].name.lastIndexOf("_")))
            case "Switzerland_en":
            myFrame1.parentStory.insertionPoints.item(-1).place(File (sourceFolder + "/" + myFiles[i].name))
            break;
            case "Eurozone_en":
            myFrame2.parentStory.insertionPoints.item(-1).place(File (sourceFolder + "/" + myFiles[i].name))
            break;
            case "Germany_en":
            myFrame3.parentStory.insertionPoints.item(-1).place(File (sourceFolder + "/" + myFiles[i].name))
            break;

    Hi Dave, Peter,
    thanks for your reply. In that case i will check WordRTFImportPreference but not sure if customize style import can be done for paragraph style sheets.
    for example: word has "normal" and "head1" style but i want to map to indesign Body_light and H1 styles respectively.
    Virender

Maybe you are looking for