You are not logged in.
So I'm ocd and have been selling a bunch of stuff on ebay lately and want to get the shipping proccess as as simple as possible. So my idea is to print the shipping label to a pdf file with the name of the item sold as the filename and then mass print the pdfs with the filename somewhere on the page, so that when it's time to ship i don't have to triple check to make sure that the shipping label corresponds with the right item. Is this at all possible with cups? EDIT: I see that I can customize a banner file but i don't see an option for filename. I see an option for job id etc but nothing for filename. So does that mean it's impossible?
Last edited by mamamia88 (2013-08-30 17:22:36)
Offline
please be more clearly what you want to do. You can print a file in command line with lp or lpr
Linux odin 3.13.1-pf #1 SMP PREEMPT Wed Mar 5 21:47:28 CET 2014 x86_64 GNU/Linux
Offline
please be more clearly what you want to do. You can print a file in command line with lp or lpr
i want the name of the file printed on the physical piece of paper when i print it.
Offline
I don't know how to edit pdf in commandd line but with a text file you could it the file name to the head eg.
for file in *.txt ; do
echo $file > ${file}.1
cat $file >> $f{file}.1
lp ${file}.1
done
rm -f *.txt.1Last edited by Thaodan (2013-08-30 19:29:59)
Linux odin 3.13.1-pf #1 SMP PREEMPT Wed Mar 5 21:47:28 CET 2014 x86_64 GNU/Linux
Offline
I don't know how to edit pdf in commandd line but with a text file you could it the file name to the head eg.
for file in *.txt ; do echo $file > ${file}.1 cat $file >> $f{file}.1 lp ${file}.1 done rm -f *.txt.1
What i really want is to be able to print shipping labels from ebay and include the name of the item corresponding to the shipping label directly on the shipping label. That way it makes it easier to make sure the right shipping label goes on the right package. For example i shipped out 15 videogames the other day and had to double and triple check that i didn't send out the wrong game to wrong person.
Offline
This propably isn't about just generating a list (or something like that) and printing it. I guess you want it to be automated (or you could just use pen and paper instead). So before we try and find the right tools for the job you should answer the following two questions:
1) How should the print out look like (more specifically: what data is shown there?)?
Something like this maybe?
Buyer Name
and AddressItems:
- Game 1
- Game 3
- Game 7
2) How can you get the data out of ebay?
Are there helper tools that can save the data in some kind of text form? Do you have to copy & paste the data from the website? Or could you try and process emails from ebay?
Offline
Well what I hoped to accomplish was to print a shipping label to PDF format with the name of item sold as the filename.PDF. then when finished bulk print the labels and have the name of file in either the header or footer of the page. Printing label only takes up half a page or so so there is plenty of whitespace
Offline
Well what I hoped to accomplish was to print a shipping label to PDF format with the name of item sold as the filename.PDF. then when finished bulk print the labels and have the name of file in either the header or footer of the page. Printing label only takes up half a page or so so there is plenty of whitespace
Offline
Ah, okay, got it. How do you generate the pdf files?
Edit:
In case of LaTeX take a look at http://tex.stackexchange.com/questions/ … -file-name
Last edited by cookies (2013-08-31 18:26:39)
Offline
Ah, okay, got it. How do you generate the pdf files?
Edit:
In case of LaTeX take a look at http://tex.stackexchange.com/questions/ … -file-name
With the built in functionality of cups to print to file
Offline
Okay, so you create some initial source file that contains the data you want to print. Then you convert this source file to pdf via the CUPS print-to-pdf feature. How do you create the initial source file?
Right now I can see two ways of getting the file name into the document.
Most office suits should be able to do what you want. With libre office (I tested it with lowriter) you can just hit ctrl+F2 and add the file name (and a lot of other things); it should be updated automatically for you if you change the file name. Don't forget to save the file!
Also, libre office can export to pdf directly. If you have libre office installed you might give it a try.
If you use plain text files, you might add some place holder somewhere and have it replaced by sed (or you could simply append the name at the end). Since you want to work with the pdf files in the end you can write a script that replaces the place holder with the file name and then generates the pdf for you.
Offline
Okay, so you create some initial source file that contains the data you want to print. Then you convert this source file to pdf via the CUPS print-to-pdf feature. How do you create the initial source file?
Right now I can see two ways of getting the file name into the document.
Most office suits should be able to do what you want. With libre office (I tested it with lowriter) you can just hit ctrl+F2 and add the file name (and a lot of other things); it should be updated automatically for you if you change the file name. Don't forget to save the file!
Also, libre office can export to pdf directly. If you have libre office installed you might give it a try.If you use plain text files, you might add some place holder somewhere and have it replaced by sed (or you could simply append the name at the end). Since you want to work with the pdf files in the end you can write a script that replaces the place holder with the file name and then generates the pdf for you.
I'm trying to make this simpler not more complicated. To print to pdf you just go file>print>print to file>select pdf>type in name you want for file. I don't want to go editing the file I just would like the name of the file to be included on the document. Sure I could go write it out but the printer is in another room and i'd prefer not to make a million trips back and forth
Offline
Okay, I've just uploaded a libre office example for you (http://sachen.themonkeyhead.de/arch/example.odt), so you know what I was talking about. This should be the simplest and quickest way I can think of (unless of course you start selling much more items).
To print to pdf you just go file>print>print to file>select pdf>type in name you want for file.
If you don't use libre office, then please tell me which program you use, to do exactly that.
Offline
Use imagemagick's convert
#!/bin/bash
convert -draw 'text 200,0 "$1"' $1 /tmp/new.pdf
mv /tmp/new.pdf $1Experiment and adjust the 200,0 to be the x,y coordinates where you want the file name to be put in the file. Note that as written this will overwrite the original file - so test carefully, or revise.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Okay, I've just uploaded a libre office example for you (http://sachen.themonkeyhead.de/arch/example.odt), so you know what I was talking about. This should be the simplest and quickest way I can think of (unless of course you start selling much more items).
mamamia88 wrote:To print to pdf you just go file>print>print to file>select pdf>type in name you want for file.
If you don't use libre office, then please tell me which program you use, to do exactly that.
literally any program you can print from. it's built in here's a picture
http://i443.photobucket.com/albums/qq15 … ce17ae.png
-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --
Offline
This stackoverflow thread has a similar question and a generic *nix solution that may work for you:
http://stackoverflow.com/questions/1119 … os-x-appli
cups-pdf is in the Arch repos.
Last edited by skottish (2013-09-01 18:30:30)
Offline
literally any program you can print from. it's built in here's a picture
But what tool are you using? If you are using libreoffice (or can use it) just use the example cookies was generous enough to provide. If you are using another tool we will need to know exactly what you're using, or you will have to figure it out yourself based on the example you go from cookies.
(edit) never mind -- Trilby answered my question. Good luck.
Last edited by 2ManyDogs (2013-09-01 18:47:26)
Offline
But what tool are you using?
I don't know why the OP would be so secretive about the answer - but the context makes it pretty clear it is a webbrowser. He want's to print labels from ebay.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline