Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6128261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:36:25+00:00 2026-05-23T16:36:25+00:00

I’ve read PDF Editing in PHP? but haven’t found quite what I’m looking for.

  • 0

I’ve read PDF Editing in PHP? but haven’t found quite what I’m looking for.

Basically I need to take a DOC (read: not .docx) file, which will be used as a template, find certain strings (e.g, [Patient Number], [Site Number], etc) replace them with values that I’ll retrieve from a database and then save that file as a .pdf file.

Here’s the important points

  • I’d rather avoid zend framework (or any framework) for the purpose of keeping my application’s software light and not having to maintain another 3rd party piece of code in this project (jquery,jquery-UI,jqGrid, etc)
  • I can’t use DOCX because I don’t have that version of Office installed on my work computer. I will eventually, but I don’t know when that’ll happen and I need to finish coding this ASAP
  • The converting to PDF at the end is somewhat optional. I’d like to have it as interoperable as possible. I already have ezPdf and fPdf on the system, so perhaps I can just feed the generated Word binary into ezPdf/fPdf and generate the PDF that way.

Are there any PHP libraries out there that allow reading a .doc file and then the ability to edit the text and then write it back to the disk?

I’ve tried ezPdf and fPdf, but the specifying of text block coordinates got too tedious and involved too much guesswork and trial & error.

Thanks in advanced!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:36:26+00:00Added an answer on May 23, 2026 at 4:36 pm

    I ended up using docx (with the assistance of my co-worker (who had office 2007) exporting the file for me) and completely (for now at least) forsaking the PDF conversion.

    I did install phpdocx and after juggling around with a bunch of extensions (XSL, mbstring, etc) I had to get the server administrator to install, it did generate the PDF based off of my generated docx file, it didn’t convert the styles or image used in the header, so it looked absolutely horrible.

    Due to time constraints, I had to completely skip out on PDF conversion and just use the docx file. This will be something we re-visit in the future, but for now, docx it is.

    We might also look into LiveDocX, but unfortunately that deals with uploading files to the cloud and because these files contain patient date (however, mostly blinded) I have to get approval from our legal department to make sure we’re in accordance with HIPAA privacy laws.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I need to clean up various Word 'smart' characters in user input, including but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.