Free Support Forum - aspose.com

Inserting An Image on multiple pages

We’re using Aspose.Barcode and Aspose.Word. Is there a way to produce barcodes and place them in a specific location on multiple pages of a pre-existing Word document?

Currently, we’ve figured out how to create an image from the BarCode and place this image in a specific (X,Y) on the document. This is working great. We just need more capability on a page basis.

Thanks, in advance.

-Ed

Hi Ed,

Thank you for considering our products.

Indeed, you can produce a barcode image using Aspose.Barcode and then insert it into a document in any available way. At the moment Aspose.Word doesn’t allow to place an object on a certain page by specifying its number because it has no pagination engine implemented yet. But you can for example place bookmarks into the locations where you want the barcodes to appear and then call DocumentBuilder.MoveToBookmark prior to DocumentBuilder.InsertImage to move the cursor to a particular bookmark.

Another way that could probably suit you is placing so-called image mail merge fields (whose name looks like Image:MyFieldName), implementing a handler for the MailMerge.MergeImageField event and executing a mail merge to insert the barcode images into desired locations. Please see the Product Catalog demo project to see a code sample for this approach.

Thanks, Dmitry. This is a great idea. We’ll definitely use it.

-Ed

hi,

i have other field that are displaying using mailmerge.executeregions and in that i have to image in one field. it is not working even though. it is displaying only url

my requirement is like

header1 header2
Column1:data Image
Column2:data
Column3:data


inthe above datais displaying in header1 and in header2 i have todisplay one Image. is it possible with mailmerge.ExecuteRegions method

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

Thanks for your request. Your question is not related to the original post of this thread.

I already answered your question in the following thread.

http://www.aspose.com/community/forums/thread/131594/inserting-many-tables-like-following.aspx

Best regards.

hi Alexey,

when i use mailmerge.executeregions method in word document if i dont have the column in the database it is showing merge field like: <> in the merge field. is there any solution to disable that filed(EntireRow) if i dont have the database column.

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

Thanks for your inquiry. I think that you should just remove non-merged fields from document before saving. Use the following code:

doc.MailMerge.DeleteFields();

Hope this helps.

Best regards.