Frequently Asked Question

How to add attachment
Last Updated 11 months ago

This article shows you how to add attachment to pdf.

You need a professional or a premium license.

page.AddAnnotAttachment("/mnt/sdcard/image.png",  0, new float[]{300,500,330,530});

For more info about that method please check this :

/**
 * add a file as an attachment to page.

 * you should re-render page to display modified data.

 * this can be invoked after ObjsStart or Render or RenderToBmp.

 * this method require professional or premium license, and Document.SetCache invoked.
 * @param path absolute path name to the file.
 * @param icon icon display to the page. values as:

 * 0: PushPin

 * 1: Graph

 * 2: Paperclip

 * 3: Tag

 * @param rect 4 elements: left, top, right, bottom in PDF coordinate system.
 * @return true or false.

 * the added annotation can be obtained by Page.GetAnnot(Page.GetAnnotCount() - 1), if this method return true.
 */
final public boolean AddAnnotAttachment(String path, int icon, float[] rect)

Loading ...