Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

Need to print to a file

This is a discussion on Need to print to a file within the MapPoint Desktop Discussion forums, part of the Map Forums category; Greetings, I need to use PrintOut() to print the map to a file, but find that it's locking up when ...

  1. #1
    BobFromBoston is offline Senior Member Green Belt
    Join Date
    Jul 2005
    Posts
    128

    Need to print to a file

    Greetings,

    I need to use PrintOut() to print the map to a file, but find that it's locking up when I make the call. Here are the parameters I'm using.


    mpMap.PrintOut("c:\\tmp\\test.ptm","Test",1,
    MapPoint.GeoPrintArea.geoPrintDirections,
    MapPoint.GeoPrintQuality.geoPrintQualityPresentati on,
    MapPoint.GeoPrintOrientation.geoPrintAuto,
    false,false,false,false);

    Can someone please point out what I'm doing wrong with this? I'm using C#, and I find the program hangs on that command, indefinitely. When I select "Break" from the "Debug" menu, it's as if the program is active at the cursor, but if I press F10, it hangs all over again.

    Thanks for the help,
    Bob

  2. #2
    BobFromBoston is offline Senior Member Green Belt
    Join Date
    Jul 2005
    Posts
    128

    it's partially working

    I have moved my program to another computer, and the file is being written. (I realized the file format is tif.) So it works. But oddly, without my prompting, Microsoft Office Document Imaging viewer opens automatically, and displays the image.

    Has anybody got any idea why it's opening? How about to block it from opening? And on my main development machine it still hangs when I call PriotOut(). Could it be hanging, perhaps, because there is no default viewer? And it works on my second machine because there is a default viewer?

    I'd appreciate anybody's help.

    Thanks.
    Bob

  3. #3
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    I did exacly same test on my development machine, it does not block, the file is written to. Nothing is opened but I dont have that viewer installed.

    Code:
        mp.ActiveMap.PrintOut("c:\\test.ptm", "test", 1,
                              GeoPrintArea.geoPrintMap,
                              GeoPrintQuality.geoPrintQualityPresentation,
                              GeoPrintOrientation.geoPrintAuto,
                              false, false, false, false);
    I have no idea wy it should block on your other machine. Did you tryed to print to a printer also to test ?

    About the auto opning. I'm pretty sure you can set this in registry that it would not, or maybe do not use it as default opener.

    As an alternative you can probably copy the map image to clipboard, then copy it into an image object and save to file.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Print to PDF
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 08-19-2003, 09:08 AM
  2. Print View
    By healthsouthgirl in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-14-2002, 10:03 PM
  3. Print Literature
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 08-07-2002, 11:04 AM
  4. Can I print my map on one page, and the key, (or l....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-22-2002, 08:09 AM
  5. Is is possible to print out a map so that it print....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-25-2001, 04:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96