Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-05-2010, 01:58 PM   #1
LQ Newbie
Registered: Jun 2010
Posts: 3

Rep: Reputation: 0
Print data to laser printer using an overlay form and save file as pdf

ok. i've done lot's of reading and still not able to find an answer or solution, so here goes.. i have custom programs written in Basis pro5. Standard output to a pdf virtual printer works fine. Using pdftk to overlay on to a form is hit or miss.... There are products out there like Unform that are just too expensive for my company. i have purchased another product from a company that prints the forms to the laser perfectly but i am incapable of capturing them and saving them as pdf's for archiving/emailing/faxing and i don't much care for this company.
if anyone has any recomendations i would love to hear them.... i might ever consider hiring someone to write the needed script(s).

Thank you!
Old 06-11-2010, 08:23 AM   #2
LQ Newbie
Registered: Jun 2010
Posts: 3

Original Poster
Rep: Reputation: 0
no one has any solutions so i decided to post my code. maybe someone has a better solution. this code works about 50% of the time and for the life of me i can't figure out why it fails..

### overlay form onto file

#NEWFILE=`cat $INFILE|cut -c24-28`

sleep 1


sleep 2

pdftk $NEWFILE background $FORMFILE output $OUTFILE

lp -dpl4 $OUTFILE

quit 0
Old 06-21-2010, 05:41 AM   #3
LQ Newbie
Registered: Jun 2010
Posts: 3

Original Poster
Rep: Reputation: 0
i've discovered the problem but still need help with a solution......... the resulting file after i pdftk is seeing the & and @ characters as printer escape codes when those characters are in my print data. file1.pdf has no issue ignorring those characters and prints fine. only after i pdftk file1 to background file2 out put file3 is there a problem. temporary solution is to first creat a txt file, use sed to substitute those characters so the resulting file3 can print, but i need a better solution... i have to have the & and @ characters print just as they are supposed to... anyone have an idea how to accomplish this?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hp Laser Jet 5Si printer connected through a serial port on RHEL 5 does not print arphias Linux - Hardware 5 07-24-2008 08:58 AM
CUPS PDF Printer that prompts for save location? MasterC Linux - General 3 01-11-2008 02:59 PM
Lexmark c532dn color laser printer will only print in grayscale mjkelly93 Linux - Hardware 8 01-07-2008 04:02 PM
How to print/save a bundle of .png files as a single .pdf file satimis Linux - Software 24 08-04-2007 06:05 AM
Print-to-file print driver to print PDF Bill Fox Linux - General 3 05-02-2006 04:15 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration