How to insert a JPEG image in a C program

Posted on 2006-03-30
Last Modified: 2013-12-26
I need to insert a JPEG image in a C program to print every time the report is generated. The program is running on an AIX machine. Is there a way to insert the image (a barcode) to print at each of the top of the page.
Question by:bweit
    LVL 51

    Accepted Solution

    hmm, this question is so simple and vage ...
    .. I'd simply answer:

    > Is there a way to insert the image (a barcode) to print at each of the top of the page.

    so what is the question beside that then?
    I guess you need:
      1. open the jpeg file
      2. read its content
      3. convert the content to the proper format of your printer
      4. write converted data into your page as you need
    LVL 27

    Expert Comment

    Does your program generate reports and you wish to add some banner to each page?
    If yes, how does your program send reports to printer (by what means)?

    Author Comment

    I'm sorry if the question seemed vague, but here is exactly what I need to accomplish:

    I have a JPEG image of a barcode that needs to print at the top of the 1st page every time this report is generated, usually via VSIFAX, but sometimes to a network printer.

    Do you need to see the section of code for the top of the 1st page?
    LVL 38

    Assisted Solution

    For barcode printing, please have a look at:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Title # Comments Views Activity
    ffmpeg - "rtsp://...... Operation not permitted" 4 58
    post4 challenge 28 70
    EvenOdd challenge 10 67
    firstChar challenge 13 55
    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…
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    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.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    760 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

    7 Experts available now in Live!

    Get 1:1 Help Now