We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Re-using Xml ImageData

Is it possible to reference previous images in a following tag when using the BindXml method?

In the following example, the image data is included in the XML twice. I would prefer to only include it once and reference the first instance when including the image a second time.

// http://tango.freedesktop.org/CodeTangoSet
// 16x16/text-x-java-source.png
“B3RJTUUH1woeEREP5xtJ/AAAAB10RVh0Q29tbWVudABDcmVhdG” +
“f2d7361mztBl1MwUajlMbcUKK6NAM6OL7kv6GyoQw+husQbh3x” +
“DUVdD3h6jgRYqWYmLm18TKspqJ4dKx+c736WIqzhk9cOCcB87v” +
"/B7O8yhScSIYCnTy/6hpbGhqz8gGQwExTTNjGYYhhmFILBYTwz" +
“AkGApIMBSoXn9XW39o72jJgGdv3c6PmWmO+iu5frWBu82htmAo” +
“sGaSBvCV+xERBBAREAGE4bEhshxZRGYiXL50hfsP7rUBKgPwfr” +
“A3w+Cg9xDbspw8evKQWCzG4uIi/yyhvPRw6tGUA6YIppj4fIeZ” +
“mvqCzWbDmZ1DS+vLzQGDH/thRX8+Os+379MYhoGIoGs2dF3D7z” +
“uWZmDZqFtaUkH0zwI/IxG8xXvZZRf0uc/k6Qb7Cwvp7utaqX4T” +
“g6GRAQAmJsNYv77h2aNuNOJYLYpPPcKyxUGpv4ZEbgV3mm/Hgb” +
“NpBl5PGV5PGUop9hQfwJGzE8sWF0lrNlbHDnJcBTjz8qk6foqa” +
“MzV2pdTrNIOR8Q9r+9r6W9TW3wJgyVhK/UBsgZlfEXredeM/ch” +
“TTNI0Mg535bnRNZ+733Fo+mUySSMRJJpPk5brw7PPQ19+bAOIZ” +
“BuMTYRwOB09ePKairIKC3QU4s50oIJFI0NmTGpnl5eU4cE7baD” +
“AWHudkZRWaVaPrbSfDo8PEE3F0Tcdut1NXXYcpwqvWl7bGa00D” +
“aQC328352gs8f/2UosIiSjxeXLkunE4n0WiU2blZwpNhRsdHAS” +

var xmlDoc = new System.Xml.XmlDocument();
for(int i = 0; i < 2; ++i)
.InnerText = base64icon;
var pdf = new Aspose.Pdf.Pdf();
pdf.BindXML(xmlDoc, null);

Hi Jed,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Sorry for a delayed response.

Well, I am afraid; this feature is not supported at the moment. However, I have created an issue in our issue tracking system with issue id: PDFNEWNET-33271 for our development team to check if it is possible to implement such a feature. Once they investigate / analyze and share their feedback, I will update you via this forum thread.

Sorry for the inconvenience,


Is re-using the same image multiple times in the same PDF possible using the straight API? If so, can you point me to a simple example like the one I put together above, or can you adapt the sample above to do so using the API?


Hi Jed,

First of all I apologize for the delayed in response.

Kindly use the below mentioned code to reuse same imaged multiple time in the same PDF. Resultant file is also attaced for your analysis.


Aspose.Pdf.Generator.Image image1 = new Aspose.Pdf.Generator.Image();
image1.ImageInfo.File = @"d:\pdffiles\aspose-logo.gif";
Aspose.Pdf.Generator.Segment seg1 = new Segment();
seg1.InlineParagraph = image1;
Aspose.Pdf.Generator.Pdf pdfConv = new Pdf();
Section sec1 = pdfConv.Sections.Add();
Aspose.Pdf.Generator.Table table1 = new Aspose.Pdf.Generator.Table();
Aspose.Pdf.Generator.Text text;
Aspose.Pdf.Generator.Segment newSeg;

for (int i = 0; i < 5; i++)
Aspose.Pdf.Generator.Row row1 = table1.Rows.Add();
text = new Text();
newSeg = new Segment(text);


Please feel free to contact support in case you need any further assistance.

Thanks & Regards,