Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 445
  • Last Modified:

RTF document + Picture Placing + asp

Hello all,

   I am developing a page that generates a RTF document in the client browser.

   I was successful in aligning, indenting, color changing etc... but i was not able to put images.

   If you would help me it would be very greatful for you.


  Thanks in advance,

  Srini
0
srinivassmns
Asked:
srinivassmns
  • 5
  • 4
1 Solution
 
apolloisCommented:
INSERTING AN IMAGE IN RTF FILE

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnrtfspec/html/rtfspec_16.asp

After you load this page, do a browser FIND for the string "picture"

Pictures
An RTF file can include pictures created with other applications. These pictures can be in hexadecimal (the default) or binary format. Pictures are destinations, and begin with the \pict control word. The \pict keyword is preceded by \*\shppict destination control keyword as described in the following example.

Best Regards,
>apollois<
0
 
srinivassmnsAuthor Commented:
Hi appollois,

  Thanks for your prompt answer.

  Can you give me the exact syntax to use it..

  Thanks in advance...

  Srini
0
 
apolloisCommented:
Sorry, all the info I have is in the link I posted.

One way you can understand this is to insert a picture in a simple Word document.  Then SAVE AS RTF.  Then open this file with a text editor, and examine the code.

>apollois<
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
srinivassmnsAuthor Commented:
Hi applolis,

  Thanks for your answer..

  My task is to generate RTF file from some static/images & dynamic text/images. I am successfull in generating the RTF files using the tags... but i have stuck at the \pict tag to insert picture in it...

  What could be the possible solutions ....

  Thanks in advance

  Srini
0
 
apolloisCommented:
Sorry, I do not have any further information.

Have you studied the MSDN article I gave you?  It provides the complete detailed specification of how to include a picture (image) in a RTF file.

>apollois<
0
 
apolloisCommented:
srinivassmns,

If you have not been able to develop the code yourself to insert an image into a RTF file, then you may want to consider the following third-party component:

myLittleWriter
http://www.mylittletools.net/scripts/en/mlw/default.asp
Price: $99.00

With myLittleWriter, you can manage :
        page formatting including page size, margins...
        font formatting including font name, size, color...
        multi header and footernew
        field insertion including page count, page number, date, file size, file name...
        table insertion
        image insertion JPG and PNG format are supported
        HTML-formatted text insertion a lot of tags like <B>, <I>, <BR>, are supported
        HTML file insertion
        list insertion, both numbered and bulleted new
        sectionsnew
        columnsnew
        and much more...


Best Regards,
>apollois<
0
 
srinivassmnsAuthor Commented:
Hello Applolis,

  I have researched on that tool.. (mylittlewriter)..
 
  Its yet in the preliminary stage...

  It must contain a lot more...

  Example... here for reading a image.. he has done a trick which i have implemented in my personal tool...

  Read the file... use hex to bin function... that's it...

  concatenate the bin... data between the \pic tags...

  That's it...

  Any way thanks for you help....

   Bye

   Srini
0
 
srinivassmnsAuthor Commented:
Any way i am giving you the 100 points... as you have given me better that any one...

   If you want to contact me directly user this mailid

   smns@ourwebstudio.com

Srini
0
 
apolloisCommented:
Srini,

I'd glad you were able to resolve your problem.  Thanks for the points.  Glad to help.

If you'd like to share, you can post your solution here.  I'm sure that a lot of people could use it as we get this question a lot.

Good luck with your project.

Best Regards,
>apollois<
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now