About.

Get libjtapi

libjtapi is under heavy initial development. It is not production ready. We welcome anyone willing to contribute to or test the current code base.

Get libjtapi

To make a local branch of the main baazar repository use the following command
bzr branch http://bzr.linuxfoundation.org/openprinting/libjtapi

libjtapi HelloWorld.c

The libjtapi hello world shows the creation of a OTHER job ticket with contact information. In this case the printed document is not defined within the job ticket.

#include <fsgjt.h>;
#include <fsgjt_attribute.h>;
#include <fsgjt_contact_info.h>;
#include <fsgjt_job.h>;
#include <fsgjt_job_ticket_info.h>;

/*** Create our job and a job ticket */
fsgjit_object_t job, ticket;
fsgjitNewJob(&job);
fsgjitNewJobTicketFromJob(&ticket, job, FSGJIT_JT_OTHER);

/*** Add contact info to the job */
fsgjt_object_t contactInfo;
fsgjtNewContactInfo(&contactInfo, "World");

//add details/message for the contact
fsgjtSetTextAttribute(contactInfo,
                      FSGJT_CONTACT_INFO_DETAILS,
                      "Hello");


//add the contact object as an attribute to the job
fsgjt_attribute contactAttribute;
fsgjtNewAttribute(&contactAttribute,
                  FSGJT_JOB_CONTACT_INFO,
                  FSGJT_VT_CONTACT_INFO_OBJECT,
                  &contactInfo);
fsgjtSet(job, contactAttribute);

/*** Write the job ticket to a file */
fsgjitWriteJobTicketToURI(ticket, "helloWorldJobTicket.txt");