> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Adam Taylor > Sent: Monday, December 01, 2008 1:50 PM > To: u2-users@listserver.u2ug.org > Subject: [U2] Printing Graphics from UniVerse > > Hey folks, > > > > I've got a multi-part question. Does anyone have a good method of > printing graphics from UV programs other than the 2-bit black > and white? > We'd like to expand into color logos on some of our document > and wanted > to know if anyone had come up with a method of including those on > reports/invoices/etc. As well, does anyone have a good method of > "printing" graphics and reports to file instead of to hardcopy? > Obviously we can print straight text to the &HOLD& file, but we'd also > like to include graphics in some documents we print to file.
There is a free, open-source tool named pdftk (pdf toolkit) that will let you do this in conjunction with Adobe Acrobat Pro. I just finished a project to do something similar last month. We're sending the output to a laser printer, but there's actually one less step involved if you just want to store the file as a pdf on disk. I haven't experimented with color, but I don't think that would be a problem. We're just printing a 1 or 2 page packing list, however. I think a multi-page report might be possible, but probably not via this exact process. This is our process: 1) Design a form in the latest version of Adobe Acrobat Pro and create form fields where your variable UV data will go. Be sure to leave the "allow rich text formatting" box unchecked. You'll probably also want to remove the borders. 2) Enter some character in each field that will never appear in your actual data (I used "~"). You need to do this because Acrobat won't export xml definitions for empty fields, and it makes filling in the fields with data much easier. 3) Save your pdf, then export your field data and definitions as an xfdf file. The latter is an xml representation of the variable data that will go in your form. Save the files somewhere where you can access them as records in a UV type 19 file. 4) Write a program to make a copy of the xfdf file, replacing the "~" (or whatever placeholder you used) with your data. My method for doing this is to initially parse the xml field names into a dynamic array, assign a corresponding value array using LOCATE, then READSEQ each line of the original xml line replacing "~" with the associated field value. 5) EXECUTE the pdftk command to merge your new xfdf file back into your form: pdftk originalForm.pdf fill_form newData.xfdf output newForm.pdf flatten When you view the merged pdf document in Acrobat reader, you'll see your UV data inserted where the placeholder characters used to be. The pdftk software is available for download here: http://www.accesspdf.com/article.php/20041130153545577 (Windows, Debian, Suse) http://rpm.pbone.net/index.php3 (most other linux distros) If you want to go one step further and send the pdf to a printer, you can use the linux pdf2ps command to convert your pdf to a postscript file which can be sent directly to a postscript laser printer. I think pdf2ps is included in most linux distros. -John ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/