fuzzylizard Posted March 30, 2003 Report Share Posted March 30, 2003 Hey, I am doing a project for school and part of the requirements are to print some reports generated by a C program to something called 'print image format'. Does anyone know what this is and how to go about programming it? Link are always welcomed. Thanks Quote Link to comment Share on other sites More sharing options...
aru Posted April 4, 2003 Report Share Posted April 4, 2003 I have no idea, and my C knowdlege is very limited, but as Linux is written in C you have almost all the section 3 of the man pages dedicated to C. You might take a look to that with an apropos image | egrep "format.*3|3.*format" or similar Is just a hint, I don't like to see unanswered posts :roll: :) Quote Link to comment Share on other sites More sharing options...
johnnyv Posted April 4, 2003 Report Share Posted April 4, 2003 Hey, I am doing a project for school and part of the requirements are to print some reports generated by a C program to something called 'print image format'. Does anyone know what this is and how to go about programming it? Link are always welcomed. Thanks I would ask for some clarification, a search for "print image format" in google turns up nothing relevant so many be they are just talking about postscript or something? Quote Link to comment Share on other sites More sharing options...
qnr Posted April 4, 2003 Report Share Posted April 4, 2003 Well, the confusing thing about it is I seem to remember back when I was using relational databases, that they had a "print image format" too. Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted April 4, 2003 Report Share Posted April 4, 2003 Got this from MSDN Print formatted data to a stream. fprintf formats and prints a series of characters and values to the output stream. Each function argument (if any) is converted and output according to the corresponding format specification in format. For fprintf, the format argument has the same syntax and use that it has in printf. fwprintf is a wide-character version of fprintf; in fwprintf, format is a wide-character string. These functions behave identically otherwise. Security Note Ensure that format is not a user-defined string. // crt_fprintf.c /* This program uses fprintf to format various * data and print it to the file named FPRINTF.OUT. It * then displays FPRINTF.OUT on the screen using the system * function to invoke the operating-system TYPE command. */ #include <stdio.h> #include <process.h> FILE *stream; int main( void ) { int i = 10; double fp = 1.5; char s[] = "this is a string"; char c = 'n'; stream = fopen( "fprintf.out", "w" ); fprintf( stream, "%s%c", s, c ); fprintf( stream, "%dn", i ); fprintf( stream, "%fn", fp ); fclose( stream ); system( "type fprintf.out" ); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.