How to automate PDF processing (crop & reduce size) without breaking barcode? [duplicate]
This question already has an answer here:
Command line tool to crop PDF files
8 answers
How do I scale page in pdf files in Ubuntu? (GUI)
2 answers
I regularly receive shipping address labels in pdf format from the post. The pdf document containing the address label is formatted in a very stupid way taking up the entire A4, while just A6 would be enough. One has to cut about 70% of the page and throw the excess paper to trash, to get the address label. Then one has to use a glue stick to glue it on the shipment.
The label contains the recipient's address details, sender's details, and postage & tracking information, both as a barcode.
I would rather use standard self-adhesive sticker labels and a label printer instead. To achieve this, I would need to process each pdf file to crop out the label, shrink parts (the boxed fields) of the label slightly to fit it to the A6 shipping label size.
The cropped label needs to be downscaled to A6 size. But how to prevent the barcode from getting broken? Pdfposter breaks the parcel tracking barcode.
command-line pdf pdftk
marked as duplicate by pomsky, Parto, Kulfy, karel, Charles Green Mar 12 at 14:03
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
|
show 1 more comment
This question already has an answer here:
Command line tool to crop PDF files
8 answers
How do I scale page in pdf files in Ubuntu? (GUI)
2 answers
I regularly receive shipping address labels in pdf format from the post. The pdf document containing the address label is formatted in a very stupid way taking up the entire A4, while just A6 would be enough. One has to cut about 70% of the page and throw the excess paper to trash, to get the address label. Then one has to use a glue stick to glue it on the shipment.
The label contains the recipient's address details, sender's details, and postage & tracking information, both as a barcode.
I would rather use standard self-adhesive sticker labels and a label printer instead. To achieve this, I would need to process each pdf file to crop out the label, shrink parts (the boxed fields) of the label slightly to fit it to the A6 shipping label size.
The cropped label needs to be downscaled to A6 size. But how to prevent the barcode from getting broken? Pdfposter breaks the parcel tracking barcode.
command-line pdf pdftk
marked as duplicate by pomsky, Parto, Kulfy, karel, Charles Green Mar 12 at 14:03
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
You need to crop, ok. But do you need to resize/scale too? If so, this could add some issue in barcode reading. Hop you just have to crop. See pdfcrop.sourceforge.net, linuxcertif.com/man/1/pdfcrop/#EXAMPLES_2241h - For resizing/scalling, see github.com/tavinus/pdfScale/blob/master/pdfScale.sh
– cmak.fr
Mar 12 at 10:19
Cropping is not enough, needs also scaling, and possibly even more complicated operations, such as scaling down only the boxed fields, while maintaining the bardcode size. Thanks for the links, I will study them and see how to solve this.
– Ossi Viljakainen
Mar 12 at 10:38
Thanks, so far I have been able to crop & downscale with the following: pdfcrop --margins '-86 -1 -86 -250' infile.pdf outfile.pdf But how to prevent the barcode from getting broken? Pdfposter breaks the parcel tracking barcode. However, the postage stamp barcode doesn't get broken. How to fix this?
– Ossi Viljakainen
Mar 13 at 5:37
Is pdfposter treating the pdf (including the barcode) as a raster image, rather than as vector?
– Ossi Viljakainen
Mar 13 at 6:12
what is pdfposter ?
– cmak.fr
Mar 13 at 7:38
|
show 1 more comment
This question already has an answer here:
Command line tool to crop PDF files
8 answers
How do I scale page in pdf files in Ubuntu? (GUI)
2 answers
I regularly receive shipping address labels in pdf format from the post. The pdf document containing the address label is formatted in a very stupid way taking up the entire A4, while just A6 would be enough. One has to cut about 70% of the page and throw the excess paper to trash, to get the address label. Then one has to use a glue stick to glue it on the shipment.
The label contains the recipient's address details, sender's details, and postage & tracking information, both as a barcode.
I would rather use standard self-adhesive sticker labels and a label printer instead. To achieve this, I would need to process each pdf file to crop out the label, shrink parts (the boxed fields) of the label slightly to fit it to the A6 shipping label size.
The cropped label needs to be downscaled to A6 size. But how to prevent the barcode from getting broken? Pdfposter breaks the parcel tracking barcode.
command-line pdf pdftk
This question already has an answer here:
Command line tool to crop PDF files
8 answers
How do I scale page in pdf files in Ubuntu? (GUI)
2 answers
I regularly receive shipping address labels in pdf format from the post. The pdf document containing the address label is formatted in a very stupid way taking up the entire A4, while just A6 would be enough. One has to cut about 70% of the page and throw the excess paper to trash, to get the address label. Then one has to use a glue stick to glue it on the shipment.
The label contains the recipient's address details, sender's details, and postage & tracking information, both as a barcode.
I would rather use standard self-adhesive sticker labels and a label printer instead. To achieve this, I would need to process each pdf file to crop out the label, shrink parts (the boxed fields) of the label slightly to fit it to the A6 shipping label size.
The cropped label needs to be downscaled to A6 size. But how to prevent the barcode from getting broken? Pdfposter breaks the parcel tracking barcode.
This question already has an answer here:
Command line tool to crop PDF files
8 answers
How do I scale page in pdf files in Ubuntu? (GUI)
2 answers
command-line pdf pdftk
command-line pdf pdftk
edited Mar 13 at 5:36
Ossi Viljakainen
asked Mar 12 at 8:54
Ossi ViljakainenOssi Viljakainen
1051210
1051210
marked as duplicate by pomsky, Parto, Kulfy, karel, Charles Green Mar 12 at 14:03
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by pomsky, Parto, Kulfy, karel, Charles Green Mar 12 at 14:03
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
You need to crop, ok. But do you need to resize/scale too? If so, this could add some issue in barcode reading. Hop you just have to crop. See pdfcrop.sourceforge.net, linuxcertif.com/man/1/pdfcrop/#EXAMPLES_2241h - For resizing/scalling, see github.com/tavinus/pdfScale/blob/master/pdfScale.sh
– cmak.fr
Mar 12 at 10:19
Cropping is not enough, needs also scaling, and possibly even more complicated operations, such as scaling down only the boxed fields, while maintaining the bardcode size. Thanks for the links, I will study them and see how to solve this.
– Ossi Viljakainen
Mar 12 at 10:38
Thanks, so far I have been able to crop & downscale with the following: pdfcrop --margins '-86 -1 -86 -250' infile.pdf outfile.pdf But how to prevent the barcode from getting broken? Pdfposter breaks the parcel tracking barcode. However, the postage stamp barcode doesn't get broken. How to fix this?
– Ossi Viljakainen
Mar 13 at 5:37
Is pdfposter treating the pdf (including the barcode) as a raster image, rather than as vector?
– Ossi Viljakainen
Mar 13 at 6:12
what is pdfposter ?
– cmak.fr
Mar 13 at 7:38
|
show 1 more comment
1
You need to crop, ok. But do you need to resize/scale too? If so, this could add some issue in barcode reading. Hop you just have to crop. See pdfcrop.sourceforge.net, linuxcertif.com/man/1/pdfcrop/#EXAMPLES_2241h - For resizing/scalling, see github.com/tavinus/pdfScale/blob/master/pdfScale.sh
– cmak.fr
Mar 12 at 10:19
Cropping is not enough, needs also scaling, and possibly even more complicated operations, such as scaling down only the boxed fields, while maintaining the bardcode size. Thanks for the links, I will study them and see how to solve this.
– Ossi Viljakainen
Mar 12 at 10:38
Thanks, so far I have been able to crop & downscale with the following: pdfcrop --margins '-86 -1 -86 -250' infile.pdf outfile.pdf But how to prevent the barcode from getting broken? Pdfposter breaks the parcel tracking barcode. However, the postage stamp barcode doesn't get broken. How to fix this?
– Ossi Viljakainen
Mar 13 at 5:37
Is pdfposter treating the pdf (including the barcode) as a raster image, rather than as vector?
– Ossi Viljakainen
Mar 13 at 6:12
what is pdfposter ?
– cmak.fr
Mar 13 at 7:38
1
1
You need to crop, ok. But do you need to resize/scale too? If so, this could add some issue in barcode reading. Hop you just have to crop. See pdfcrop.sourceforge.net, linuxcertif.com/man/1/pdfcrop/#EXAMPLES_2241h - For resizing/scalling, see github.com/tavinus/pdfScale/blob/master/pdfScale.sh
– cmak.fr
Mar 12 at 10:19
You need to crop, ok. But do you need to resize/scale too? If so, this could add some issue in barcode reading. Hop you just have to crop. See pdfcrop.sourceforge.net, linuxcertif.com/man/1/pdfcrop/#EXAMPLES_2241h - For resizing/scalling, see github.com/tavinus/pdfScale/blob/master/pdfScale.sh
– cmak.fr
Mar 12 at 10:19
Cropping is not enough, needs also scaling, and possibly even more complicated operations, such as scaling down only the boxed fields, while maintaining the bardcode size. Thanks for the links, I will study them and see how to solve this.
– Ossi Viljakainen
Mar 12 at 10:38
Cropping is not enough, needs also scaling, and possibly even more complicated operations, such as scaling down only the boxed fields, while maintaining the bardcode size. Thanks for the links, I will study them and see how to solve this.
– Ossi Viljakainen
Mar 12 at 10:38
Thanks, so far I have been able to crop & downscale with the following: pdfcrop --margins '-86 -1 -86 -250' infile.pdf outfile.pdf But how to prevent the barcode from getting broken? Pdfposter breaks the parcel tracking barcode. However, the postage stamp barcode doesn't get broken. How to fix this?
– Ossi Viljakainen
Mar 13 at 5:37
Thanks, so far I have been able to crop & downscale with the following: pdfcrop --margins '-86 -1 -86 -250' infile.pdf outfile.pdf But how to prevent the barcode from getting broken? Pdfposter breaks the parcel tracking barcode. However, the postage stamp barcode doesn't get broken. How to fix this?
– Ossi Viljakainen
Mar 13 at 5:37
Is pdfposter treating the pdf (including the barcode) as a raster image, rather than as vector?
– Ossi Viljakainen
Mar 13 at 6:12
Is pdfposter treating the pdf (including the barcode) as a raster image, rather than as vector?
– Ossi Viljakainen
Mar 13 at 6:12
what is pdfposter ?
– cmak.fr
Mar 13 at 7:38
what is pdfposter ?
– cmak.fr
Mar 13 at 7:38
|
show 1 more comment
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
1
You need to crop, ok. But do you need to resize/scale too? If so, this could add some issue in barcode reading. Hop you just have to crop. See pdfcrop.sourceforge.net, linuxcertif.com/man/1/pdfcrop/#EXAMPLES_2241h - For resizing/scalling, see github.com/tavinus/pdfScale/blob/master/pdfScale.sh
– cmak.fr
Mar 12 at 10:19
Cropping is not enough, needs also scaling, and possibly even more complicated operations, such as scaling down only the boxed fields, while maintaining the bardcode size. Thanks for the links, I will study them and see how to solve this.
– Ossi Viljakainen
Mar 12 at 10:38
Thanks, so far I have been able to crop & downscale with the following: pdfcrop --margins '-86 -1 -86 -250' infile.pdf outfile.pdf But how to prevent the barcode from getting broken? Pdfposter breaks the parcel tracking barcode. However, the postage stamp barcode doesn't get broken. How to fix this?
– Ossi Viljakainen
Mar 13 at 5:37
Is pdfposter treating the pdf (including the barcode) as a raster image, rather than as vector?
– Ossi Viljakainen
Mar 13 at 6:12
what is pdfposter ?
– cmak.fr
Mar 13 at 7:38