Solved

how to run the following code in linux redhat 9?

Posted on 2004-08-14
17
564 Views
Last Modified: 2013-12-26
how can i run the following code in redhat 9? when i compile it by giveing option gcc -c filename.cpp , it gives me the error "linker input file unused becuase linking not done". what should i do? moreover i want check not to add the existing record and search facility in this code , what should be code like? can please paste the modified code? i really need that.


#include <stdio.h>
#include <conio.h>
#include <string.h>

/* structure that represents an employee record */
struct EMP {
char name[25];
float salary;  
int deleted;  
};

void main() {

      EMP e; //Employee object for data storing & manipulation
      
      strcpy(e.name,"NULL"); // Default values are
      e.salary = 0;               // assigned      
      e.deleted = 0;

      while(1) {
            char c;   // User command is recieved in this variable
            
            printf("\nDB >"); // Command prompt
            
            c = getch(); // Getting user input. Type 'h' for possible values
            
            if(c == 'n') {              //New data is recieved int e
                  printf("\nName: ");            // ( but it is not saved into a file)
                  scanf("%s",e.name);
                  printf("Salary: ");
                  scanf("%f",&e.salary);
                  e.deleted = 0;
            
            }else if(c == 's') {        //Saves current employee to a file  
                  
                  if((strcmp(e.name,"NULL")) == 0) { // Checks if user entered new data
                        printf("\nEnter employee data before trying to save");
                        continue;
                  }
                  
                  /* If new data was entered a file ,EMP.dat,
                  is opened in append mode & employee record is
                  written to it */
                  FILE* file;
                  if((file = fopen("EMP.DAT","a"))==NULL) {
                  printf("\nFailed to save data");
                  continue;
                  }
                  fwrite((char*)&e,sizeof(e),1,file);
                  fclose(file);
                  printf("\nFile saved");
            
            }else if(c == 'l') {   // If user typed 'l' records in EMP.DAT is read int e in a loop
                                                //  & displayed to the user
                  FILE* file;
                  if((file = fopen("EMP.DAT","r")) == NULL) {
                  printf("\nFailed to read file");
                  continue;
                  }
                  long curpos, length; // Variables for finding file size
                  
                  curpos = ftell(file); // Current position of filepointer is stored in curpos
                  
                  fseek(file, 0L, SEEK_END);// File pointer is moved 0 bytes from file end
                                                        // ie,file pointer is at the file's last byte
                  
                  length = ftell(file);     // Now current position is file's length
                  
                  fseek(file, curpos, SEEK_SET); // File pointer is restored to file's begining
                  
                  long num_recs = length / sizeof(e);// Length of each record in the file
                  
                  for(long l = 0;l<num_recs;l++) { // Recursivley retrieves & prints each record in file
                        fread((char*)&e,sizeof(e),1,file);
                        printf("\nName: %s",e.name);
                        printf("\nSalary: %.2f",e.salary);
                  }
                  fclose(file);
                  printf("\n\n\tRecords: %d",num_recs);                              
                  
            }else if(c == 'h') { // Prints help
                        printf("\nn - New\ns - Save\nl - List\nq - Quit");
            
            }else if(c == 'q') { // Exists while loop & program
                  break;
            
            }else if(c == 'f') { // Searches the database for an employee based on employee name
                                                // entered by user
                  
                  FILE* file;
                  if((file = fopen("EMP.DAT","r")) == NULL) { //Checks to see if file is accesible
                        printf("Failed to open file");
                        continue;
                  }
                  
                  //Gets employee name to perform search
                  printf("Enter employee name: ");
                  char f[25];
                  scanf("%s",f);
                  
                  //Finds file size
                  long curpos, length;
                  curpos = ftell(file);
                  fseek(file, 0L, SEEK_END);
                  length = ftell(file);
                  fseek(file, curpos, SEEK_SET);
                  long num_recs = length / sizeof(e);
                  
                  int found = 0; // To check if record was found or not
                  
                  for(long l = 0;l<num_recs;l++) { // Recursivly checks each name if found prints details
                                                                  // & sets found to 1            
                        fread((char*)&e,sizeof(e),1,file);
                         if((strcmp(e.name,f))==0) {
                        printf("\nName: %s",e.name);
                        printf("Salary: %f",e.salary);
                        found = 1;
                        }
                  }
                  if(found == 0)
                        printf("Record not found.");
            
            }else if(c == 'd') {// Deletes an employee
                  
                  FILE* file;
                  FILE* temp_file;

                  if((file = fopen("EMP.DAT","r")) == NULL) {
                        printf("Failed to load data");
                        continue;
                  }
                  
                  if((temp_file = fopen("EMP_TEMP.DAT","w")) == NULL) {
                        printf("Failed to create temp file");
                        continue;
                  }

                  printf("Enter employee name: ");
                  char f[25];
                  scanf("%s",f);


                  long curpos, length;
                  curpos = ftell(file);
                  fseek(file, 0L, SEEK_END);
                  length = ftell(file);
                  fseek(file, curpos, SEEK_SET);
                  long num_recs = length / sizeof(e);
                  int found = 0;
                  
                  for(long l = 0;l<num_recs;l++) {
                        fread((char*)&e,sizeof(e),1,file);
                        if((strcmp(e.name,f))==0) {
                        e.deleted = 1; // If record found sets it deleted flag to true
                        found = 1;
                        }
                        fwrite((char*)&e,sizeof(e),1,temp_file); // Write all records read to a temporory file
                  }
                  fclose(file);
                  fclose(temp_file);
                  if(found == 0) {
                        printf("Record not found.");
                  unlink("EMP_TEMP.DAT");//If record was not found deletes temp file
                                                      //& continues main command loop
                  continue;
                  }

                  //If record was found rewrites all records from temp file to EMP.DAT
                  //where deleted flag is 0
                  //& deletes the tem file in the end
                  file = fopen("EMP.DAT","w");
                  temp_file = fopen("EMP_TEMP.DAT","r");
                  curpos = ftell(temp_file);
                  fseek(temp_file, 0L, SEEK_END);
                  length = ftell(temp_file);
                  fseek(temp_file, curpos, SEEK_SET);
                  num_recs = length / sizeof(e);
                  for(l = 0;l<num_recs;l++) {
                  fread((char*)&e,sizeof(e),1,temp_file);
                  if(e.deleted == 0) {
                  fwrite((char*)&e,sizeof(e),1,file);
                  }
            }
                  fclose(file);
                  fclose(temp_file);
                  printf("Record deleted");
                  unlink("EMP_TEMP.DAT");
      
            }else if(c == 'e') { //Edits a record
                  FILE* file;
                  if((file = fopen("EMP.DAT","r")) == NULL) {
                        printf("Failed to open file");
                        continue;
                  }
                  printf("Enter employee name: ");
                  char f[25];
                  scanf("%s",f);

                  long curpos, length;
                  curpos = ftell(file);
                  fseek(file, 0L, SEEK_END);
                  length = ftell(file);
                  fseek(file, curpos, SEEK_SET);
                  long num_recs = length / sizeof(e);
                  int found = 0;
                  
                  //Variables to store new name & salary
                  char new_name[25];
                  float new_sal;
                  EMP new_emp;
                  
                  long write_at;//Position of record in to edit
                  for(long l = 0;l<num_recs;l++) {
                        fread((char*)&e,sizeof(e),1,file);
                        
                        if((strcmp(e.name,f))==0) {//If record exists in file get new values
                              printf("Enter new name: ");
                              scanf("%s",new_name);
                              printf("Enter new salary: ");
                              scanf("%f",&new_sal);
                              
                              //Copies values to a new EMP object
                              strcpy(new_emp.name,new_name);
                              new_emp.salary = new_sal;
                              new_emp.deleted = 0;
                              
                              found = 1;

                              write_at = l; // Position to write new record
                              break;
                              }
                              }
                  fclose(file);
                  if(found == 1) {
                        
                        //Calculates byte posiotn to write
                        write_at = write_at * sizeof(new_emp);
                        
                        //Mode r+b opens a file to be writable & readable in binary
                        if((file = fopen("EMP.DAT","r+b")) == NULL) {
                              printf("Editing failed");
                              continue;
                        }
                        fseek(file,write_at,SEEK_SET);
                        fwrite((char*)&new_emp,sizeof(new_emp),1,file);
                        fclose(file);
                        printf("Record edited");
                  }else {
                        printf("Record not found");
                  }

            }else {
                  printf("Type 'h' for valid commands ");
            }
      }
}
0
Comment
Question by:babur_k
  • 14
  • 3
17 Comments
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 250 total points
ID: 11800935
I made the following changes to make it compile:
1) removed #include <conio.h> and replaced getch() with getchar()
2) included <unistd.h> for unlink() prototype
3) ANSI standard main() returns int, not void
4) instances of EMP must be declared 'struct EMP e'
5) move declaration of loop index l to outside for (long l ... per ANSI standard
6) fixed printf format string to reference long int: printf("\n\n\tRecords: %ld",num_recs);

These changes removed the following compiler errors and warnings:

~/ee $ gcc -Wall -o emp emp.c
emp.c:2:19: conio.h: No such file or directory
emp.c:12: warning: return type of `main' is not `int'
emp.c: In function `main':
emp.c:14: error: `EMP' undeclared (first use in this function)
emp.c:14: error: (Each undeclared identifier is reported only once
emp.c:14: error: for each function it appears in.)
emp.c:14: error: parse error before "e"
emp.c:16: error: `e' undeclared (first use in this function)
emp.c:25: warning: implicit declaration of function `getch'
emp.c:73: error: `for' loop initial declaration used outside C99 mode
emp.c:79: warning: int format, long int arg (arg 2)
emp.c:111: error: `for' loop initial declaration used outside C99 mode
emp.c:151: error: `for' loop initial declaration used outside C99 mode
emp.c:163: warning: implicit declaration of function `unlink'
emp.c:210: error: parse error before "new_emp"
emp.c:213: error: `for' loop initial declaration used outside C99 mode
emp.c:223: error: `new_emp' undeclared (first use in this function)

That gets it to compile, but I don't know if it runs correctly.


#include <stdio.h>
#include <string.h>
#include <unistd.h>

/* structure that represents an employee record */
struct EMP {
char name[25];
float salary;  
int deleted;  
};

int main() {

     struct EMP e; //Employee object for data storing & manipulation
     long l;
     strcpy(e.name,"NULL"); // Default values are
     e.salary = 0;             // assigned    
     e.deleted = 0;

     while(1) {
          char c;   // User command is recieved in this variable
         
          printf("\nDB >"); // Command prompt
         
          c = getchar(); // Getting user input. Type 'h' for possible values
         
          if(c == 'n') {              //New data is recieved int e
               printf("\nName: ");          // ( but it is not saved into a file)
               scanf("%s",e.name);
               printf("Salary: ");
               scanf("%f",&e.salary);
               e.deleted = 0;
         
          }else if(c == 's') {        //Saves current employee to a file  
               
               if((strcmp(e.name,"NULL")) == 0) { // Checks if user entered new data
                    printf("\nEnter employee data before trying to save");
                    continue;
               }
               
               /* If new data was entered a file ,EMP.dat,
               is opened in append mode & employee record is
               written to it */
               FILE* file;
               if((file = fopen("EMP.DAT","a"))==NULL) {
               printf("\nFailed to save data");
               continue;
               }
               fwrite((char*)&e,sizeof(e),1,file);
               fclose(file);
               printf("\nFile saved");
         
          }else if(c == 'l') {   // If user typed 'l' records in EMP.DAT is read int e in a loop
                                        //  & displayed to the user
               FILE* file;
               if((file = fopen("EMP.DAT","r")) == NULL) {
               printf("\nFailed to read file");
               continue;
               }
               long curpos, length; // Variables for finding file size
               
               curpos = ftell(file); // Current position of filepointer is stored in curpos
               
               fseek(file, 0L, SEEK_END);// File pointer is moved 0 bytes from file end
                                               // ie,file pointer is at the file's last byte
               
               length = ftell(file);     // Now current position is file's length
               
               fseek(file, curpos, SEEK_SET); // File pointer is restored to file's begining
               
               long num_recs = length / sizeof(e);// Length of each record in the file
               
               for(l = 0;l<num_recs;l++) { // Recursivley retrieves & prints each record in file
                    fread((char*)&e,sizeof(e),1,file);
                    printf("\nName: %s",e.name);
                    printf("\nSalary: %.2f",e.salary);
               }
               fclose(file);
               printf("\n\n\tRecords: %ld",num_recs);                        
               
          }else if(c == 'h') { // Prints help
                    printf("\nn - New\ns - Save\nl - List\nq - Quit");
         
          }else if(c == 'q') { // Exists while loop & program
               break;
         
          }else if(c == 'f') { // Searches the database for an employee based on employee name
                                        // entered by user
               
               FILE* file;
               if((file = fopen("EMP.DAT","r")) == NULL) { //Checks to see if file is accesible
                    printf("Failed to open file");
                    continue;
               }
               
               //Gets employee name to perform search
               printf("Enter employee name: ");
               char f[25];
               scanf("%s",f);
               
               //Finds file size
               long curpos, length;
               curpos = ftell(file);
               fseek(file, 0L, SEEK_END);
               length = ftell(file);
               fseek(file, curpos, SEEK_SET);
               long num_recs = length / sizeof(e);
               
               int found = 0; // To check if record was found or not
               
               for(l = 0;l<num_recs;l++) { // Recursivly checks each name if found prints details
                                                       // & sets found to 1          
                    fread((char*)&e,sizeof(e),1,file);
                     if((strcmp(e.name,f))==0) {
                    printf("\nName: %s",e.name);
                    printf("Salary: %f",e.salary);
                    found = 1;
                    }
               }
               if(found == 0)
                    printf("Record not found.");
         
          }else if(c == 'd') {// Deletes an employee
               
               FILE* file;
               FILE* temp_file;

               if((file = fopen("EMP.DAT","r")) == NULL) {
                    printf("Failed to load data");
                    continue;
               }
               
               if((temp_file = fopen("EMP_TEMP.DAT","w")) == NULL) {
                    printf("Failed to create temp file");
                    continue;
               }

               printf("Enter employee name: ");
               char f[25];
               scanf("%s",f);


               long curpos, length;
               curpos = ftell(file);
               fseek(file, 0L, SEEK_END);
               length = ftell(file);
               fseek(file, curpos, SEEK_SET);
               long num_recs = length / sizeof(e);
               int found = 0;
               
               for(l = 0;l<num_recs;l++) {
                    fread((char*)&e,sizeof(e),1,file);
                    if((strcmp(e.name,f))==0) {
                    e.deleted = 1; // If record found sets it deleted flag to true
                    found = 1;
                    }
                    fwrite((char*)&e,sizeof(e),1,temp_file); // Write all records read to a temporory file
               }
               fclose(file);
               fclose(temp_file);
               if(found == 0) {
                    printf("Record not found.");
               unlink("EMP_TEMP.DAT");//If record was not found deletes temp file
                                             //& continues main command loop
               continue;
               }

               //If record was found rewrites all records from temp file to EMP.DAT
               //where deleted flag is 0
               //& deletes the tem file in the end
               file = fopen("EMP.DAT","w");
               temp_file = fopen("EMP_TEMP.DAT","r");
               curpos = ftell(temp_file);
               fseek(temp_file, 0L, SEEK_END);
               length = ftell(temp_file);
               fseek(temp_file, curpos, SEEK_SET);
               num_recs = length / sizeof(e);
               for(l = 0;l<num_recs;l++) {
               fread((char*)&e,sizeof(e),1,temp_file);
               if(e.deleted == 0) {
               fwrite((char*)&e,sizeof(e),1,file);
               }
          }
               fclose(file);
               fclose(temp_file);
               printf("Record deleted");
               unlink("EMP_TEMP.DAT");
     
          }else if(c == 'e') { //Edits a record
               FILE* file;
               if((file = fopen("EMP.DAT","r")) == NULL) {
                    printf("Failed to open file");
                    continue;
               }
               printf("Enter employee name: ");
               char f[25];
               scanf("%s",f);

               long curpos, length;
               curpos = ftell(file);
               fseek(file, 0L, SEEK_END);
               length = ftell(file);
               fseek(file, curpos, SEEK_SET);
               long num_recs = length / sizeof(e);
               int found = 0;
               
               //Variables to store new name & salary
               char new_name[25];
               float new_sal;
               struct EMP new_emp;
               
               long write_at;//Position of record in to edit
               for(l = 0;l<num_recs;l++) {
                    fread((char*)&e,sizeof(e),1,file);
                   
                    if((strcmp(e.name,f))==0) {//If record exists in file get new values
                         printf("Enter new name: ");
                         scanf("%s",new_name);
                         printf("Enter new salary: ");
                         scanf("%f",&new_sal);
                         
                         //Copies values to a new EMP object
                         strcpy(new_emp.name,new_name);
                         new_emp.salary = new_sal;
                         new_emp.deleted = 0;
                         
                         found = 1;

                         write_at = l; // Position to write new record
                         break;
                         }
                         }
               fclose(file);
               if(found == 1) {
                   
                    //Calculates byte posiotn to write
                    write_at = write_at * sizeof(new_emp);
                   
                    //Mode r+b opens a file to be writable & readable in binary
                    if((file = fopen("EMP.DAT","r+b")) == NULL) {
                         printf("Editing failed");
                         continue;
                    }
                    fseek(file,write_at,SEEK_SET);
                    fwrite((char*)&new_emp,sizeof(new_emp),1,file);
                    fclose(file);
                    printf("Record edited");
               }else {
                    printf("Record not found");
               }

          }else {
               printf("Type 'h' for valid commands ");
          }
     }
     return 0;
}
0
 
LVL 23

Expert Comment

by:brettmjohnson
ID: 11801047
Your input mechanism is not very robust.
scanf("%s" ..) will stop reading input on the first whitespace, so if the user
enters "Firstname Lastname" to the "Name:" prompt, "Firstname" will be
assigned to e.name, and "Lastname" will attempt to be interpreted as e.salary.

I suggest using fgets() to read each line, then parsing the input.



0
 

Author Comment

by:babur_k
ID: 11803612
Thanks so much johnson, you are helping me so much, the code in working now.
onw thing i want to add the searching facility in it. and i dont know how to do , First Add the record with some Keyword and after that give Searching facility by Name , Salary or that keyword. How can i do that? If you dont mind can you you re-paste the new code with fget()? i am waiting for you.
0
 

Author Comment

by:babur_k
ID: 11804122
Thanks so much , john it is working now , john i want to give the search facility in it too, how can i do it? what would be the code? can you re-paste the code please. anyone can search by name , salaray or a key word. so how can i do it? please re-paste the code with the new search option and fget()? i need it urgent please
0
 

Author Comment

by:babur_k
ID: 11804725
Thanks so much johnson , you really did well, can you do some favor if you dont mind , i want to add the search facility in my code so that one can search by name, by salary or any other keyword he or she supplies, how can we do that? can you paste the code embedded in the original code above. i am unable to do it. how fget() can be used to . i am waiting
0
 

Author Comment

by:babur_k
ID: 11804728
Thanks so much johnson , you really did well, can you do some favor if you dont mind , i want to add the search facility in my code so that one can search by name, by salary or any other keyword he or she supplies, how can we do that? can you paste the code embedded in the original code above. i am unable to do it. how fget() can be used to . i am waiting
0
 

Author Comment

by:babur_k
ID: 11804729
Thanks so much johnson , you really did well, can you do some favor if you dont mind , i want to add the search facility in my code so that one can search by name, by salary or any other keyword he or she supplies, how can we do that? can you paste the code embedded in the original code above. i am unable to do it. how fget() can be used to . i am waiting
0
 

Author Comment

by:babur_k
ID: 11804738
Thanks so much johnson , you really did well, can you do some favor if you dont mind , i want to add the search facility in my code so that one can search by name, by salary or any other keyword he or she supplies, how can we do that? can you paste the code embedded in the original code above. i am unable to do it. how fget() can be used to . i am waiting
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:babur_k
ID: 11804768
Thanks so much johnson, you really have have done well. johnson i want to add another facility in this code that is to search by name , by salary or by any other keyword. how can i do that ? what would be the code , i am unable to do this , can you re-paste the whole code with the search facility? one thing more how to use the fget() so can you paste the whole code? i am waiting .takecare
0
 

Author Comment

by:babur_k
ID: 11804771
Thanks so much johnson, you really have have done well. johnson i want to add another facility in this code that is to search by name , by salary or by any other keyword. how can i do that ? what would be the code , i am unable to do this , can you re-paste the whole code with the search facility? one thing more how to use the fget() so can you paste the whole code? i am waiting .takecare
0
 

Author Comment

by:babur_k
ID: 11804774
Thanks so much johnson, you really have have done well. johnson i want to add another facility in this code that is to search by name , by salary or by any other keyword. how can i do that ? what would be the code , i am unable to do this , can you re-paste the whole code with the search facility? one thing more how to use the fget() so can you paste the whole code? i am waiting .takecare
0
 

Author Comment

by:babur_k
ID: 11804811
Thanks so much johnson, you really have have done well. johnson i want to add another facility in this code that is to search by name , by salary or by any other keyword. how can i do that ? what would be the code , i am unable to do this , can you re-paste the whole code with the search facility? one thing more how to use the fget() so can you paste the whole code? i am waiting .takecare
0
 

Author Comment

by:babur_k
ID: 11804821
Thanks so much johnson, you really have have done well. johnson i want to add another facility in this code that is to search by name , by salary or by any other keyword. how can i do that ? what would be the code , i am unable to do this , can you re-paste the whole code with the search facility? one thing more how to use the fget() so can you paste the whole code? i am waiting .takecare
0
 

Author Comment

by:babur_k
ID: 11804831
Thanks so much johnson, you really have have done well. johnson i want to add another facility in this code that is to search by name , by salary or by any other keyword. how can i do that ? what would be the code , i am unable to do this , can you re-paste the whole code with the search facility? one thing more how to use the fget() so can you paste the whole code? i am waiting .takecare
0
 

Author Comment

by:babur_k
ID: 11804965
Thanks so much johnson, you really have have done well. johnson i want to add another facility in this code that is to search by name , by salary or by any other keyword. how can i do that ? what would be the code , i am unable to do this , can you re-paste the whole code with the search facility? one thing more how to use the fget() so can you paste the whole code? i am waiting .takecare
0
 
LVL 23

Expert Comment

by:brettmjohnson
ID: 11804966
> i want to add another facility in this code that is to search by name ,
> by salary or by any other keyword. how can i do that ? what would be
> the code , i am unable to do this , can you re-paste the whole code
> with the search facility?
[previous message repeated 11 times]

This is obviously a learning assignment, so while we can help you achieve
understanding and overcome minor difficulties, we cannot actually do your
homework for you.  You wouldn't learn anything, if I did all the work.  And
I wouldn't learn anything doing such a trivial assignment.  It is also against
the EE member agreement.


> one thing more how to use the fget() so can you paste the whole code?

You would use fgets() to read a line of text from the input, then use strtok(),
strtol(), strtod(), sscanf(), etc to parse that line.  But watch out, fgets() includes
the '\n' newline character in the input.  For example, suppose you wanted to
get the salary from the input:

char linebuf[1024];
char *endptr;
...
  do {
    /* prompt for salary */
    printf("Salary: ");
    /* read line of text, if NULL return then EOF */
    if (fgets(linebuf, sizeof(linebuf)) == NULL)
       break;
    /* parse a float out of the buffer, assign it as salary */
    e.salary = strtof(linebuf, &endptr);
    /* if no valid float was input, endptr will be the start of buffer, so ask again */
    while (endptr == linebuf);
 }


0
 

Author Comment

by:babur_k
ID: 11805014
If it would be an assignment why havent i used mysql or something like Kdeveloper , actually when you are in job then you have to do the thing the Boss has asked for , we cant neglect his words so he said it and i have to do it. and here you are thinking that it is some assignment. i am just busted. So i am looking forward to you people. waiting...
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now