Question
COFORGE
GB
Last activity: 21 Sep 2017 3:03 EDT
PDF generation issue through standard agent
Having hard time to generating PDF through standard agent. PDF with improper alignment, without styles and colors as it generated from backend process (standard agent). If it is generated from front end using create pdf smart shape everything is looking good, but if it is created from agent no styles and colors applied. Please help me out of this.
***Updated by moderator: Lochan to update Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 11 Jan 2017 2:08 EST
BlueRose Technologies
AU
Hi,
Perform below steps and your issue will get resolved.
1) Instead of configuring the Queue method in activity step, configure the queue method in java step with necessary parameters passed.
2) The java step code is as follows:
tools.getParameterPage().putString("pyID", myStepPage.getProperty(".pyID").getStringValue());
tools.getParameterPage().putString("inStandardsMode","true");
final ClipboardPage portal = tools.findPage("pyPortal");
final List otherPages = new ArrayList(){{add(portal);}};
tools.getRequestor().queueBatchActivity("Activity_class_name", "Activity_name",tools.getParameterPage(),null,otherPages,false );
Thanks and Regards,
Prudhvi
Pegasystems Inc.
IN
Hello
how you are definining the styles in the generated PDF ?
May be this is a good article to check : https://community.pega.com/support/support-articles/pdf-download-not-picking-skin-rule-styles
COFORGE
GB
Earlier it was from the skin and was working fine with Generate PDF shape now we are going for agent and Applied skin rule through the non autogenerated HTML as mentioned in link.
https://community.pega.com/support/support-articles/pdf-download-not-picking-skin-rule-styles
but the result is still same, May i know what am i missing?
Approach followed
<html>
<head>
<pega:static type="style" app="webwb">
<pega:file name="workform_demo.css" />
</pega:static>
</head>
<body>
<%
StringMap sectionListKeys = new HashStringMap();
sectionListKeys .putString("pxObjClass", "Rule-HTML-Section");
sectionListKeys .putString("pyClassName", "Demo-FW-Work");
sectionListKeys .putString("pyStreamName", "SummaryForm");
String sectionStream = tools.getStream(sectionListKeys, null);
out.println(sectionStream);
%>
</body>
</html>
Thanks in advance :-)
Pegasystems Inc.
US
Also the following SA seems to align to your use case. Which version are you on it indicates the issue is corrected in 7.1.8?
COFORGE
GB
I am working on 7.2 version. Problem still exists it seems.
BlueRose Technologies
AU
Hi,
In the below article, it is mentioned like <pega:file name="ExportToPdfStylesCSS.css" /> but you are using <pega:file name="workform_demo.css" />. May I know the reason why there is conflict here.
Article: https://community.pega.com/support/support-articles/pdf-download-not-picking-skin-rule-styles
Thanks in Advance!
COFORGE
GB
Hi Prudhvi,
Skin rule CSS file is applied in my case.
COFORGE
GB
Any solution would be appreciated. Please let me out of this issue.
PEG
IN
May I know the PDF generation if you run the activity from designer studio not from standard agent? Are you seeing the styles being applied to the generated PDF?
COFORGE
GB
Yes, skin is applying.
IN
Hello,
Did you created the custom CSS file at your end and defined the required styles on it? If so, could you please verify if the files are being picked properly or not(by following the steps mentioned by Ganga).
COFORGE
GB
Hello Ajit,
Application skin css file is applied and invoked as mentioned in above HTML code. Still facing same issue.
Accepted Solution
Updated: 11 Jan 2017 2:08 EST
BlueRose Technologies
AU
Hi,
Perform below steps and your issue will get resolved.
1) Instead of configuring the Queue method in activity step, configure the queue method in java step with necessary parameters passed.
2) The java step code is as follows:
tools.getParameterPage().putString("pyID", myStepPage.getProperty(".pyID").getStringValue());
tools.getParameterPage().putString("inStandardsMode","true");
final ClipboardPage portal = tools.findPage("pyPortal");
final List otherPages = new ArrayList(){{add(portal);}};
tools.getRequestor().queueBatchActivity("Activity_class_name", "Activity_name",tools.getParameterPage(),null,otherPages,false );
Thanks and Regards,
Prudhvi
COFORGE
GB
Hi Prudhvi,
The java code you have provided is working fine. No parameters are required in my case, just changed class and activity.
tools.getParameterPage().putString("pyID", myStepPage.getProperty(".pyID").getStringValue());
tools.getParameterPage().putString("inStandardsMode","true");
final ClipboardPage portal = tools.findPage("pyPortal");
final List otherPages = new ArrayList(){{add(portal);}};
tools.getRequestor().queueBatchActivity("Activity_class_name", "Activity_name",tools.getParameterPage(),null,otherPages,false );
Thank you Prudhvi to get me out of this issue.
BlueRose Technologies
AU
Ok. Thanks for confirmation Nagaramu.
Morgan Stanley
IN
This did not work for me. :(
Pega 7.1.9
Via agent, no styles applied.
Running the activity from designer studio, I am getting grey background in the pdf.
COFORGE
GB
Hi Prudhvi,
This has been worked for long time. Unfortunately from last 10 days the same problem we are getting in STG and DEV environment but it is good in UAT. Didn't do any code changes.
PDF is generating from the batch requestor but skin is not applied. Please suggest.
BlueRose Technologies
AU
Hi NagaRamu,
Please revert back the Java changes and keep the given code as it is. It will work for your scenario. Please recompile the function in all nodes.
Thanks,
Prudhvi
accenture
CN
In the 7.2.2 version still have the same problem, it there any solutions?
Please kindly tell me how to fix it.
Pegasystems Inc.
IN
Hi,
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread
Thanks!