IndesingCS2 server scriptable pluign: how to import image file into a frame.?

Hello<br />I am creating a scriptable pluign for indesingcs2 server.<br />Now I am stuck at importing a image file in a image frame on a document.<br />The code which was running fine for indesingcs2 desktop is given below.<br />/////////////////////////////////////////////////////////////////////////////////////// ///////////<br />     IDFile sysFile = SDKUtilities::PMStringToSysFile(const_cast<PMString* >(&ImageFileNamewithcompletepath));     <br />     InterfacePtr<ICommand> importCmd(CmdUtils::CreateCommand(kImportAndLoadPlaceGunCmdBoss));<br />     if(!importCmd) <br />          return kFalse;          <br />InterfacePtr<IImportFileCmdData> importFileCmdData(importCmd, IID_IIMPORTFILECMDDATA); <br />     if(!importFileCmdData)<br />          return kFalse;<br /><br />     <br /><br />     //db is input.I got it using the techniques mentioned in the indesign-server-plugin-techniques.pdf<br />     //page 18..<br />     importFileCmdData->Set(db, sysFile, kMinimalUI);<br />     ErrorCode err = CmdUtils::ProcessCommand(importCmd);<br />     if(err != kSuccess) <br />          return kFalse;<br /><br />     InterfacePtr<IPlaceGun> placeGun(db, db->GetRootUID(), UseDefaultIID());<br />     if(!placeGun)<br />          return kFalse;<br /><br />     <br />     UIDRef placedItem(db, placeGun->GetItemUID());<br /><br />     InterfacePtr<ICommand> replaceCmd(CmdUtils::CreateCommand(kReplaceCmdBoss));<br />     if (replaceCmd == nil)<br />          return kFalse;<br /><br />     InterfacePtr<IReplaceCmdData>iRepData(replaceCmd, IID_IREPLACECMDDATA);<br />     if(!iRepData)<br />          return kFalse;<br />     <br />     iRepData->Set(db, imageBox.GetUID(), placedItem.GetUID(), kFalse);<br /><br />     ErrorCode status = CmdUtils::ProcessCommand(replaceCmd);<br />     if(status==kFailure)<br />          return kFalse;<br /><br />     return kTrue;<br />/////////////////////////////////////////////////////////////////////////////////////// //////////<br />I used the same code for making scriptable plugin for indesignCS2 server as it doesn't involve use of any UI element.<br />But this code is not working.It doesn't crash or returns kFalse.<br />What i see after executing the plugin through script is a grey region for image in the graphics frame.<br /><br />I request if anyone gives me solution to this i will be highly grateful to him.<br /><br />Thanks and Regards,<br />Yogesh Joshi

Actually, your code is working fine, as there are no returned errors, asserts or crashes.
The reason you are just seeing a gray box, is that the display performance is set to the lowest level in InDesign Server for performance reasons.
Hint: Open the document in "desktop" InDesign, right click on the image, and look at the Display Performance settings for the image.
See
Ken Sadahiro, "[CS2 Server] Controlling display performance, how?" #1, 23 Feb 2006 8:01 am
You can of course programmatically change it to the normal or high res settings from within your plug-in, but it might slow down the performance of InDesign Server a bit.
One additional comment:
In your code where you do this:
importFileCmdData->Set(db, sysFile, kMinimalUI);
I would do this, just to be safe:
if (LocaleSetting::GetLocale().IsProductFS(kInDesignServerProductFS )) { importFileCmdData->Set(db, sysFile, kSuppressUI); } else { importFileCmdData->Set(db, sysFile, kMinimalUI); }

Similar Messages

  • How to save image files into SQL Server?

    Hello, All:
    Does anyone know how to save image files into SQL Server? Does the file type have to be changed first?? Please help me! Thank you!

    You need a BLOB field (usually)... Then you can check this tutorial out:
    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/exercises/BLOBPut/
    There are other exercises on that site, including one on reading the images back.

  • How to import multiple files to the frame area?

    How do I import multiple files to create animated GIF's. I
    know how to import multiple files into the Fireworks, but if I'm
    trying to create an animated gif that has alot of files, How do I
    get them into the frames area. It is really a pain importing each
    and every file one at a time frame by frame

    merry1
    after you bring in all your images to the canvas, select all
    and in the
    Frames Options drop down, select Distribute to Frames.
    You can bring multiple images onto the canvas by copy and
    pasting from
    the folder(s) where they exist.
    alex
    merry1 wrote:
    > How do I import multiple files to create animated GIF's.
    I know how to import
    > multiple files into the Fireworks, but if I'm trying to
    create an animated gif
    > that has alot of files, How do I get them into the
    frames area. It is really a
    > pain importing each and every file one at a time frame
    by frame
    >

  • How to import .pdf files into iBooks?

    How to import .pdf files into iBooks?

    Or send the file from your computer to your ipod by emailing yourself the pdf. Then if you open the Mail client and you open the pdf there is an option to select open in ibooks. It will save it to your device for remote viewing.

  • How to Import XML file into SAP B1

    Dear All,
    I have a scenario like,
    I am receiving a XML file from a 3rd party application for the daily Creation,Update of Item Master,BP Master, Marketing Documents. I want to import this file into SAP B1 through its approp objects. I understand DTW has limitation in its file types (Semicolo,Tab,Comma,ODBC). How do i do this ? Please guide me.
    Thanks,
    Thanga Raj K

    Hy folks,
    I´m frim Brasil and I've been studying the tool EFM (Eletronic File Manager) to learn more about it!
    There I saw that we can extract to XML "any" infomation from the database we want, mainly through the GEP.
    However, as I've seen, this Add-On can not import any XML file into SBO, unless for the BFP wich can be imported in conjunction with the BTHF Add-on.
    So I ask: how is it possible to import XML data into SBO database? Is it possible to be done through the EFM? or  it´s really necessary to write a code specifically to do that?
    Besides, I know that de B1iSN fit to this necessity... but when I tried to use it, by the custom "object" for BP, for example, there are some data wich the mapping conteined in this custom "process" that can not be imported... I tried to understand how to map those other fields not imported by the custom but this has been dificult to me as I am a implementation consultant focused in administrative process not on development...
    Could you please help me with this subject!
    Thanks a lot,
    Denis

  • I need to know how to import xml files into indesign cs6.

    My client wants to send me xml text files to import into Indesign for a multi-page publication. I don't have a clue where to start. Can you point me to a tutorial that would help me figure this out?
    I have a sample file that looks like this:
    <?xml version="1.0"?>
    <providers>
      <provider>
        <name>Bow Valley College</name>
        <description>Putting the Community back in college&#x2026;in the Bow Corrid
    ANY TIME, ANY PLACE, ANY PATH, ANY PACE LEARNING.
    Designated as the comprehensive community college for Calgary &amp; its
    surrounding region, Bow Valley College offers you learning opportunities
    through flexible delivery options, including classrooms, online or self
    paced modules. Whether you are taking a course for interest, to enhance
    your career skills or to finish high school you have access to all of the
    traditional Bow Valley College student supports.
    Visit our website [2] or come see us at our Canmore campus.
    BOW VALLEY LEARNING COUNCIL MEMBER.
    Links:
    [1] http://www.bowvalleycollege.ca/bow-corridor.html
    </description>
        <contact_information>Canmore Campus
    Provincial Building, 800 Railway Ave.
    Canmore, AB&#xA0; T1W 1P1
    OFFICE HOURS: 8:30am - 4:30pm, Monday - Friday (except from 12 - 1pm)
    PHONE: (403) 678-3125
    FAX: (403) 678-3127
    BANFF CAMPUS: Lower Level, Banff YWCA, 102 Spray Ave., Banff (ONLY OPEN
    WHEN COURSES OFFERED).&#xA0;</contact_information>
        <email>[email protected]</email>
        <website>www.bowvalleycollege.ca/bow-corridor</website>
        <registration_information>Cancellation policy: Once your course has begun no refunds or credits will
    be given. Compassionate grounds may be considered with official
    documentation. There are no refunds, transfers, or credits if you cancel
    within one week of the course start date.
    BY PHONE: (403) 678-3125. Payment by Visa or Mastercard
    IN PERSON: Canmore Campus, Provincial Building, 800 Railway Ave., Canmore.
    Payment by cash, Visa or Mastercard.
    &#xA0;
    FUNDING ASSISTANCE&#xA0;MAY BE AVAILABLE FOR THOSE ON A LOW INCOME ON SOME
    COURSES. PLEASE ASK FOR MORE INFORMATION.</registration_information>
        <courses>
          <course>
            <title>Computer Basics/Windows 7 - Instructor led, Canmore</title>
            <description>An instructor will lead the class through the basic features of Microsoft
    Windows, the Internet and Email. Find out how to start programs, create,
    save and organize your files and use the online help feature. You&#x2019;ll also
    get an introduction to surfing the internet and setting up an email
    account. This course is designed for those with little or no computer
    experience &#x2013; and is still our most popular course. 18 HR COURSE.</description>
            <schedule_entries>
              <entry>
                <date>Mon 6:30 - 9 pm, Oct 7 - Dec 2</date>
                <date>Thu 6:30 - 9 pm, Oct 10 - Dec 5</date>
              </entry>
            </schedule_entries>
          </course>
          <course>
            <title>Word 2010 Introduction - Self-paced</title>
            <description>Explore the basics of Microsoft Word to produce professional letters and
    documents. This course guides you through the effective use of the Word
    Ribbon and Quick Access Toolbar. You&#x2019;ll learn how to efficiently edit,
    move and copy text; manipulate fonts; apply bullets and numbering; borders
    and shading; insert and re-size Clip Art; enter headers and footers; insert
    page numbers; set alignment and indents; and change page settings. You&#x2019;ll
    learn to use the AutoCorrect feature and finish documents using the
    spelling, thesaurus and grammar features.
    Self-paced, 18 hr course.
    Prerequisite recommended: Computer Basics or equivalent experience.</description>
            <schedule_entries>
              <entry>
                <date>Mon 7:30 - 9 pm, Oct 7</date>
                <date>Thu 7:30 - 9 pm, Dec 5</date>
              </entry>
            </schedule_entries>
          </course>
          <course>
    AND SO ON...FOR 64 PAGES WORTH OF CONTENT
    HELP!!!
    SGAREN

    Hello Sally,
    First, I have only heard/read good things about the book Steve recommends. It is on my to buy list one day. Been awaiting a long deserved vaction to pick it up to read.
    I approach XML files pretty much like I do any text file I am sent in that I will import or copy/paste a text file into a frame in ID and begin setting my styles. With XML, though, I first clean it up, move closing tags up to their logical close lines, remove spurious codes that mean something in HTML but don't necessarily belong in the XML file (like &#x2019 which is an apostrophe so I do a search and replace. But for &#xA0; which is a non-breaking space I simply search and replace with a regular space in general), and make sure the XML validates.
    Validation is much like making sure an HTML page is formed properly. I use an XML editor (XML BluePrint) and a text editor (UltraEdit) for these tasks. If I had to only have one or the other, I suppose the XML editor is what I would use.
    I always show the import options when I import the XML and make sure that I link to the file.
    So once a sample of the XML is on a page in ID (via File | Import XML), I highlight text within a tag, say like in your example above, the Providor name, and make it like I want and then create a new style. I generally name the styles as per the XML tag. Later on, that makes mapping tags to styles a little easier.
    Once I set up all the styles preliminarily, I map the tags to styles. You can do that either via the Tags palette or via the Structure Pane that will appear once the XML is imported. In both cases, it is found via the flyout menu at the top right of their respective windows.
    After mapping my styles to the tags, I select the root element in the Structure Pane (the topmost element. In your sample above it is "providors" and delete it. This removes the XML in your ID file. But the styles and tags are still present.
    Then I import the XML again and look to makes sure all the tags/elements are styled as intended. I then correct any errors/ommissions. Then...I'll delete the XML again and import the full XML file.
    I can upload what I did with your XML sample above so you can compare it to your source file if you would like. You would then see how/where I moved tags. Now, moving the tags is only "necessary" to avoid all the extra blank paragraphs. That can be accomplished by ID's search/replace, too. But I like to start out with the XML cleaned up, so I take the few minutes to do it.
    Take care, Mike

  • How to import .mpg files into FCE ?

    I have succesfully installed the MPEG StreamClip & flip4mac into my iMac. So now I can both play wmv files on my iMac as well as importing wmv files into iMovie & FCE.
    But now I have another problem:
    1) How do I play mpg files on my iMac ?
    2) How do I bring import mpg files into FCE ?
    Thank you.

    R. Mitchell Fore wrote:
    QTPro gives you many more capabilities than the free player, but I don't think you need it to do anything you've described. You DO need the MPEG-2 Playback component. I'd start there, then see if you need any of the options provided by QTPro.
    Hi there,
    I have purchased the MPEG-2 Playback component from the Apple Store.
    I can now convert the mpg files to mov using the MPEG StreamClip.
    However, I cannot playback the original mpg files using QuickTime Player. I can only playback the original mpg files if I click on the mpg file then goto more info & change open with MPEG StreamClip.
    But how do I open with QuickTime MPEG-2 playback ? I do not even know where the OS installed the MPEG-2 Playback component to ?
    Thanks

  • How to import .exe files into Captivate

    I have some Flash .exe files that I want to import into
    Captivate so I can combine the files....and also so I can choose
    the properties for the files (for example, either to run on a loop
    or also to take to a website upon completion).
    So, how do I import .exe files into Captivate?

    Hi Steve
    Unless you can find some sort of a converter out on the web,
    I think you are out of luck. I am aware of the SoThink SWF
    decompiler (
    http://www.sothink.com/product/flashdecompiler
    ) but I'm somewhat doubtful it will work on .EXE files. Perhaps it
    will.
    Cheers... Rick

  • How to import Flac files into itunes

    Hi there,
    the title say it all. How can I import Flac files into Itunes?
    I have a lot of them. I click onto add to library select the flac file, click on open and nothing happen.
    Many thanks for your help.
    regards

    Hello CESNET the best bet is to try http://blowintopieces.com/fluke/ I myself don't use Flac files but to any audiophile it's important to hear sound at it's best. Also WAV or AIFF & ALAC you will need to use http://tmkk.hp.infoseek.co.jp/xld/index_e.html to convert into ALAC.
    P.S. their is also a simple FLAC player but can't remember it one more thing converting FLAC to WAV will not give you full TAGs. Best bet is to try just one file you've copied ether straight into iTunes or convert & see what's best for you.

  • How to import .docx files into InDesign

    How to import .docx into InDesign page layout

    File > Place.
    For detailed explanation and techniques: An overview of placing (importing) Word files into InDesign from the Course Using Word and InDesign Together

  • How to import Dropbox files into iPhoto?

    I have more than 1000 JPEG files in 3 different subfolders under the DropBox Pictures folder. I want to use them in some apps that only work with photos on the camera roll. I can find all kinds of advice on how to get individual files into the camera roll but I haven't found any on how to do multiple files in a batch. I'm assuming I need to go through iPhoto. I'm not very familiar with it because I seldom use the camera. I work mainly with JPEG files from external sources. I'm running IOS 7.1.1 on an iPad Air. I'd appreciate any suggestions. Thanks!

    I don't know whether to be more irritated with Apple for not providing a batch mechanism or with the app developers for restricting their input to the camera roll (unless that's an Apple requirement).
    The lack of a batch mechanism is annoying, but the restriction to the Camera Roll is built deep into the saftety restriction for IOS devices. Apps are restricted to their "Sandbox", and the Camera Roll is the central sharing place for photos on iOS devices. There is no way to circumvent this.
    Maybe, your problem to get the photos into the Camera Roll is due to using Dropbox and not one of Apple's own provided tools to transfer the photos,  see the list of possibilities to transfer photos between devices. For example, Photo Stream would save the photos automatically to the Camera Roll. Or use iTunes Photos sync.
    http://help.apple.com/iphoto/iphone/2.0/?handbuch#blnka7d353af
    Once you can make iPhoto see the photos in an album, you can batch-save them to to camera roll: (http://help.apple.com/iphoto/iphone/2.0/?handbuch#blnkee26bc1f)
    Save photos to the Camera Roll on your iOS device
    Tap a photo, album, or event and tap the share button > Camera Roll.
    Tap Selected, or change the photos you want to save:
    Select different photos: Tap Choose Photos, tap up to 100 photos, and tap Next.
    Select a range of photos: Tap Choose Photos, tap Range, tap the first and last photos in the range, and tap Next.
    Select all the photos in an album or event: Tap All.
    Tap Done.
    To use your photo in another app, open the app and select the Camera Roll album.

  • How to import "static files" into HTMLDB 2.0

    Hello!
    I have a problem with "static files" in HTMLDB 2.0.
    First i exported the "static files" from a workspace.
    the result is a ".sql" file.
    now i want to import this file into another workspace.
    but in HTMLDB theres no option to import "static files".
    Hope someone could help me to solve this problem!
    Best regards
    Bastian

    Bastian - Sorry, that facility is not in 2.0. You'll have to import static files into the new workspace individually.
    Scott

  • How to import image file of OS

    I was give an .img file of a server......I didn't receive a vm.vfg file at all, I the image was just simply copied from the running_pool on the oracle vm server after it was shut down.  Now...can I import this image into another oracle vm server using vm manager or some commands on the oracle vm server itself?  I was also sent the following information...
    more dns
    # Automatically generated xen config file
    name = "dns"
    memory = "256"
    disk = [ 'file:/OVS/running_pool/dns.img,xvda,w', ]
    vif = [ 'mac=00:16:3e:2a:4d:73, bridge=xenbr0', ]
    vfb = ["type=vnc,vncunused=1"]
    uuid = "4f91b207-a6a5-5bec-9ada-d60cc9254ce5"
    bootloader="/usr/bin/pygrub"
    vcpus=1
    on_reboot   = 'restart'
    on_crash    = 'restart'
    This was generated on the original oracle vm server....should I edit that to reflect the uuid of the new oracle vm server and can I create my own vm.cfg file?  The server where this image come from does not have oracle vm manager controlling it, the admin has simply been using the oracle vm server interface itself to mount the domains..is there a way to generate a template from just the oracle vm server and not using the manager?

    I would change the name if the image file to something meaningful and simply copy the image file to the storage repository /OVS/Repositories/[YOUR Repo]/VirtualDisks and then simply rescan the storage repo. That should "import" the new image to your repo and make it available for use.
    The information shown about the VM indicates that the boot loader is pygrub - that would make this guest a PVM one, so you could simply create a new PVM in OVMM and choose the just imported vdisk as its first disk. The info for this guest also suggests that it's MAC-Address is 00:16:3e:2a:4d:73, so you will need to adjust the settings inside the guest once it is running on you new OVMs.
    Hth

  • How To Import .THM Files Into Premiere Pro CS5

    Hello:
    I just purchased a Canon Vixia HFM50.  When I use the presets, there is support for the AVCHD format.  The file extension for the AVCHD format from the Canon is *.THM.  Yet, that file type is not recognized.  How do I import it?
    Regards,
    Rich Locus

    Hi Rich Locus,
    Thanks for your post.  THM is an image file format for thumbnails. Images are made smaller for browsing purposes, usually because it is easier to view and takes less time to load.
    THM files can be viewed by most image preview or editing programs on both Macs and PCs. THM files are similar to .JPEG files, and those .
    THM files representing image files can usually be converted to JPEG format by changing the name of the file from .THM to .JPEG or .JPG.
    THM files can also be used by videos. When extracting a video file from a camcorder, a thumbnail will be created to represent the video, usually taken from the video’s first frame.
    The .THM file will then have the same name as the .AVI file that it represents. With Canon-created video files, the .THM file also contains the metadata for the video, and therefore needs to remain with and have the same name as the .AVI file. Please update if changing the extension of the file works.
    Regards,
    Vinay

  • [Multisim]How to import data files into Multisim?

    Hi guys,
    In Multisim, we can plot various kinds of graphs, which again can be export to data files like *.csv. I have a csv file, which contains data in X and Y axes. How can I import this data file into Multisim, and make it displayed in a graph?
    Thanks in advance.

    Hi,
    The Piecewise linear source (PWL) accepts data as voltage or current vs. time. You can find this part by selecting Place>>Component, go to the "Sources" group then select "Signal voltage sources". Place this part on the work area, double-click on it and there should be an option to open a .txt file.
    Tien P.
    National Instruments

Maybe you are looking for

  • Can't Get Manual Recording To Work

    I have been unable to get manual recording to work and thought this was something to do with having dual monitors.  I have now disabled my second monitor, and it is still not working for me. It's possible that I have done something wrong or have misu

  • How to include std text(Created in So10) in text node?

    Hello, How to include the Standard Text( created in So10 ) into Text Node. I had typed the Standard text name in the TEXT NAME : ZXXX       Text Object : TEXT        TEXT ID : ST       LAnguage : &CONTROL_PARAMETERS-LANGU& But, I am unable to look at

  • Folder does not appear in keynote on iPad after syncing

    After syncing a keynote file through iTunes, it appears in iTunes on my mac book pro but the folder of imported files does not appear in keynote on my iPad. I have tried creating file names with no spaces and using .key suffix, no joy. any ideas? Tha

  • FM for converting PDF to XSTRING - display R/3 report in Portal as PDF

    Hello SDNers, Requirement: I am trying to display an R/3 report in Portal as PDF. I am trying to do it with the following logic: 1. Call a RFC enabled FM from my Webdynpro Java appln. 2. The FM then submits the Print request for the R/3 report and th

  • Pass query string in Flex Builder debug?

    Hi, I'm trying to figure out how to launch a debug session while passing query strings in Flex Builder. If I open up the Debug dialog, and uncheck "Use Defaults" and attempt to add my query string to the Debug Path text field, Flex Builder states tha