Export selectd text as a jpeg

Please review my code, i am not able to get all the indesign files information as per my code, i can export only first two files, then the loop repeatedly process the second file only,not getting 3rd and 4th...., Please advice.
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.MAXIMUM;
app.jpegExportPreferences.exportResolution = 300;
app.jpegExportPreferences.jpegColorSpace = JpegColorSpaceEnum.RGB;
app.jpegExportPreferences.jpegRenderingStyle = JPEGOptionsFormat .BASELINE_ENCODING;
var myFolder=Folder.selectDialog("Select Indesign Folder");   
var myInddFiles=myFolder.getFiles("*.indd");
for(i=0; i<myInddFiles.length; i++){
   var myDoc=app.open (myInddFiles[i]);
   var myRuleSet = new Array (new sample);
    with (myDoc){
    var element = xmlElements;
    __processRuleSet (element[0], myRuleSet);
function sample(){
    this.name = "sample";
    this.xpath = '//*[@font="Medicine Symbols 1"]';
    this.apply = function (myElement, myRuleProcessor){
     with(myElement){
      var myframe = myDoc.pages[0].textFrames.add();
        myElement.placeXML(myframe);
        myframe.fit(FitOptions.FRAME_TO_CONTENT);
        myframe.select();
        imageName = myElement.xmlAttributes.item('id').value+''        
        $.writeln (filepath = myFolder+"/"+imageName+".jpg");
        myframe.exportFile(ExportFormat.JPG,new File(filepath), false);
myDoc.close(SaveOptions.NO);

Hi,
I would not do the export of the frame within an XML rule.
Without the export InDesign will create more than two frames.
function sample(){
    this.name = "sample";
    this.xpath = '//*[@font="Medicine Symbols 1"]';
    this.apply = function (myElement, myRuleProcessor){
     with(myElement){
      var myframe = myDoc.pages[0].textFrames.add();
        myElement.placeXML(myframe);
        myframe.fit(FitOptions.FRAME_TO_CONTENT);
        //myframe.select();
        //var imageName = myElement.xmlAttributes.item('id').value''       
        //$.writeln (filepath = myFolder+"/"+imageName+".jpg");
        //myframe.exportFile(ExportFormat.JPG, new File(filepath), false);
thanks Stefan

Similar Messages

  • I need to edit text in a jpeg file.  How do I do that?

    I need to edit text in a jpeg file.  How do I do that?

    Unfortunately you can't. A JPEG is a flat raster (pixel-based) image file which has no awareness of "text" inside it. You could try to erase the text and graphic under it and then recreate the text, but it's best to do so using a mastering format such as PSD (Photoshop) or PXM (Pixelmator), so that you can export as JPEG but keep your layered master for later editing.
    Matt

  • Exporting SMS text messages from the Treo 680

    What options are available to export SMS text messages and call logs from the Treo 680?  I need to create hard copys for evedence in a court case. I back-up files to the Palm Desktop on a Mac OS-X.
    I have searched through the Palm guide, but no discussion on extracting the SMS data.  I understand that the sms messages are in the file "Messages Database.pdb" and the call log is in "PhoneCallDB.pdb", question is how to extract the records.
    This question was solved.
    View Solution.

    Richard-Treo680 wrote:
    What options are available to export SMS text messages and call logs from the Treo 680?  I need to create hard copys for evedence in a court case. I back-up files to the Palm Desktop on a Mac OS-X.
    I have searched through the Palm guide, but no discussion on extracting the SMS data.  I understand that the sms messages are in the file "Messages Database.pdb" and the call log is in "PhoneCallDB.pdb", question is how to extract the records.
    Google is your friend!
    http://www.treodesktop.com/
    WyreNut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • Export to Text File

    Post Author: hepburn
    CA Forum: Exporting
    I'm using Visual Studio 2005 Team Suite which I believes has Crystal Reports 10 installed.I'm trying to export to a text file. Here's the code I have so far:        DiskFileDestinationOptions diskOpts =        ExportOptions.CreateDiskFileDestinationOptions();        // set the export format        ExportOptions exportOpts = new ExportOptions();        exportOpts.ExportFormatType =           ExportFormatType.RichText;        exportOpts.ExportDestinationType =           ExportDestinationType.DiskFile;                diskOpts.DiskFileName = AbsolutePath("c:/pleasework.txt");        exportOpts.ExportDestinationOptions = diskOpts;        _crReportDocument.Export(exportOpts);Is RichText the only text option I have?? I've been googling and it sounds like I may need to install a dll to export to text. Can anyone confirm that?Thanks much...

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by David Brown ([email protected]):
    Liv,
    Just tried with an individual file export and this worked. What are you trying to export?
    David<HR></BLOCKQUOTE>
    null

  • Export to Text failing when Report height is more than 23 inches

    I have a problem while exporting to Text, when report height is more than 23 inches. It's failing with "an unhandled exception occurred in crw32.exe [3856]"
    Both Crystal Reports 2008 and Crystal Reports XI Release 2 are failing. Export to PDF is working fine.
    I am trying to design a lengthy report and export to text.
    I searched in forum with out any results.
    It would be great, if some body can point me in right direction. Thank you.
    Regards,
    Raveendra

    Hi Raveendra
    To work around this error message, disable DEP by performing the following steps:
    1. Click Start > Settings > Control Panel.
    2. Double-click 'System'. The "System Properties" dialog box appears.
    3. Click the 'Advanced' tab.
    4. Click 'settings' under 'performance'.
    5. Click the 'Data Execution Prevention' tab
    6. Select 'Turn on DEP for all programs and services except those I select:'.
    7. Click 'Add'.
    8. Browse for the application CRW32.exe. This file is located in:
    C:\Program Files\Business Objects\Crystal Reports 12\
    9. Select CRW32.exe and click 'Apply'.
    10. Click 'OK' to close the 'System Properties' dialog box.
    11. Log on as an Administrator and start Crystal Reports.
    Now try to export report to the text format and observe the behavior.
    Regards
    Girish Bhosale

  • Export to Text file does not page

    Since I applied SP 7 for Crystal 9, when I export a report to a text file it does not page and print the report header on each page. It prints the report header once and one lone continuous page of information. My report was export to text with a page header on each page before I applied the service pack. How do I get it to page in the text export and print the page header on each page?

    In 8.5 the default behavior of the export to text was to not paginate. With 9 you have a paginate option when you manually export data to text, however when processing in batch 
    Mary Vertz wrote:
    export in the background
    you had no such option and it simply defaulted to 60 even for those reports that were suppressing the page header. This causes those text files to have a new-page marker at the start of every 62nd line. This causes the data on that line to be moved 1 character to the right and caused many issue with 8.5 backwards compatibility as this functionality was used for flat file interfaces for instance with the bank for positive pay.
    In SP7 they addressed this issue and changed the default behavior to not paginate and enabled a parameter to be passed to control pagination during batch processing.
    If that
    database application
    is PeopleSoft, the parameter that needs to be added to the process request is  -LN<number of lines> ex. -LN60
    Also note that the CPI can be set via the command line as well. For PeopleSoft it's -CPI<numerical value> which defaults to 12 if it isn't specified.
    Unfortunately I do not have the SP7 release notes handy to provide more detail on these options.
    Thanks
    Drew

  • Export to text problem

    <p>Hi ! Everyone,</p><p>I&#39;m using crystal report 7. I report file which is calling from PB. Crystal report display the output properly.</p><p>When I&#39;m trying to export to text format..it exports properly excepts few text columns get TRUNCATES....</p><p>I have checked CharPerInch setting is available for 8.5 onwards .</p><p>for CR7 is there any patch....</p><p> Also i want to suppress "Number and Date Format Dialog" dialog box which appears exporting to crystal report to CSV format</p><p>could you help?</p><p>Thanx ....</p><p>Vishwas</p>

    I am assuming PB is Power Builder. The issues with PB in CR 7 was that PB could get structure sizes properly. The fix was to build and app using MS C++, run in debug mode and get the actual size required and add that value to PB.
    Also, CR 7 is well past it's life cycle so we have no more samples or patches available.
    Please upgrade to a develoment tool that supports .NET Assemblies and CR Xi R2 or above.

  • Export to text - formatting

    Post Author: Ralphred
    CA Forum: .NET
    Im trying to export a report to a .txt from within a vs2005 program, using CRXIr2. I have been able to export to the text file through code since the option to export to text isn't available for some reason when in vs2005. The problem I have now is that when I try to change the Characters Per Inch Textformatting option they do not change and the report gets exported with the default of 12 characters per inch, and some of my data is cut off.
    Here is the code that I am using and would really appreciate if anyone knows a way around this and can help out.
    Thanks
    Public Sub ExportToText(ByVal ReportName As CrystalDecisions.CrystalReports.Engine.ReportDocument, ByVal ParamName() As String, ByVal ParamValues() As String)
    Dim MyReportDocument As CrystalDecisions.CrystalReports.Engine.ReportDocument = ReportName
    Dim Field As CrystalDecisions.Shared.ParameterValues
    Dim Value As CrystalDecisions.Shared.ParameterDiscreteValue
    Try
    If Not ParamName Is Nothing Then
    For i As Integer = 0 To ParamName.Length - 1
    Field = New CrystalDecisions.Shared.ParameterValues
    Value = New CrystalDecisions.Shared.ParameterDiscreteValue
    Value.Value = ParamValues(i)
    Field.Add(Value)
    MyReportDocument.DataDefinition.ParameterFields(ParamName(i)).ApplyCurrentValues(Field)
    Next
    End If
    Dim exportOpts As New ExportOptions
    Dim diskOpts As DiskFileDestinationOptions
    diskOpts = ExportOptions.CreateDiskFileDestinationOptions()
    CrystalDecisions.Shared.ExportOptions.CreateTextFormatOptions.CharactersPerInch = 16
    exportOpts.ExportFormatType = ExportFormatType.Text
    exportOpts.ExportDestinationType = ExportDestinationType.DiskFile
    diskOpts.DiskFileName = "c:\exporttotext.txt"
    exportOpts.ExportDestinationOptions = diskOpts
    '**************************************** Here is where I set and nothing happens
    ExportOptions.CreateTextFormatOptions.CharactersPerInch = 16
    MyReportDocument.Export(exportOpts)
    Catch ex As Exception
    MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Print Report")
    Finally
    MyReportDocument.Close()
    MyReportDocument.Dispose()
    End Try
    End Sub

    Yes. Use character styles, and map XML tags to the styles. It's the same process as for paragraph styles.

  • Export to text procuding different results between SDK and Report Viewer.

    We have a 3rd party app that uses Report Viewer v2.5.991 to generate reports. We use the export to text feature and specify 60 lines per page. This produces a report with 60 detail lines and a footer that comes after the sixty for a total of 64 lines per page.
    I am a .NET developer and am using the CrystalDecisions SDK version 13.0.2000.0. I am using the same rpt file and automatically generating the text export using C# .NET. I am specifying TextFormatOptions LinesPerPage of 60. This is producing 60 lines total including the footer.
    Is there an option I am missing in my code to produce the desired results?

    No such thing as Report Viewer v2.5.991. Not as far as I know anyhow...
    Looking at the description of the TextFormatOptions property in the SAP Crystal Reports .NET API Guide:
    Gets or Sets the number of lines per page to use when you export to text.
    So, it looks to me like the property is behaving as expected. E.g.; it is the 3rd party that does something to get 64 lines per page. Perhaps setting the property to 64 will do the trick?
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Export to text removes trailing spaces in XI R2

    I've found an article that talks about the problem of the export to text removing trailing spaces, but the article mentions that this is fixed in Crystal Reports XI with a newer version of u2ftext.dll to version 11.0.0.941.
    [1218375 - Trailing spaces ignored when exporting to Text format|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313338333333373335%7D.do]
    I'm using Crystal Reports XI R2 and my u2ftext.dll version is already 11.5.11.1470.
    I'm I missing something or is there another solution to the issue in XI R2?
    Thanks,
    Jeff

    2 Years, multiple people are asking this question.......Does anyone in support have a response for keeping the trailing spaces intact during export?

  • Many problems with the 'Export to Text' (.txt) in CR Xi

    Hi,
    I have listed many problems with the 'Export to Text' (.txt) function of CR Xi.
    These problems are related to this export format only (meaning everything works fine in the Viewer or in the 'Export to PDF')...
    - Multi-columns layout do not export as Multi-column (export only a one column);
    - Numeric values with parenthesis for negative values or with a fix currency sign at the leftmost position are not exported correctly;
    - Fields having a Suppress formula which is "WhilePrintingRecords" do not appears when exported;
    - Fields with 'Suppress double value' checked are not always suppressed when exported to Text.
    - 'Keep Group Together' flag is not working.
    - 'Reset Page Number After' simply does not works when exported to text;
    - 'Keep object together' on TextBox/Section is not working.
    - Whenever a group is ending on the last line of a page, the the following page as the same Group header as the previous group with no records until the page is filled, then the PageBreak and PageHeader is missing but the records of the following group appears.
    I would like to know what is the status of the 'Export to Text' function (is it a deprecated function not supported anymore???).
    If still supported, when will these bugs be fixed???
    Thanks

    Hi Rene
    Export to Text is supported till date. Crystal Reports 2008 also supports this with Keep together working however when I tried with format with multiple columns, it didnot show up in the exported text file.
    Regards
    Sourashree

  • How do I do Export to Text? Using JSP

    Hi All,
    I need your help for doing Export to Text functionality.
    If I hit on "Export to Text" link, the file dialog will be open and I save the data.
    Is this possible through response?
    like response.setHeader("Content-type","application/text");
    If not possible through response then give me a another solution
    Thanks
    Amit

    http://forum.java.sun.com/thread.jspa?threadID=5199777&messageID=9792760#9792760

  • Crystal Report 2008 export to text problem

    Hello,
    I am using Crystal Reports 2008 for generating reports in our WPF application. In this application, we are exporting the report to txt file on a button click. Now the application contains a form called u2018Print Manageru2019, through which the user can print the exported report(text files). Now the issue, when we try to the any of the exported report file through the application, the printer leaves alternate blank pages. The printer used in this case is DOT MATRIX EPSON LQ-1150II ESC/P2. We even tried printing the text file on HP Laser jet 4600, but the same issue is faced.
    Also, please note that when I try to read the exported txt file, a formfeed(u2018\fu2019 page break) character  can be seen  at the place where the printer leaves a blank page. Hence, my concern is, Is there any property of crystal report that I am missing on or is this a printer driver issue? But if it would have been a driver issue, then changing the printer might have solved the issue.
    I also  tried  doing u2018Keep Togetheru2019 property = false of all the sections of the report. Also, I found that the u2018New Page Afteru2019 property = true and disabled for the u2018Page Footeru2019 section. So I set u2018New Page Afteru2019 property = false programmatically as
    rdTest.ReportDefinition.Sections["Section5"].SectionFormat.EnableNewPageAfter = false;
    but no luck.
    If anyone has faced similar problem or have any clues, please help!
    Any kind of help in solving this issue will be highly appreciated.
    Thanks in anticipation!

    Good morning.
    We've got something to get straight first
    When you say "...from the Report Viewer. The report printed as expected on HP printer...", do you mean the viewer of the .NET app, or the viewer of the CR designer?
    And version 12.0.0.683, is very old (well as far as CR is concerned anyhow   ). That version is SP 1, we are now on SP 2. So that will be the place to start. Get to SP 2 which can be downloaded from here;
    https://smpdl.sap-ag.de/~sapidp/012002523100009038092009E/cr2008win_sp2.exe
    Ludek

  • How can I export to Text and/or CSV format and get correct page info?

    I am using CRVS2010 to upgrade an application from CRXI RDC to .Net.  When at runtime I generate the report and export to Text or CharacterSeparatedValues my page footers show Page -1 of 1.  Using the CRXI RDC, I see the correct page info in the footers.
    When I export to Text, I get the Page -1 of 1 for every page.  If I set LinesPerPage to zero, then I get it all on one page, which still has Page -1 of 1 at the end.
    If I export to CSV, I get Page -1 of 1 for every line.  If I use the viewer to review the report at runtime, and export from there, I cannot export as Text so I have no comparison.  However, the Export to CSV from the Viewer as Page -1 of 1for every entry just as my export does.
    What do I need to do to get the correct line info?  What is that is different from CRXI RDC and CRVS2010 .net that would impact this behavior?

    Yes, I am using SP2 for VS 2010 and I'm using the Page N of M formula in the page footer.  While my export code was not quite as simple as yours, I did it both ways in my test program with the same results.  A one page report whose footer says Page -1 of 1.
    Here's the relative code snippet:
    #if 0
        CrystalDecisions::Shared::ExportOptions ^exportOptions = gcnew CrystalDecisions::Shared::ExportOptions();
        exportOptions->ExportDestinationType = CrystalDecisions::Shared::ExportDestinationType::DiskFile;
        exportOptions->ExportFormatType = CrystalDecisions::Shared::ExportFormatType::Text;
        TextFormatOptions ^textFormatOptions = exportOptions->CreateTextFormatOptions();
        textFormatOptions->LinesPerPage = 0;
        textFormatOptions->CharactersPerInch = 11;
        exportOptions->FormatOptions = textFormatOptions;
         CrystalDecisions::Shared::DiskFileDestinationOptions ^diskFileDestinationOptions = exportOptions->CreateDiskFileDestinationOptions();
         diskFileDestinationOptions->DiskFileName = gcnew System::String("c:\temp\test.txt");
         exportOptions->DestinationOptions = diskFileDestinationOptions;
        thisReport.Export(exportOptions);
    #else
        thisReport.ExportToDisk(CrystalDecisions::Shared::ExportFormatType::Text, gcnew System::String("c:\temp\test.txt"));
    #endif
    Edited by: nlDevotie on Jan 9, 2012 11:59 PM

  • Unable to Export to Text when using Enterpirse

    Post Author: dmface15
    CA Forum: Exporting
    I created a report in Developer and have the ability to export the report to a text file. However, when i saved to report to Crystal Server and run it I do not have the option to export to text. What is the difference and why the limitation?

    Usually your cd-burning-software should be able to show you if it supports CDText or not (for example Nero has it's own info-tool that informs you about all features of your drive).
    But if your drive is only one year old it really should support CDText.
      Windows XP   iPod mini 2nd gen.

Maybe you are looking for

  • Link between Project and Sales Order

    Apart from sales order can we have a link between project and customer master ?? I know that WBS element assignment can be made in sales order but i want to have link between customer master and project. I don't want any user field or text field in s

  • Printing text in text area in so10(standard text)

    Dear all, I need to print a text in text area.i mean i need a box in which i can fill text in standard text (tcode-so10).Using box command we will be doing in script. But is there any possibility that i can solve the issue in so10 itself as i am gene

  • Should I keep doing future updates to my ipod touch?

    Dear Apple Support, I've always been skeptic about this random ipod touch software updates. I don't even have count of how many times I have actually uodated my ipod. My point is that I updated my ipod today, January 19, 2012,  and for the second tim

  • SAP MSCS Windows 2008 "Client Access point"

    Hello Gurus,                      As per the installation guide " GuideSAP ERP 6.0 - EHP4 Ready SR1 ABAP on Windows: Oracle" page 147 , step 10 of "Creating sap services " , we are trying to add Client access point , however we are not able to add th

  • Benefits and Travel Manager

    Hi, In our company we have some type of claims  like medical, transport etc where in the entitlement of an employee is maintained under one customized table. and utilization amount by the employee is maintained under another customized table. We use