Jump to content

Inline Graphic Upload


mstanton

Recommended Posts

Hello,

 

I need to insert a graphic field that is set to 'graphic upload' inline (with text wrap) with a body of variable text. I have the variable text frame all set up, but my graphic upload fields are not available in the variable text editor. I have looked into the Inline Graphic rule, but since it's an upload I have no idea what the graphic will be called or where it is stored on the server so I can't use that rule.

 

This is for a newsletter that will insert an uploaded image inline with the first line of an article. The location of this line of text varies with the amount of text entered in the articles above it so I can't just make a variable graphic frame.

 

Thanks!

Link to comment
Share on other sites

For a graphic frame I would edit the particular field in the Input Options dialogue and set it to "graphic" - then in the frame properties box I'd set the "Field or Rule" dropdown menu to that graphic field. And that's it. There is no need to specify an image name before the user uploads an image. Since I can't use a graphic frame for this particular project I can't follow this workflow and I don't know how to get the same results with rules and resources. I'm hoping someone can tell me how to do this.
Link to comment
Share on other sites

  • 2 weeks later...
For a graphic frame I would edit the particular field in the Input Options dialogue and set it to "graphic" - then in the frame properties box I'd set the "Field or Rule" dropdown menu to that graphic field. And that's it. There is no need to specify an image name before the user uploads an image. Since I can't use a graphic frame for this particular project I can't follow this workflow and I don't know how to get the same results with rules and resources. I'm hoping someone can tell me how to do this.

I can't say that I have ever modified the variable type as you described, but just playing around with these settings in a random template, it seems like the act of setting a field to be a graphic resource would effectively be pulling the file name from that field and placing a graphic with the same name from a pre-assigned location.

 

If that's true, than it would follow that you could create a resource with JavaScript that pulls it's name from the associated field and appends the appropriate file suffix (.jpg, .pdf, etc) and then returns that image in a graphic rule (or in your case, as an inline graphic in a text field).

 

If I'm still missing the point, perhaps you could post some sort of sample to visually show where the problem is occurring. I can be dense when it comes to interpreting type in these forums sometimes. ;)

Link to comment
Share on other sites

If that's true, than it would follow that you could create a resource with JavaScript that pulls it's name from the associated field and appends the appropriate file suffix (.jpg, .pdf, etc) and then returns that image in a graphic rule (or in your case, as an inline graphic in a text field).

In a graphic rule:

return CreateResource(Field("YourFieldName") + ".jpg");

In a text rule:

return CreateResource(Field("YourFieldName") + ".jpg", "graphic").content;

Link to comment
Share on other sites

  • 5 weeks later...

Here is what was happening before:

1. Import Data - csv file

 

2. Define Fields

a. Set 'Photo1' field as 'Graphic' rather than 'Text' in Data Fields dialogue box (see image 2.a)

b. FusionPro > Define HTML Form > From Current Data. - If Step 2a is not done (changing field type from Text to Graphic), it's not possible to set the field in the HTML form as a graphic upload field

i. What I see if step 2a is followed: The option to choose Graphic Upload or Graphic Pick in the 'Field Type' drop-down menu in the Web DataCollect (define HTML form) dialogue box (see image 2.b.i)

ii. What I see if step 2a is NOT followed: No option to choose Graphic Upload or Graphic Pick in the 'Field Type' drop-down menu in the Web DataCollect (define HTML form) dialogue box (see image 2.b.ii)

iii. MUST have the field set as graphic upload in the Web DataCollect window to define the HTML form or DSF will display the field as a text field, not a graphic upload field. (see image 2.b.iii)

3. Create Rule

a. The text rule I had (called RulePhoto1):
return Field("Photo1")

(see image 3.a)

4. Insert text rule RulePhoto1 into the Variable Text Editor with the text fields (see image 4)

 

5. Collect For Output (FusionPro > Collect...) - DSF requires a .zip file for variable data products.

 

6. Upload the .zip file to DSF and test the product.

 

7. Results in a file path name being placed in front of the article text, rather than the photo that was uploaded. (see image 7)

 

http://www.serviceprinters.com/_images/_FusionPro/FP01.gif

 

http://www.serviceprinters.com/_images/_FusionPro/FP02.gif

 

http://www.serviceprinters.com/_images/_FusionPro/FP03.gif

 

7

http://www.serviceprinters.com/_images/_FusionPro/7-Results.gif

 

 

And here is what happens when I used the suggested text rule:

return CreateResource(Field("YourFieldName") + ".jpg", "graphic").content;

1. Follow Steps 1-2 above

 

3. Create Rule - I get this error when I validate the rule:

"RulePhoto1, line 1: Error: In CreateResource(), resource ".jpg" does not exist"
4. Follow Steps 4-6 above

 

7. Results: "{RulePhoto1}" displayed instead of the photo.

Link to comment
Share on other sites

A quick update to my last post: taking the + ".jpg" out of the rule worked as far as getting the graphic to show up, but now I need to know if I can possibly make the text wrap around the graphic.

 

To recap:

The working rule is:

return CreateResource(Field("Photo1"), "graphic").content;

 

The image shows up as:

http://www.serviceprinters.com/_images/_FusionPro/WorkingGraphic.gif

 

Now I need the text to wrap around the image if at all possible.

 

Thanks!

Link to comment
Share on other sites

  • 5 years later...

I also wanted to have a graphic field flow with text but I can't get it to work. I wanted to add a signature image at the end of the text. I can't use the inline image rule because users need to upload images for the signature.

 

1. Graphic field is called "SignatureUpload".

2. I added the rule below:

"return CreateResource(Field("UploadSignature"), "graphic").content;

Link to comment
Share on other sites

I also wanted to have a graphic field flow with text but I can't get it to work. I wanted to add a signature image at the end of the text. I can't use the inline image rule because users need to upload images for the signature.

 

1. Graphic field is called "SignatureUpload".

2. I added the rule below:

"return CreateResource(Field("UploadSignature"), "graphic").content;"

3. The rule is a text rule and the name of the rule is "UploadSignature_Rule".

4. I added the rule to a variable text box. There is text above and below "UploadSignature_Rule".

 

Sample of my variable text box:

Dear «ClientFirstName»,

 

«StateofMarketfirstparagraph»

 

«SecondParagraph»

 

«UploadSignature_Rule»

 

«Name»

 

All the fields return text however the Signature rule returns nothing but white space.

 

Any suggestions? Do you need more info?

 

Thank you,

Sopol

 

I am using: Fusion Pro VDP Designer 9.1.0, Acrobat Pro 9.5.4, Mac OS X 10.6.8.

Link to comment
Share on other sites

  • 4 weeks later...

This sounds like a question specific to MarcomCentral so I doubt I'll be able to lend much assistance but:

1. What happens when the template is composed? Does the image show up? If not, what does the .msg log say?

2. Does the field you're referencing in the CreateResource function contain the full path of the image or just the image name?

3. It may be a silly question, but is the image small enough to fit in the text frame? If it's not you might want to look at constraining the size of the image.

 

Posting an example of your data/template or even your .msg log would be extremely helpful if you can.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...