Dynamic printing word/pdf (just like printing logo's)



We have a requirement wherein we need to send an additional attachment detail with each invoice. currently Invoices are emailed through BIP bursting feature. i need to send additional attachment with each bursting. I am trying to achieve same by creating new RX template and inserted object and giving alt text with a variable which will have correct file information runtime, which is similar to dynamic printing of logo's on invoices. logos prints this way, but had no luck so far with .doc or .pdf. Is there a way to pick these additional attachment from a server location and print using BIP? this attachment detail vary at item level (and our assumption is each order will have only one item).

Thanks in advance!


Legendary Poster
Someone may have an easy way to do this. I know how I would go about it if trying to put together a solution inside of JDE and it is certainly doable since we have done all the necessary components that you would need to put a solution together inside of JDE. Might be easier to do outside of JDE. I.e. have BIP send to some other facility that can read data out of the PDF then email with attachments. Just depends on what other software solutions you have at your disposal.

If you want to do this inside of JDE:

You will more than likely need to email outside of the BIP email feature. I.e. wait until the BIP job is done, get the resulting output and then email along with attachments. The JDE C API JDE_SendEMailSMTPExt has the ability to send attachments. JDE_SendEMailSMTPExt will be the easy part.

Getting the BIP output and determining and identifying a given invoice will be the tricky part for bursted output. We have done something very similar and it is non-trivial. We have a general purpose BSFN that can poll the job queue as well as BIP processes and wait until they are done. Once done you have to extract the PDF(s) from the BIP tables. If you are bursting then you have to get the output for each invoice. You CANNOT, I repeat, CANNOT rely on the ordinal position of the output records in the BIP output table to determine a given invoice since the BIP processes that produce the PDF(s) from the XML output of the UBE can run async in multiple threads. In other words it may appear to output invoice 1,2,3,4,5,6 (the order that the invoices are created in the UBE) for a given UBE run 99.9% of the time but it could also output as 3,2,1,4,6,5. For our purposes we had to grab not only each individual PDF out of this table but also read data out of the PDF itself to determine which document we actually had. The PDF doesn't contain any type of meta-data that you can read so we actually used a lib from https://www.glyphandcog.com/ to read the PDF content. In our case it was a delivery ticket number. We created some "hidden" text (white font on white background) on the PDF and then using the lib from Glyph and Cog we searched and read the key value pair to get the unique delivery ticket number. Once we had that from the PDF we could get the rest of the info we needed.

Abhishek Chhajer

Well Known Member
Archive current BI output and then create new job to attach archived and new output using send email api. You have to mod the function to attach multiple attachment. It is straightforward.