Expand my Community achievements bar.

XDP <pdf href="..."> doesn't load data if PDF is online

Avatar

Level 2

In Acrobat I can import/Export data off my LiveCycle form.

XDP file exported by Acrobat has the following lines:

     <pdf href="../myForm.pdf"/>

</xdp:xdp>


If load this file by Acrobat, is works perfectly (Opens the form and populates it). However, I need to have my PDF file on a server, so I edited the file:

     <pdf href="https://mysite.com/myForm.pdf"/>

</xdp:xdp>

Now when I open it in Acrobat Pro X,  it opens my web browser and loads the PDF but does not populate it.

Do you know what am I doing wrong? or is this another restricted feature?

15 Replies

Avatar

Level 2

I made some progress I'd like to share. Instead of referencing the PDF I used Base64 encoding to include the PDF in the XDP file. It works when I open the file in Acrobat. But when I feed it to the web browser I get the following pop-up error from Acrobat Plugin (inside FireFox):


The XDP file returned by the server is trying to open local file:


file:///C|DOCUME~1/ADMINI~1/LOCALS~1/Temp/A9RBD8D.tmp.dir/A9RBD8C.pdf


but access to local file system is denied.

>OK<

The pop-up window's title is "Adobe Acrobat"

I should mention, to get the content open inside the browser I used "application/pdf" as the content type of my http request sent to the browser.

any comment is welcome!

Avatar

Level 2

I changed the  content type to "application/vnd.adobe.xdp+xml" and that solved the problem.

Avatar

Level 1

I was wrong change MIME type helped but did not solve the problem.

Opening an XDP file in browser causes Acrobat to issue the error message in my original post.

Please help.

Avatar

Level 2

Acrobat_error.jpeg

Above error is as I have described in my first post pops up by opening a XDP in browser when it is sent from a server. But if I save the same XDP (in FireFox file > save as...) to the Desktop then drag and drop it into a new tab, it opens beautifully.

this seems to be a Adobe Plugin bug. The temproary file was created by the plugin it self !

Im using Adobe Reader 10.1 and FireFox 5

Avatar

Level 1

Hey Seeker,

We have hit this issue as well.  You seem to be the only other human (assuming you are human) to have encountered this issue.  Did you ever find a way around this? 

We are pulling the XDP out of a blob field and trying to load up the PDF.

Thanks in advance for any help or guidance you can provide.

MDB

Avatar

Level 1

Got the same issue.

I can't open it in my browser. And if i got it opened(because there is a local copy of the form on my computer), i can't save it with the data inside. I know, that i have to give Reader Extension Rights, but how do i do that inside of php-code?

I have a form that is created with LiveCycle, and i want to fill up that form with values from my Database.
So i create a .xdp-file on my own, it looks like this:


I get a Warning, that it can't find the pdf-file that is referenced to this XDP-File. What's wrong?

And how can i populate the form with the values inside? I mean, how can i make it a complete PDF instead of a combination of pdf and xdp?

Some answers would be awesome. Maybe atleast some alternatives.

I am going to write a Tutorial for this, if i get it to work. Already invested soooo much time and still no solution.

Avatar

Level 1

I solved this issue somehow.

Instead of linking to the PDF file I embedded the PDF file in the XDP file with

I loaded the XDP file with modified headers

I am loading the XDP as an attachment, not inline. That opens a Download/Open window that allows you to open that file in Acrobat Reader (not the browser plugin, the standalone) - with PDF doc an populated data.

I worked on that a lot - but no chance of showing the pdf with populated data inside the browser, with the acrobat reader plugin.

Acrobat Reader X and IE10

Avatar

Level 1

I have the same problem (see http://forums.adobe.com/message/5217667#5217667).  I use the following PHP code to send the .xdp file to the browser:

header('Content-type: application/vnd.adobe.xdp+xml');
header("Content-Disposition: inline; filename=$XDPName");

echo $xdp;

Here's some things I've noticed:

1. This used to work fine, both with .fdf and .xdp files that I would generated and download to the browser.  It stopped working when I started using Adobe Acrobat X to save the .pdf file.

2 I originally would use MS Word to create a form, print it as a .pdf, then use Adobe Acrobat to add fields and save it with Reader Extensions.  Then I started using Adobe LiveCycle Designer to create the form, saved it as a .pdf, then opened that .pdf with Adobe Acrobat, make no changes, and save it as a .pdf with Reader Extensions.

3. The latest thing I've discovered (just yesterday), is that when I'm on the server or using my laptop on the LAN, it does NOT work. When I access it from outside the LAN with my laptop, it works.  You'd think that being inside the LAN and using

<pdf href="https://mysite.com/myForm.pdf"/>

it might have a problem getting the form, but it displays the form just fine, but doesn't populate it with the data. What is different about accessing it from the LAN instead of WAN that lets it find the form, but not populate the data?

4. I connected my laptop to the LAN via VPN, then tried it, and it works (shows the form & populates it with data).

Avatar

Level 1

Your pdf wouldn't get populated with data if you are not loading the pdf

locally. Unless you have some licenses or perhaps certifications,... Its

supposed to be a security risk blocked by Adobe!

I found the work around to embed the pdf in the xdp file using base64

encoding as oppose to linking to it.

Hope this helps

Avatar

Level 1

Actually, seeker_, I wasn't quite right. It works everywhere except when on the server itself.  I erroneously thought that when I was using my laptop while on the LAN that it didn't work, but it actually does.  So the form does not need to be local; in fact, apparently just the opposite in my case -- it works as long as I'm not on the server.

Odd that it used to work, and quit working after upgrading to Adobe Reader X.

Avatar

Level 1

Please post some code from your xdf file so we know we are on the same

page. I have solved this problem before.

Avatar

Level 1

I think the difference may be that I'm using SSL. Here's a sample of a generated xdp file:

<?xml version="1.0" encoding="UTF-8"?>

<?xfa generator="XFA2_4" APIVersion="3.5.11185.0"?>

<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">

<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">

<xfa:data>

<topmostSubform>

<FormDate>06/12/2013</FormDate>

<DateOfBirth>04/09/2008</DateOfBirth>

...other stuff...

</topmostSubform>

</xfa:data>

</xfa:datasets>

<pdf href="https://MyWebsite.com/MyBlankForm.pdf" xmlns="http://ns.adobe.com/xdp/pdf/"/>

</xdp:xdp>

Notice the "https" in the pdf href -- that may be the difference. This works fine as long as I'm not trying it from the PC that's serving it.

Avatar

Former Community Member

"Me too." We're having this problem as well. I'm switching from <pdf href="http:..."> to embedded PDF. We have the same HTTP response headers.

I'll try HTTPS next, but SSL really isn't desirable for an intranet. Somehow the zones are not working properly. Some server/browser pairings work fine but others don't, within the same internal networks.

Is there any security logging that can be observed to find out exactly what security rule(s) are failing?

Avatar

Former Community Member

I enabled SSL and changed the pdf href to use https. We still get the problem of no prefill.

I tried SSL with an embedded PDF, and I still get the problem of trying to open a local (temp) file.