Posted by a ceTe Software moderator
Hello,
Yes, it is possible to populate PDF without needing to use a query or stored proc. Your data should be in the form of a data table or a list of objects. Using the .Net API you would need to put your data in a data table or a list of objects and populate the template during runtime as shown in the below examples.
Event driven query using list of custom objects
Event driven query using Data Table
In order to add an image you would need to use a placeholder on the template (dplx) file and use the LaidOut event handler on the place holder to add an image to the PDF. The
event handling topic shows how to do this but adds a barcode instead. In your case you can replace the event handler code that adds a barcode with the below sample code to add an image.
public void BarcodePlaceHolder_LaidOut( object sender, PlaceHolderLaidOutEventArgs e )
{
Image image = new Image(@"C:\MyImage.jpg", 0, 0);
e.ContentArea.Add(image);
}
Thanks,
ceTe Software Support Team.