Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

converting a xdp (xml variable) to pdf

Avatar

Avatar
Level 6
neptas
Level 6

Likes

0 likes

Total Posts

259 posts

Correct Reply

0 solutions
View profile

Avatar
Level 6
neptas
Level 6

Likes

0 likes

Total Posts

259 posts

Correct Reply

0 solutions
View profile
neptas
Level 6

29-12-2008

Hello,



In my process I need to transform a xdp file (the template part). For that, Im getting a xdp file from the repository to a xml variable. Then I apply a xslt template on that xdp and get a new xdp (in a xml variable). Finally I want to render this xdp to a pdf file, and this is where I get an error saying I need to give a content root ID. However, since Im trying to feed the form service with a template stream (in a xml variable) I dont have any content root... I believe I would be able to save the xdp variable to disk and then give a url to formservice, but I rather work only in memory, using variables.



Any idea on this?



thank you

Replies

Avatar

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct Reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct Reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile
Jasmin_Charbonn
Level 10

05-01-2009

"However, since Im trying to feed the form service with a template stream (in a xml variable) I dont have any content root."



If you feed the form service with a template stream, you need to pass it as part of the "Form Data" parameter of the renderPDFForm operation and not the "Form to Render" parameter.



If you specify something in the "Form to Render", it'll expect a Content Root URI.



Jasmin

Avatar

Avatar
Level 6
neptas
Level 6

Likes

0 likes

Total Posts

259 posts

Correct Reply

0 solutions
View profile

Avatar
Level 6
neptas
Level 6

Likes

0 likes

Total Posts

259 posts

Correct Reply

0 solutions
View profile
neptas
Level 6

08-01-2009

Jasmin,



It worked well thank you 🙂



But I was wondering: if I need to pass the xml variable with the xfa template as part of the "Form Data" parameter, how can I pass the data part of the form to make a merge with the template? Do I need to create a second step in my process that will take this output PDF file (in a variable) and a data file, or is it possible to make this merge in the same step? (for instance, feeding the xfa template with a datset node)



Thank you

Avatar

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct Reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct Reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile
Jasmin_Charbonn
Level 10

09-01-2009

"But I was wondering: if I need to pass the xml variable with the xfa template as part of the "Form Data" parameter, how can I pass the data part of the form to make a merge with the template?"



XDP data can contain both the template and the data. You can pass both at the same time.



Jasmin

Avatar

Avatar
Level 6
neptas
Level 6

Likes

0 likes

Total Posts

259 posts

Correct Reply

0 solutions
View profile

Avatar
Level 6
neptas
Level 6

Likes

0 likes

Total Posts

259 posts

Correct Reply

0 solutions
View profile
neptas
Level 6

09-01-2009

Jasmin,



One more thing: because I´m referencing fragsments in this dynamically created xdp form, the process is not resolving the fragments right. I understand that if I give a document path, the fragments would be resolved based in this base path, however, in my case I dont have a base path...



Thank you