Problem:
I'm trying to get an image to be displayed on a PDF that is generated using a XDP file.
What I'm currently trying:
I have a XDP file that is exported from a PDF. I have a textbox with the tag "my_image" on the pdf. Here's the code I'm using to encode the string that is inserted as the value of the "my_image" tag.
var bytes = System.IO.File.ReadAllBytes(@"C:\image.jpg");
var data = Convert.ToBase64String(bytes);
When I launch the PDF using the XDP, the image does not display, just the Base64 Encoded string value.
Any ideas?
I made a simple PDF in LiveCycle Designer with a single
Image Field
calledImageField1
. I used pretty much the same code as you to create the base64 encoded image except that I included the line wraps which shouldn't technically be needed:All together this is my XDP file that works with my simple PDF. I know its not a complete answer but hopefully you can compare what works for me with your code.