Error Message: Cannot invoke "java.io.ByteArrayOutputStream.toByteArray()" because "pdfOS" is null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2026 03:59 AM
HI Team,
While generating PDF in Plan in BCM, i am getting "Error: Unable to generate PDF attachment".
When i dig into the code level, i found that error is coming from -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2026 08:23 AM
Hi ,
First go to All document template -> open your template which is generating pdf and confirm it is published
If it is not published, make it Publish
And confirm here what result you are getting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2026 02:07 AM
HI, it is in published state already and then today suddenly PDF got generated.
strange behavior..i guess when i cleared cache it took time..maybe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2026 05:33 AM
HI, i just found out that issue still exists.
It is causing due to CSS added as below -
<style>
@page {size: landscape}
</style>
If i remove this from Document Template, then PDF is getting generated correctly.
Can anyone please help how to add landscape css to resolve this issue?
Thank you.
