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

Replies

Avatar

Avatar
Give Back
Level 1
LGND_DOLLA
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Give Back
View profile

Avatar
Give Back
Level 1
LGND_DOLLA
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Give Back
View profile
LGND_DOLLA
Level 1

07-04-2021

Thank you so much for your help. Keep doing what you do my great man

Avatar

Avatar
Validate 1
Level 2
techddx
Level 2

Likes

12 likes

Total Posts

65 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 1
Level 2
techddx
Level 2

Likes

12 likes

Total Posts

65 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
techddx
Level 2

07-04-2021

Issue was resolved, it was due to another bundle deployed with the same groupId and it had to be uninstalled.

Avatar

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

162 likes

Total Posts

232 posts

Correct Reply

36 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

162 likes

Total Posts

232 posts

Correct Reply

36 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
GirishBedekar
Level 7

07-04-2021

Good to know

is the pdf being generated?

Avatar

Avatar
Validate 1
Level 2
techddx
Level 2

Likes

12 likes

Total Posts

65 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 1
Level 2
techddx
Level 2

Likes

12 likes

Total Posts

65 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
techddx
Level 2

07-04-2021

The servlet is working and the PDF is being generated with a button ajax call. However the generated PDF is corrupt. Here is my code in the button:

 

/**
* Get pdf
* @Return {OPTIONS} drop down options 
 */
function getPdf()
{
    console.log("in view pdf");
    window.guideBridge.getDataXML(
        {
        	success: function(result) {
             var formData = new FormData();
             formData.append("dataXml",result.data);
			console.log("got data"+result.data);
           	var settings ={
            				"async": true,
							"url": "/bin/streampdf",
							"method": "POST",
                			data:{'data':result.data},
   						}
            $.ajax(settings).done(function(response)
            {
                console.log("got response from POST");
				var file = new Blob([response], {
                type : 'application/pdf'
                });
                var fileURL = URL.createObjectURL(file);

                var a         = document.createElement('a');
                a.href        = fileURL; 
                a.target      = '_blank';
                a.download    = 'form.pdf';
                document.body.appendChild(a);
                a.click();
            })

    	},
    	error:function(guideResultObject) {console.log("got error"); },
        guideState : null,
        boundData  : true});

}

Avatar

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

162 likes

Total Posts

232 posts

Correct Reply

36 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

162 likes

Total Posts

232 posts

Correct Reply

36 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
GirishBedekar
Level 7

07-04-2021

Save the pdf to local file system after it is generated 

Avatar

Avatar
Validate 1
Level 2
techddx
Level 2

Likes

12 likes

Total Posts

65 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 1
Level 2
techddx
Level 2

Likes

12 likes

Total Posts

65 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
techddx
Level 2

07-04-2021

I am testing by saving it to local system first, and the PDF is successfully generated. However, when trying to get the file from button AJAX call, the PDF is corrupt.

Avatar

Avatar
Ignite 5
Level 3
gbedekar
Level 3

Likes

24 likes

Total Posts

33 posts

Correct Reply

8 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile

Avatar
Ignite 5
Level 3
gbedekar
Level 3

Likes

24 likes

Total Posts

33 posts

Correct Reply

8 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile
gbedekar
Level 3

08-04-2021

Your Adaptive Form is based on the XDP template? and you are able to merge the data with the xdp template using the DoR API. Can you please confirm?

Avatar

Avatar
Validate 1
Level 2
techddx
Level 2

Likes

12 likes

Total Posts

65 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 1
Level 2
techddx
Level 2

Likes

12 likes

Total Posts

65 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
techddx
Level 2

08-04-2021

Yes, the adaptive form is based on an XDP template and the data is being merged with the DoR API. I was able to resolve my issues and generate a functional PDF. I will share my solution shortly.