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 6164901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:04:22+00:00 2026-05-23T22:04:22+00:00

In one of our applications, we have a script dump data from a database

  • 0

In one of our applications, we have a script dump data from a database into a well-formed XDP file, which the user can download. The XDP contains a reference to a PDF on the same server via the <pdf> tag. The idea is the user can dump the data, get the XDP, which will download the PDF and automatically fill in the data, which they can then save, print, or e-mail.

The problem is that Adobe Reader (or Acrobat) instead opens the default web browser to try to download the PDF, and if you open it from the browser it does not automatically populate the data dumped from the database. If I take the XDP and use a text editor to change the link in the <pdf> tag to a locally downloaded copy, the form populates fine, so the XDP is written correctly, however this is not a practical solution, as most users wouldn’t know how to do that.

My question is if there is a way to automate this process, so that Adobe Reader or Acrobat downloads the PDF file and populates the data automatically, and doesn’t try to route the process through the web browser.

EDIT

Using Seeker’s answer we came up with the following short snippet in PHP:

$filename = ""; // Your file here
$contents = base64_encode(file_get_contents($filename));

Then in the PHP file that handles the XML:

<pdf xmlns="http://ns.adobe.com/xdp/pdf/">
    <document>
        <chunk><?php echo $contents ?></chunk>
    </document>
</pdf>
  • 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-23T22:04:22+00:00Added an answer on May 23, 2026 at 10:04 pm

    I was dealing with the exact same issue today. You should include the PDF file using Base64 encoding inside your xdp file.

    in your XDP file replace this: <pdf href="http://.../form.pdf"> with :

     <pdf xmlns="http://ns.adobe.com/xdp/pdf/"><document>
         <chunk>**CONTENT OF YOUR PDF IN BASE64 GOES HERE**</chunk>
        </document>
     </pdf>
    

    That should solve your problem.

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

Sidebar

Related Questions

I have recently integrated the .NET NLog logging component into one of our applications
We have recently upgraded one of our applications from Java 1.4 to Java 6.
We have very strange problem, one of our applications is continually querying server by
We have an application that generates simulated data for one of our services for
I'm changing our application from one set of code & one database to one
We have a script right now which our Windows users run on a Linux
We have in one of our applications a single eclipse project that contains all
We have a web application that manages inventory for our computer support group. One
In one of our commercial applications (Win32, written in Delphi) we'd like to implement
Due to repetitive errors with one of our Java applications: Engine engine_0: Error in

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.