Expand my Community achievements bar.

SOLVED

Dynamic update of pdf files on web server with xml

Avatar

Level 2

Hi forum

Is it possible, to make a pdf form quiz, on a web site, there are updating it contents every day just bye replacing a xml file there have the text for the questions.?

I just need some guindes or ide how to make this. ( i am new in xml/ dynamic pdf files)

And do i need a LiveCycle form server to to this ?

Regards

Th

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

It needs refinement but is this the kind of thing you had in mind? You will have to update the File/Form Properties/Preview with the location of where the xml data file is located. I also had to modify the structure of the xml file ....to make it easier. After yo update the preview location ...simply do a preview to see the result.

Paul

View solution in original post

22 Replies

Avatar

Former Community Member

Yes this is possible .....I have seen a number of people do this in a number of different. The LC Forms requirement would depend on how sophisticated you want the solution to be. Can you elaborate on how you want to do this?

Paul

Avatar

Level 2

Hi Poul

Tanks for you reply.

I don't know how to do this. My idea is to keep et simple. If i can make a pdf file there link to a xml file, all on line, and then  just update the questions.

ex.

Q1: Is this a good forum ?

     A1: Yes

     A2: No

etc...

Q5: Do you use it a lot ?

     A10: Yes

     A11: No

and then a sumit bottom.

I will like to get all the Answers send to a web server and back to a mysql server.

I have been testing but i have problems with the rendering of the dynamic pdf and the xml file when opening i reader and i don't know if it possible to put it on a web server.

I hope you can guide me in the direction to solve this.

Best regards

Tonny

Avatar

Former Community Member

Can you post a sample XML file that will contain the structure of what you are looking for? I will take that XML file and build a simple sample for you.

Paul

Avatar

Level 2

Hi Poul

I will be happy if you have the time to a small example.

My idea is a few questions, and maby a way to set the answars between 1 to 5 or yes/ no.

Regards

Tonny

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

<Quizes Name='Game1' Id='1000'>

<Quiz Question="1">

<Question>Will you use this forum ?</Question>

<Value NoOfValues="5">

  <MinValue>Good</MinValue>

  <MaxValue>Bad</MaxValue>

</Value>

</Quiz>

<Quiz Question="2">

<Question>Are you a designer ?</Question>

  <Value NoOfValues="2">

  <MinValue>Yes</MinValue>

  <MaxValue>No</MaxValue>

</Value>

</Quiz>

</Quizes>

Avatar

Correct answer by
Former Community Member

It needs refinement but is this the kind of thing you had in mind? You will have to update the File/Form Properties/Preview with the location of where the xml data file is located. I also had to modify the structure of the xml file ....to make it easier. After yo update the preview location ...simply do a preview to see the result.

Paul

Avatar

Level 2

Hi Poul

It looks good.

How do i connect to a xml file if it on ex: http://www.mydomane.com/pdf/quiz_Data1.xml

I have tryed but it will not connect to the data.

Do you have any idea ?

Regards

Tonny

Avatar

Former Community Member

For the preview it needs a file reference not a web reference. Once the form is designed you should be able to use that file to reference the data and have it call the appropriate template.

paul

Avatar

Level 2

Hi Poul

First tanks for all your help.

When I open the PDF file in LiveCycle all the contents are render fine in preview. If I open the file in Acrobat 9 Pro Extended the contents are first render when I have been in Forms>Manage Form Data > Import Data  - and select the xml file. Is this correct? / Is there a way to auto import / render the pdf file bye the client?

Regards

Tonny

Avatar

Former Community Member

Yes that is correct. When you are "Previewing" the pdf is being created on the fly and the data is being added at that time. When you have already created the PDF then you must import the data into the PDF. There is a server based product that will merge the data onto the template and serve up a PDF for you.....it is called LiveCycle Forms if you are interested.

Paul

Avatar

Level 2

HI Poul

Tanks.

See you out there....

/Tonny

Avatar

Level 2

Hi Poul

i forgot one question.

Is it possible to collect the answered form data by sending/submitting, it to a soap web service ? or is the only possible to send e-mail as standard ?

/regards

Tonny

Avatar

Former Community Member

You can send your collected data via a web service but if  you are using Reader you will have to Reader Extend the form to allow it to do web services. This requires the Reader Extensions server not the Reader Extensions in Acrobat.

You can email the data file with Reader or Acrobat without any worries. If you decide that you want to send back the entire PDF then you will have to Reader Extend to allow that. You can do this with Acrobat or Reader Extensions server.

Paul

Avatar

Level 6

Paul, I've been wrangling with web service access for a little while.  Are you saying that the "Enable Usage Rights..." tool in Acrobat will not enable web service usage in Reader?

Avatar

Former Community Member

That is what I am saying. Acrobat will work without issue but you MUST Reader Extend using LiveCycle Reader Extensions server to turn on Web service support in Reader.

Paul

Avatar

Level 2

Hi Paul

I am a littel stuck in this.

Why can i not reseve the user choice after he/She have chosen from the the drop down list.

All i get back is a copy of the xml source.

I have add a e-mail summit, thats all.

I have made some small test with a new form and here the anwsard are ok

Can you guide me ?

Regards

TH

Avatar

Former Community Member

The data that is submitted is controlled by the Binding parameters. On your ddList what is the default binding set to? If it is set to None then you are sking that this DD not be included in the data file. If it is set to Normal then it will be included. If you have a schema definition then it must have a valid expression that corresponds ot the schema to be included.

Paul

Avatar

Level 2

Hi Poul

Tanks for you reply

By the way "Today is you 2 year day " you account was activated on the 11 feb 2008.

Do you think you have time to do it on the example you created ?

I have tryed, on the Subform level and on the dropdown list - all i get is a "warning" sign and when i look in the respond file inside the e-mail, it is the xml source file i get.

Regards

TH

Avatar

Former Community Member

Maybe I misunderstood your question .....what is it you want in the email ....the data or the finished PDF?

Paul

Avatar

Level 2

Hi there

I will like to get a mail (xml is fine ) but with the selections the user select in my pdf file.  ( They can select 1 to 3 inside the drop down list )

Now when i try i only get the source xml, there is used to create the questions.

I can't see the selection from the user of the form

like this:

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

- <Quizes Name="Game1" Id="1000">

- <Quiz QuestionNumber="1">

<Question>Will you use this forum ?</Question>

- <Values NoOfValues="5">

<Value>1</Value>

<Value>2</Value>

<Value>3</Value>

<Value>4</Value>

<Value>5</Value>

</Values>

</Quiz>

- <Quiz QuestionNumber="2">

<Question>Are you a designer ?</Question>

- <Values NoOfValues="2">

<Value>Yes</Value>

<Value>No</Value>

</Values>

</Quiz>

- <Quiz QuestionNumber="3">

<Question>Dette er en test ?</Question>

- <Values NoOfValues="2">

<Value>Ja</Value>

<Value>Nej</Value>

</Values>

</Quiz>

</Quizes>

I have try to set the databinding but it will not work for me.

So if you can guide me where change or set the parameters in the Quiz pdf i hope i can see the way it has to be done.

Regards

TH

Avatar

Former Community Member

Are you merging the data file onto the template to get the questions and answers filled by the template? If so, there is only one xml file that can be merged onto the template and in so doing all data that is produced by that template will follow the structure of the XML. So you will have to add nodes to your input XML to hold the actual data. At the time of the merge they will be empty but once the user fills out the form those nodes will be populated (assuming you bind the appropriate field to the new nodes). You coudl create two sections under your root node. A data section to hold the filled in data and then a propop section to hold all of the data that you want the form to read when it loads.

Make sense?

paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----