Dan Sweeney ,
Is this happening on occasion or all of the time? This was a known issue in some earlier versions of ServiceMax that have been addressed in more recent releases over the last 12 months. There seems to be a tight correlation of corrupt PDF files, or PDF docs failing to merge, and high sync times.
Also if you have a trigger on Attachment's object, that tries to send the email right as the Attachment gets created - it will send a corrupt file :/
Needs a delay to "fully merge" after inserted on the server - at least last time i checked
What ServiceMax version are you on?
The PDF is generated using the SFDC PDF engine. We've had issues with our Sales reps having PDF quotes generated properly. it's usually a browser issue with them. You could take the standard approach to all things browser related: clear the cache & temp files. Try different browsers and make sure the browser is current. Hopefully its not the ServiceMax managed package.
this is a link to another post for the same reason: Generating PDF from Ipad not working properly
Is this SFM used on the browser as well? If so, are you receiving any errors online when you are trying to generate the report? I have seen this happen when there is a syntax error, empty table, etc in the html for the report.
Yes its happening on the browser as well. I believe it is a syntax error in the output doc.
There's a few ways to go about looking for empty tables and troubleshooting. I would first recommend to make a test copy of the output document template. This allows you to preserve the original and test with the copy.
Using the test copy template:
1. Search the Output Document's Template Designer for empty <tbody></tbody>, <thead></thead>, or <tr></tr>.There wouldn't be any syntax in between them. Remove any that are empty and test.
2. Via the WYSIWYG Remove one section (table) at a time then save and test every time after. This allows you to identify the table that is causing the error. You can then adjust the syntax as needed.
Let me know if this is helpful.
output doc html
The SFM template designer is ok for layout design - but doesn't give a lot of assistance when dealing with the code itself
I would suggest using a third-party software like notepad++
Helps a lot to have color-coding, highlighted variable name finding, compare pluging, etc.
Plus it has a HTML decoder feature that can help a lot with output docs
just my two cents
referred to notepad++ by Stephen Lortscher
We also had this issue and I submitted a case regarding it because we couldn't figure out what was causing it and also because sometimes it worked and sometimes it didn't. In our case, the issue had to do with us having an empty table in our code. We were calling to an additional expense type but the table was empty. So when the WO had an expense line it would give us the PNG and HTML. Once we removed the code that they told us, the issue went away.
Hi Dan Sweeney
Thank you for posting here in community.
For the work order for which you are unable to generate the PDF, one possible root cause may due to the reason that you are unable to sync the generated Service report to the server. Please check if there is any sharing setting for the WO i.e check if it has been set as private.
If Sharing setting has been set as private, then if the technician who is generating the PDF is not WO owner then he doesn’t have permission to delete png files post opdoc generation. So pdf generation will not happen and user will see png files. Removing private on WO in sharing settings would solve the issue.
If Private Sharing on WO is removed then any user will be able to generate opdoc without issue.
Frequently asked question on above:
Want to confirm that the expectation is that all users who will generate output documents must have Delete access to the object against the output document's target object.
Just providing delete permission and having Private sharing will not resolve the issue.
If Private Sharing is set then only WO owner can successfully generate pdf with out issue.
If Private Sharing is set on WO and all users have modify all permission then any user will be able to generate Opdoc without issue.
Please let us know if the above information is helpful.
Hi Dan Sweeney
For PDF file to be generated and attached to the parent record, you need good connectivity, as PDF file generation is done in server.
If there is no connectivity or Bad connectivity, do data sync when connectivity is back. Then check if the PDF file is attached to the parent record in server after sync. If the file is not attached, try data sync again.
Till sync is completed, you can view the generated report in HTML format.
For this, you need to have a View Process with Attachments tab for the parent object.
After the sync attaches the PDF file in server, you must do data sync again to download the report in PDF format and view it in the Attachments tab.
Please find below the URL from our Online Help on Smart Docs: