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

  • SEARCH
  • Home
  • 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 8724127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:45:56+00:00 2026-06-13T07:45:56+00:00

I get my images in my pdf document on my localhost but on the

  • 0

I get my images in my pdf document on my localhost but on the production site i get the error TCPDF ERROR: [Image] Unable to get image i am using an html img tag to get the images and the src is the directory path to this image not a url, but i found out that TCPDF is adding the path i give it with the path to my www folder like:

path to picture i give to tcpdf: home/inc_dir/img/pic.jpg
tcpdf looks for it here: home/www/home/inc_dir/pic.jpg

can someone please help me find out tcpdf is concatenating the directories?

  • 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-06-13T07:45:57+00:00Added an answer on June 13, 2026 at 7:45 am

    TCPDF is using $_SERVER['DOCUMENT_ROOT'] as a root directory of all your images, and builds their absolute paths in relation to it. You can change it either in $_SERVER or with this PHP constant: K_PATH_MAIN:

    define('K_PATH_MAIN', '/path/to/my-images/');
    require_once 'tcpdf.php';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using below code to convert PDF to PNG image. Document document =
My code to convert HMTL to PDF using tcpdf. $html = '<pre> <br/> <h3><a
I'm using the PHP class TCPDF's writeHTML method for creating a PDF document. It
Am looking for a way to get image of the first page in pdf
Possible Duplicate: How to get images from URL in Delphi I'm using Delphi 2010,with
I have a script that will get images from page, but how do I
I'm using a foreach loop to get images from the graph API in facebook.
I'm attempting to make a PDF from a HTML document, and this document has
So I coded a PDF document using fpdf (PHP) However when we go to
I am using iText to generate my custom .pdf document. I tried a lot

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.