MattiaDuesse Posted June 14, 2017 Posted June 14, 2017 Hi, Can i insert in a image box a page of PDF with a excel field. a PDF have a 100 page and i want insert in fusion Pro a page of PDF. For example i write in a field a directory of a pdf (c:prova/prova.pdf/page1) Exist this method? Thanks Quote
Dan Korn Posted June 14, 2017 Posted June 14, 2017 You can write a graphic rule like so to show a specific page from a PDF resource in a graphic frame: var r = CreateResource("filename.pdf"); r.pagenumber = 2; return r; Quote
MattiaDuesse Posted June 15, 2017 Author Posted June 15, 2017 Ah wonderfull!! But can i select a page of pdf by a field of file excel? And have i create a new rule? In ghrapics frame What should I write? Thanks!! Quote
Dan Korn Posted June 15, 2017 Posted June 15, 2017 Ah wonderfull!! But can i select a page of pdf by a field of file excel? If you mean that you have a data field which specifies the page number, or the PDF file name, you can do something like this: var r = CreateResource(Field("PDFName")); r.pagenumber = Field("PageNumber"); return r; I'm just guessing at your field names, of course. I could provide more specific suggestions with more information, such as the collected job, or at least the data file. (Note that whether the data file is Excel or some other format makes no difference.) And have i create a new rule? In ghrapics frame What should I write? Thanks!! Yes, you would create a new rule of type Graphic / JavaScript. Then you would select graphic frame, and in the Frame Properties palette, select the rule's name in the [Field or Rule] drop-down. Quote
MattiaDuesse Posted June 16, 2017 Author Posted June 16, 2017 Hi, it's work good!! And if would i change proportion in a rule? It's possible?? Thanks! Quote
Dan Korn Posted June 16, 2017 Posted June 16, 2017 Hi, it's work good!! And if would i change proportion in a rule? It's possible?? Thanks! If it's being placed into a graphic frame, then you can adjust the size of the frame itself, and you can adjust the scaling and cropping of the graphic within the frame by using the controls on the Frame Properties palette. If it's an inline graphic, in a text frame, then you need to output a <graphic> tag from a text rule, with either (or both) the width or height attributes set (in hundredths of points, 7200 per inch), something like this: return '<graphic file="' + Field("PDFName") + '" pagenumber="' +Field("PageNumber") + '" width=7200 height=7200>'; For more information, please refer to the section "Inline Graphics" in the FusionPro User Guide, and the section "Graphic Tag Inside Story Tag / Inline Graphics" in the FusionPro Tags Reference. Quote
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.