Needed help in: how to import image in InDesign Server using Java Code

New to InDesign Server.
I am not been able to import image to document.
I tried to import image using the sample snippets "PlaceTextFileInFrame.java".
modified the line:
String placefilepath = "C:\\placeFile.txt";
to
String placefilepath = "C:\\Image.jpg";
myTextFrame.place(placefilepath);
Is this the correct way to import image or there is another solution.
1.The image gets imported but i am getting blur image(Zoomed image).
2.The image gets imported to its original image width & height.
3.I need to know how to set the image width & size.

My Requirement is-- I ve to connect to msn search page in order retrieve the result set from msn search. The same code which I do pasted below is working for GOOGLE n YAHOO with minor changes.But not for MSN.., Can any one help me.
I've pasted the code for msn..,
import java.io.*;
import java.net.*;
public class File {
public static void main(String[] args) throws IOException {
Socket s = new Socket("search.live.com", 80);
String query = "java";
PrintStream p = new PrintStream(s.getOutputStream());
p.print("GET /results.aspx?q=" + query);
p.print("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0\r\n");
p.print("Connection: close\r\n\r\n");
InputStreamReader in = new InputStreamReader(s.getInputStream());
BufferedReader buffer = new BufferedReader(in);
String line;
while ((line = buffer.readLine()) != null) {
System.out.println(line);
Edited by: Lijo_Java on Jul 13, 2008 9:03 PM

Similar Messages

  • How do I produce an excel file using java code

    How do i produce an excel file using java code.
    If it is possible would ne one have ne source code as an example.
    I have tried looking up information on outputing the information to a *.csv file but unfortunality i have had no luck in finding any information. To be exact ne source code.
    Thanks
    Lee

    That's what I use and I'd be the first to admit that it's very messy. But it works. Go use Google and see what else you can find.

  • How do i connect to sql server using java?

    hi ever body
    i need to connect to sql server using java
    what is the driver i will use?
    thanks

    Microsoft make a jdbc driver and it is readily available through MSDN. Here is a link http://msdn2.microsoft.com/en-us/data/aa937724.aspx. Whatever jdbc driver you are looking for, Google it, and if it exists you'll find it in 10 seconds.

  • Need help for school! Imported images suddenly pixelated (CS6, Windows)

    Hi guys,
    Adobe InDesign CS6 Windows I'm a frequent user of InDesign, but I now suddenly am facing problems. Note: I use InDesign not only for print material, but also for creating PDF. I therefore do not necessarily need 300 dpi. Before: copy + paste from Photoshop or even web images into InDesign used to work. The images looked fine on screen and while printing. Now, when I import or copy + paste, all images look pixelated at 100%, high quality and overprint preview. It looks like InDesign is importing images 25% larger than their original size. If I resize the imported image to 75%, the image looks normal. 100% is always pixelated now! Did I mess up some sort op setting? I never had this problem before. Please help me, need this for school assignment!
    Thanks in advance,
    Justin

    First of all, thank you for your reply. I just checked an example image and both are 72 dpi, in InDesign as well as in Photoshop. I even created a document for web in InDesign, using the 'web' & digital publishing option (which is 72 dpi) and placed the same image. At 100% pixelated, when resizing to 75% crisp. I don't know what to do..
    The thing is.. I've never had this problem for years.. with importing images. Did I change settings or?
    First one is Photoshop, second in InDesign (top left is import at 100%, bottom right is import resized to 75%). In case images are too small to see, full size: http://justinwust.com/photoshop.jpg & http://justinwust.com/indesign.jpg

  • Need Help to locate a file on a FTP server using MediaLocator class

    Hi Friends,
    This is Venkat. Iam currently working on a Multimedia J2EE web project. Iam working on a requirement to
    show Thumbnail view for uploaded media. For this i have downloaded a standalone code from the following site.
    http://www.exactfutures.com/index02.htm.
    This code converts frames of a media files to jpg images which i can use them to show as Thumbnails.
    The code takes file name which is present in project folder as parameter. But in my web project iam using a FTP server to store my media files.
    The above code uses Java Media Framework along with another API Fobs4JMF. The media file name is passed to MediaLocator class constructor which is located in the project folder. Iam talking about a standalone application here.
    But my project is a J2EE web application.
    Now my problem is that, how can i refer a file which is located on a external FTP server and pass it to MediaLocator or some other class.
    Say the ftp file URL is mms://wm.testuser.net/12365741/testvideo.wmv
    Guys hope you are clear abt my problem. Please help me ASAP.
    Below is the part of code
         * Constructor
         public vid2jpg(String path) {
              MediaLocator ml;
              String args = path;
              if ((ml = new MediaLocator(args)) == null) {
                   System.out.println("Cannot build media locator from: " + args);
              if (!open(ml)) {
                   System.out.println("Failed to open media source");
         * Given a MediaLocator, create a processor and start
         private boolean open(MediaLocator ml) {
              System.out.println("Create processor for: " + ml);
              try {
                   p = Manager.createProcessor(ml);
              } catch (Exception e) {
                   System.out.println("Failed to create a processor from the given media source: " + e);
                   return false;
              p.addControllerListener(this);
              // Put the Processor into configured state.
              p.configure();
              if (!waitForState(p.Configured)) {
                   System.out.println("Failed to configure the processor.");
                   return false;
              // Get the raw output from the Processor.
              p.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
    Thanks in Advance for your time.
    Venkat
    Edited by: VenkataGuru on Jul 23, 2008 5:30 PM

    Hi Mani,
    Below is code that ran successfully on a cRIO-9002.  It looks much the same as yours, please double-check the formatting of your string controls.  If things still do not work, let's look at the cRIO more closely.
    Message Edited by Pie56694 on 06-30-2008 09:45 AM
    Attachments:
    FTPDELE3.jpg ‏28 KB
    FTPDELE.jpg ‏24 KB
    FTPDELE2.jpg ‏18 KB

  • How to set schedule task in windows using java code

    Hi,
    i want to set the schedule task in windows os using the java code can any one help me on that
    can any one thinks i need to wright a dll file for that which set the schedule task for me which dll i can use in my java code.
    thanks in advance.

    Maybe this will help you?

  • How to go to the parent dir using java code

    I want to store a file in a directory. That directory is in the parent directory of present working directory. So how can I do this using java.
    i want to store the file "datafile" in c:\super\datadir
    now i am in the directory called c:\super\programdir
    how can i do this using the java program.

    File parentDir = new File("").getAbsoluteFile().getParentFile();
    File dataFile = new File(parentDir,"datadir/datafile");

  • Hi I need help on how to center images from hotspot and linked jpeg

    Can anyone help !!
    I have created a hotspot's over images in dreamweaver that link to an Jpegs to open and view in a new windows "that bit is fine"
    When the images are clicked on they open in new windows, however the images is positioned to the top left of the windows and i would like them to be centered but I can not figure out how to do this.
    Here is the code for the images in question, the main image is the openroadoffers which has 3 hotspot's placed on it (these 3 hotspot "referral voucher, xmasvoucher & newdriver voucher" link to jpeg images to be view in new window, these are the images i would like to be centered when the new window opens.
    <div id="header-pic"><img src="images/openroadoffers.jpg" alt="" width="820" height="254" usemap="#Map" />
      <map name="Map" id="Map">
        <area shape="rect" coords="56,39,232,228" href="images/referalvoucher.jpg" target="_parent" alt="Referal Voucher" />
        <area shape="rect" coords="289,26,494,238" href="images/xmasvoucher.jpg" target="_parent" alt="Xmas Voucher" />
        <area shape="rect" coords="572,6,775,224" href="images/newdrivervoucher.jpg" target="_parent" alt="new drivers offer" />
      </map>
    Any help on this would be fantastic
    Thank
    Andy

    Hello Andy,
    you are welcome. What concerns the difference between html and php you could use Google to get more informations about. Here a link to some websites I have in my notebook  (you can translate the German wiki with Google too):
    http://stackoverflow.com/questions/6776832/what-is-the-difference-between-php-and-html-fil e-extensions
    http://de.wikipedia.org/wiki/HTML
    http://de.wikipedia.org/wiki/PHP
    Good luck!
    Hans-Günter

  • Need help on interface to store images into oracle database using forms 6i

    i am using forms 6i and oracle 8i. i am able to store .jpg and other picture files into data base.now my problem is how show and store the CAD/CAM drawings using forms. can any one help me please. is higher version is providing any new facility for this purpose?
    thank you

    thanks for your help.
    i am using client/server based application and cad/cam software was also installed on it. helper application means, the cad/cam software should provide some controls to view the drawings in other applications? am i correct.

  • Need help on how to permanently delete applications/programs without using third party applications

    Title says it all...
    Hope you guys can help me out.
    Thanks!

    See Here...
    http://macmost.com/uninstalling-apps-in-mac-os-x-lion.html

  • How to connect to IMAP mail server using java ?

    Hello Friends,
    I need to include a mailing facility in my application. Now its not the smtp server instead I have to connect to the IMAP server.
    Pls provide your valuable suggestions as to how do I go about this ?
    What API will I need to download ?? As javamail API does not have IMAP package.
    Thank you for your attention.
    Regards

    What API will I need to download ?? As javamail API does not have IMAP package.What gave you that idea? JavaMail does support IMAP.

  • How to deploy EAR on CE server using Java Support Package Manager

    Hello,
    I am using CE server where I want to deploy EAR file by using JSPM. I run this program in Drive:\usr\sap\CE1\J00\j2ee\JSPM\go.bat
    I have also put the EAR file into the inbox folder Drive:\usr\sap\CE1\SYS\EPS\in but still It does not show me any file to proceed further for deployment.
    Does any one has idea?
    Regards,
    NK

    Hi,
    The Java Support Package Manager is not able to deploy a single .ear file.
    If the *.EAR file is placed inside an SCA (Software Component Archive) then JSPM is able to deploy it.
    You have to create a .SCA from an .EAR file
    SAP note 1223957 contains an attachment (nwpacktool.zip) which can be used to create a .SCA file from the .EAR file.
    Gerd

  • Please help me!--rendering makes the images or video blurry (very pixelated) deteriorates the image  Adobe Premier Elements 13  need help!  .jpg and mpeg images,  but I have never "rendered" before since I got APE 13 about 6 weeks ago.  I am desperate for

    Please help me!--rendering makes the images or video blurry (very pixelated) deteriorates the image  Adobe Premier Elements 13  need help!  .jpg and mpeg images,  but I have never "rendered" before since I got APE 13 about 6 weeks ago.  I am desperate for assistance!

    That's going to be a ridiculous waste of money and energy.
    First of all, the current ATI drivers don't support multiple GPUs, so at the moment even a single 4870X2 would be only a 'normal' 4870 (which is quite a speed beast already). GFX drivers evolve rapidly, so things might look different next month, but when it comes to Linux and hardware there's one Golden Rule: stay away from the newest stuff and wait for proper support to get coded.
    I also wonder what power supply could possibly cope with the differences between idle and full load; that's way beyond 400W. But then, I'm one of those "quiet&green" types where >100W idle is already a bit much.
    I kind of understand that you want to get it done and not worry about hardware for the next 10 years or so, but that's simply not how the hardware world works and never did. At least not for the average consumer.

  • All of my photos are displayed as BW because somehow I've saved a quick develop preset and it saves as BW.  This is for all of my photos.  I can individually undo them but need help in how to get rid of the preset so it goes to Default. thanks

    All of my photos are displayed as BW because somehow I've saved a quick develop preset and it saves as BW.  This is for all of my photos.  I can individually undo them but need help in how to get rid of the preset so all photos goes to Default or as shot. thanks

    Go to the develop module and highlight all of the images in the filmstrip at the bottom of the screen. Then activate Auto-sync and click on the Reset button. That should reset all of the images to your camera default settings.

  • I need help understanding how the Apple components integrate to create a system across all my devices?

    I need help understanding how the Apple components connect to create a whole system across all my devices?
    Is there a resource that describes current system and associated functionality?
    For example:
    Buy A, B, C to achieve "X" 
    You will need:
    an internet provider which supports <specs>
    add D to achieve "Y"
    You will need:
    an internet provider which supports <specs>
    add "E" to achieve "Z"
    You will need:
    an internet provider which supports <specs>
    For example, I am looking at the Gen 6 Airport extreme.  For intended performance do I need broadband? if so what are the specs, or will basic internet service suffice?  Do I need the internet provider's modem or does the Airport extreme replace that?  And then I think, if I am doing this, I should also look at Apple TV....What do I need and Why?  Then I look at the New Desk top coming out in the fall, and I think well, if I wait and get this, what does this component do for the system, and what becomes redundant? What does this awesome desktop do for my ability to sit and use a new macbook air when I travel  or sit on the couch in my PJs?
    If there was a place that plainly stated "if you buy the new dektop you can configure a system including only these components and achieve <this result> and by adding <additional components> you will achieve this result.
    I have been to the genius store a few times, but I come out of there more confused unless I have SPECIFIC questions or already know what to buy. 
    A "System Configuration App" would be a really great sales tool--Just saying.

    I have no idea what "fully optimized" means.
    No Apple device will let you watch broadcast TV. The Apple TV is a good option for watching streaming TV from iTunes, NetFlix and Hulu. If you want to watch from other sources, you may need to look at other devices.
    Any Mac computer or iPad will allow you to surf the web.
    What business software?
    Time Capsule is a good option for back ups.
    Update what across all devices?
    For accessing documents from all devices, a service like Dropbox is your best bet.
    I have no idea what "step as far away from an internet provider as possible" means. If you want Internet access, you need an Internet provider.
    Lighting fast speed for what? Processor? The specs are listed for all devices in the Online Store. Internet? We're back to the service provider.
    Technology changes. The only way to keep pace with it beyond a couple of years is to buy new stuff.
    The bottom line is you need to look at the specs for devices availble and at your budget and decide what best meets your needs. If you are unable to do that on your own, there are lot of technology consultants out there who will, for a fee, look at your exact situation, make recommendations and even handle the purchase and set up. Perhaps that would be the best route for you.
    Best of luck.

Maybe you are looking for

  • Battery lasts less than 2.5 hours

    My MacBook Pro is 3 months old and after installing all my apps and accounts I noticed my battery only lasting 2.5hours on a full charge. I brought my issue to the forum and came to the conclusion that Google Chrome is known to use a lot of CPU and e

  • Grt release status on backend to SC on SRM

    Dear all, We would like to see the process  Release Status of Purchase requisition or Purchase order on backend system R/3 , in the Shopping Cart on SRM side. Does SRM 5 Support this issue? Does anybody has implement this case? Best Regards, Moshe

  • Item conditions

    Hi experts, in our system, we have have to apply discounts per items in some cases in sales orders. According to some conditions (if customer is X and manufacturer's material is Y) i must apply  discount per item. Is this possible? Or there is a way

  • How to delete my 500 messages at one time without selecting one by one?

    How to delete my 500 messages at one time without selecting one by one?

  • Excel Addin Pull error from Essbase studio cube

    Hi There, I have cube deployed from essbase studio with dupilicate member name enable. however user gets error "unable to resolve duplicate name "2010" on line 1" error when using Excel addin and SmartView. I guess I have year 2010, also have account