This is not a very good idea. This is going to convert all of the text in your PDF into a bitmap, very likely swelling the size and definitely making it impossible to select and copy text to the clipboard, for example.
For the specific thing you are talking about, adding page numbers to the PDF, you should use a PDF based tool such as pdftk. http://www.pdfhacks.com/pdftk/ Unfortunately pdftk won't by itself be able to add page numbers; but any of several methods can generate a second PDF with the page numbers, which can then be combined with the original PDF, page by page, using pdftk. (Among the easier methods is making an n-page Word document of all blank, numbered pages and printing it to PDF.) If you have a little more flexibility, you can use iText (java) or iTextSharp (.NET) to write a simple page-number-stamping program. (pdftk is itself based on iText.) On Tue, Aug 12, 2008 at 2:24 PM, Adam Dershowitz <[EMAIL PROTECTED]>wrote: > I am trying to add displayed page number to a pdf. The problem is > that the draw command is not expanding the variables. I am not sure > what I am doing wrong. I am ending up with the literal "%p" rather > than the actual page number. I have tried a few different things like > this: > > convert testin.pdf -draw 'text 100,100 "%p"' testout.pdf > > If I do it this way: convert testin.pdf -draw 'text 100,100 %p' > testout.pdf > then I get an error: convert: Non-conforming drawing primitive > definition `p'. > and my image just has a literal %. > > Just to make sure that it was not an issue with gs and pdfs I also > tried a few tests with jpgs and got the same results. > > I do know that montage is correctly adding labels so things like this > do work: > montage -label "%f" *.jpg output.jpg > > What am I doing wrong? How can I add page number to a pdf? > > I am using ImageMagick 6.4.2-7 on a Mac, and using the Bash shell. > > Thanks much. > > --Adam > > > > _______________________________________________ > Magick-users mailing list > [email protected] > http://studio.imagemagick.org/mailman/listinfo/magick-users > _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
