PDF metadata editing

I’m trying to write a simple app that allows me to edit the metadata of a PDF (Author, Title, Subject, Keywords) with the click of a few pre-set buttons. It’s only for personal use on a project and I just can’t justify the cost of DynaPDF for such a small non-$ earning project. Does anybody know of a class or plugin that would allow me to do this for less than the DynaPDF set of plugins? (DynaPDF appears to be awesome by the way!)

You didn’t say which platform.

For Mac the CoreGraphics plugin of the MBS ones can edit what you want. I’m creating a new document so I use http://www.monkeybreadsoftware.net/coregraphics-folderitem-method.shtml

We have DynaPDF, PDFKit, CoreGraphics and a few Cocoa classes around PDF.
But for Windows, we only have DynaPDF.

PS: If price is a problem, please check our website end of next week.

on windows platform, I have used pdftk which worked very well for me:

pdftk

Another one for windows: http://www.becyhome.de/becypdfmetaedit/description_eng.htm

can be used from command line as well.

Sorry for the lack of details on my platform. I’m on Mac. Thanks for the info, I’ll try the coregraphics MBS.

Okay I’ve been playing with the CoreGraphics plugin for a bit. But I’m stumped by what would probably be fairly simple for somebody less newbie than me. As I mentioned, I want to open, (ideally) display, then modify metadata and save. But I can’t quite figure out how to do all that. I’m trying to modify some of the sample code but I’m getting all flustered with things like CGMakeRectMBS, CDPDFContextMBS, CDPDFDocumentMBS. At this point I’d be happy with opening a PDF, creating a new PDF with my new metadata then somehow copying the contents of opened pdf into new pdf and saving it. Here’s the completely non functional sample code I’ve been trying to work with any help would be greatly appreciated:

openfile(f as folderitem)

dim p as CGPDFDocumentMBS
  dim f_out as FolderItem
  dim c as CGContextMBS
  dim c as CGPDFDocumentMBS
  dim r as CGRectMBS
  f_out=SpecialFolder.Desktop.Child("MyoutputPDF.pdf")
  
  r=CGMakeRectMBS(0,0,100,100)
  c=CGNewPDFDocumentMBS(f_out,r,"PDF from JJ","Jeremy","MBS Plugin 2.7")
  
  if f<>Nil then
    c=CGOpenPDFDocumentMBS(f)
    
    if p<>nil then
      pdf=p
      Refresh
      c=p
      
    else
      MsgBox "Failed to open PDF file!"
    end if
  end if

Well, you would need to make a loop to copy pages.
And with copy, I mean you create new pages in output PDF and draw existing page inside the new one.

PS: if you need this for Win or Linux or with support for more PDF features than CoreGraphics supports, you should look into our DynaPDF samples.