Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 02-14-2013, 06:00 PM   #1
Registered: Aug 2009
Location: soon to be independent Scotland
Distribution: Debian
Posts: 120

Rep: Reputation: 17
How to add a bit of text to a PDF file?

I would like to add a bit of text in the margin of a PDF file, for example a date or web address.

Any tips which tool to use or an example would be greatly appreciated.
Old 02-14-2013, 06:32 PM   #2
John VV
LQ Muse
Registered: Aug 2005
Posts: 15,907

Rep: Reputation: Disabled
Have you tried using Libreoffice ?

from the terminal
pdf2ps then edit and run ps2pdf
Old 02-14-2013, 06:42 PM   #3
Registered: Aug 2009
Location: soon to be independent Scotland
Distribution: Debian
Posts: 120

Original Poster
Rep: Reputation: 17
Sorry, I forgot to add that I would like to do this via the commandline, and, if necessary, convert to PS. I was envisaging storing the text and position in a meta file.
Old 02-15-2013, 06:53 AM   #4
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,219

Rep: Reputation: 272Reputation: 272Reputation: 272

You could use pdftk and add a pdf "watermark" or "stamp". Make a PDF with the text in the margin, then use pdftk to put the text pdf as watermark (below) or stamp (above).
1 members found this post helpful.
Old 02-16-2013, 05:41 AM   #5
Registered: Nov 2003
Location: Edinburgh, UK
Distribution: Arch
Posts: 43

Rep: Reputation: 18
If you are planning to start with a given PDF file and do a batch run to generate multiple copies of that PDF, each with specific text in certain places (for example, filling out a standard form multiple times), then flpsed may be what you need. It is primarily an interactive editor but it lets you insert named tags at arbitrary places and then do non-interactive batch runs to insert text at those places. The program works with Postscript files, but you can use pdf2ps and ps2pdf



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
Need to convert pdf file to text format in linux 4.7 rahman2691 Linux - Newbie 6 12-27-2010 09:50 AM
What would cause text-to-file and PDF to file printers on a cups system to stop? slinx Linux - Software 2 12-02-2008 10:32 AM
what is the command to add text into a text file? newbiebash Programming 2 09-08-2008 09:07 AM
How to add a text to first line of a text file? oskeewow Linux - Newbie 6 04-23-2008 01:40 PM
pdf to text file converter?? bobb_roof Linux - Software 6 10-30-2006 12:50 AM

All times are GMT -5. The time now is 09:40 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration