kristina3909 Posted August 18, 2015 Share Posted August 18, 2015 I am using a rule within a text box to dynamically pull in pdf images. I am wondering if there is a way to add a frame just around the image. I have defined the width but since the pdf pages are different sizes the frame does not adjust. Below is the rule I am using to get the images. return "<graphic file=\""+Field("Order ID")+"_"+Field("Document ID")+".pdf\""+" width= 25000 pagenumber=1>" Quote Link to comment Share on other sites More sharing options...
step Posted August 18, 2015 Share Posted August 18, 2015 One way you could do that is to put your graphic in a table that has a border on it. var width = 25000; var graphic = '<graphic file="' + Field("Order ID") + "_" + Field("Document ID") + '.pdf" width="' + width + '" pagenumber=1>'; var myTable = new FPTable; myTable.AddColumns(width); var row = myTable.AddRow(); var cell = row.Cells[0]; cell.SetBorders("Thin","Black","Top","Bottom","Right","Left"); cell.Margins = {Top:1, Bottom:1, Left:0, Right:0}; row.SetContents(graphic); return myTable.MakeTags(); Quote Link to comment Share on other sites More sharing options...
kristina3909 Posted August 18, 2015 Author Share Posted August 18, 2015 This works perfectly! Thank you for your help!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.