7 Replies - 711 Views - Last Post: 16 December 2010 - 05:35 PM Rate Topic: -----

#1 jewelsdj40  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 13-December 10

Moving File to be printed

Posted 16 December 2010 - 02:54 PM

Hello all,


I have been working on this program for a couple days and I cant seem to crack it. My experience makes no difference because the library typically explains what needs to be done. Its 2 programs the first: I have a file that Want to move to a folder in a different directory. the second: Then have a program reading that directory and if there is anything in there print it (printer). Now i've looked up how to print a file but its not clear and I currently have a program that checks a directory for a file and copies it into itself rather than another directory because code on that isnt clear. This really isnt a major problem I just want to know how to do it. Im eager and it would make good practice.

Is This A Good Question/Topic? 0
  • +

Replies To: Moving File to be printed

#2 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1623
  • View blog
  • Posts: 5,710
  • Joined: 03-August 09

Re: Moving File to be printed

Posted 16 December 2010 - 02:57 PM

what OS or lib are you using? printing is not a cross platform thing, the exception being some cross platform lib i may not be aware of (as i have never had a desire to make a program that prints stuff). where going to need those things to help you.
Was This Post Helpful? 0
  • +
  • -

#3 jewelsdj40  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 13-December 10

Re: Moving File to be printed

Posted 16 December 2010 - 03:01 PM

Im writing it on a mac book pro, but moving it over to a dell for testing purposes. Im using all standard libraries, nothing extra with netbeans 6.9.1.
Was This Post Helpful? 0
  • +
  • -

#4 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1623
  • View blog
  • Posts: 5,710
  • Joined: 03-August 09

Re: Moving File to be printed

Posted 16 December 2010 - 03:07 PM

how do you expect to print a file using nothing but STL? also 'dell' impleys you using windows but doesn't mean you necessarily are.

edit: also why are you writing the code on Mac and compiling it on Windows? seems to me that you can just as easily write the code on windows.

This post has been edited by ishkabible: 16 December 2010 - 03:08 PM

Was This Post Helpful? 0
  • +
  • -

#5 jewelsdj40  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 13-December 10

Re: Moving File to be printed

Posted 16 December 2010 - 03:13 PM

Thats the thing I've looked all over the internet for move file library, but you get

      #include <stdio.h>
  
       
   
      int main()
   
      {
   
      if ( rename("C:\\mdcrack", "C:\\mdlol") )
   
      perror( NULL );
   
      return 0;
   
      }


Thats useless. and its windows xp not 7 (which is garbage in my opinion)

it would be easier.... if i had the computer. Its a tough situation, but if i can get a general idea of what i need to look at to figure this out I would be fine. its just no one i know has written code for printer purposes...

This post has been edited by ishkabible: 16 December 2010 - 03:12 PM
Reason for edit:: please use code tags

Was This Post Helpful? 0
  • +
  • -

#6 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1623
  • View blog
  • Posts: 5,710
  • Joined: 03-August 09

Re: Moving File to be printed

Posted 16 December 2010 - 03:14 PM

ok so i will give you your answer, you cant. but you can do is use your OS to do it. here is a tutorial on how to use windows to print files, enjoy!! hope i could help :)

P.S. use code tags!!

This post has been edited by ishkabible: 16 December 2010 - 03:17 PM

Was This Post Helpful? 0
  • +
  • -

#7 jewelsdj40  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 13-December 10

Re: Moving File to be printed

Posted 16 December 2010 - 03:19 PM

thanks ishkabible, its a lot harder than i expected haha, so you cant just write a simple code to print a file in a folder haha. Sheesh, welp i tried... Time to start another post.
Was This Post Helpful? 0
  • +
  • -

#8 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1623
  • View blog
  • Posts: 5,710
  • Joined: 03-August 09

Re: Moving File to be printed

Posted 16 December 2010 - 05:35 PM

i don't think you should give up so easily, try following the tutorial, even if it feels overwhelming. try braking it down in little chunks ganing some grasp of what each line/chunk dose. it would be neat if you could just setup a function that takes a file path and prints that text file. the TextOut function practically dose all the work for you. you would simply take the the file path, load the file into a string, use TextOut (along with some other to setup the drawing table and move the text around) and your done. this is a bit of an over simplification but i bet it's in your grasp :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1