Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.txt to .tif conversion 1

Status
Not open for further replies.

drost

Programmer
Mar 28, 2001
23
US
I need to convert a .txt file to a .tif format. I have Adobe Acrobat and can open a .txt file and save it as a .tif, but haven't been able to do it in code.

I don't need to do this with Acrobat, so if someone knows of a way to covert the file other that Acrobat, it would be very helpful.

Thanks,

drost
 
Why would you convert txt to tif?? Tif is an image format...Unless you mean as an ASCII Art to Image conversion? Rob
"Programming is like art...It makes me feel like chopping my ear off."
 
I need to convert a .txt to a .tif in order to import it into our imaging system. Our system will only take .tif images.
 
Yes, it's possible.

You should have either Wang or Kodak imaging installed on your PC. If not go to Start/Settings/Control Panel/Add Remove programs/Windows Setup, select Accesories and check Imaging.

Ok, now in your VB project add Kodak (or Wang) Image Edit Control.

Drop one of these onto a form, add a command button, and then play with this demo code:

[tt]
Private Sub Command1_Click()
Dim annoFont As Font

ImgEdit1.DisplayBlankImage ImgEdit1.Width, ImgEdit1.Height
ImgEdit1.ConvertPageType 1 ' black-and-white

ImgEdit1.AnnotationType = wiTextFromFile
Set annoFont = ImgEdit1.AnnotationFont
With annoFont
.Size = 8
End With
ImgEdit1.AnnotationTextFile = &quot;<source_text_file>&quot;
ImgEdit1.Draw 0, 0
ImgEdit1.SavePage &quot;<destination_tif_file>&quot;, 1, 1
End Sub
[/tt]
 
This was helpful, thanks strongm.

Does anyone know how to do it with Acrobat?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top