Re: [PHP] Simple PDF manipulation



At 6:32 AM -0800 12/27/06, Brian Dunning wrote:
Let's say I have a complicated PDF document, like a Christmas card, that was made in Illustrator -- too complicated to easily create from scratch using PDFlib. Is there a way to use PHP make simple text changes - like changing "Dear XXX" to "Dear John"? I've opened the files with a text editor and cannot locate the simple text, it appears to be encoded somehow. The PDF has no security or encryption in it. Thanks....

Brian:

I'm not saying that there is/isn't a way to do this, but I tried and failed.

In my investigation, I found that the insides of a PDF file are not conducive to a simple search and replace mechanism. The text is encoded in some fashion that is not easy to decode and reassemble.

The solution I came up with was to combine the existing PDF file with my coding and write over (on top of) the old to produce the new PDF that I wanted. In your case, take your Christmas Card with a big space where "xxx" appears and then write over that space with "John" in your new code.

I wish someone would show me a simpler way to do this.

hth's

tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
.



Relevant Pages

  • Re: Trouble with uploading links to host
    ... I created the origianl files in Publisher, then copied and pasted them in to ... "John G" wrote: ... PDF file is huge and in fact too big for dialup users to download. ... on my hosts's file manager. ...
    (microsoft.public.publisher.webdesign)
  • Re: how do you save a multiple page newsletter in Publisher?
    ... I'll add the answer to my News Group answer folder. ... John G. ... want a pdf creating program that will make them active in the pdf file. ... An excellent modestly priced program is PDF-XChange which you can get ...
    (microsoft.public.publisher)
  • Re: Help replacing fron fog lamp S39
    ... Send me your email and I'll send the owner's manual as a pdf file ... R / John ... for a modest price from any BMW dealer. ... fog lamp I was trying to avoid the expense right now. ...
    (alt.autos.bmw)
  • Re: Creating a PDF
    ... believe that the free version can be use for business use, ... and you can browse to a save folder. ... The resulting .pdf file can be viewed on any computer ... John Inzer ...
    (microsoft.public.publisher)
  • Re: Trouble with uploading links to host
    ... John G. ... The trouble is that I have uploaded the pertinent files to the host's ... manager but when I go to click on a pdf file or try to access a ... on my hosts's file manager. ...
    (microsoft.public.publisher.webdesign)