Jump to content

Inline graphic problem


CSemrau

Recommended Posts

Having problems getting an inline graphic inserted into a text box. Simple variable letter with a signature that needs to "float/flow" with the letter. I've tried the following:

 

return "<story><graphic file=\"Macintosh HD/Users/Shared/Temp/SwearingenSig.pdf\"></story>";

 

return '<graphic file="/Macintosh HD/Users/Shared/Temp/SwearingenSig.pdf">'

 

In both instances I get the following message during composition. Graphic is not found or processed properly Macintosh HD/Users/Shared/Temp/SwearingenSig.pdf Check for file existence and that it is of the proper format

 

Any help/suggestions would be much appreciated. Thanks.

Link to comment
Share on other sites

Having problems getting an inline graphic inserted into a text box. Simple variable letter with a signature that needs to "float/flow" with the letter. I've tried the following:

 

return "<story><graphic file=\"Macintosh HD/Users/Shared/Temp/SwearingenSig.pdf\"></story>";

 

return '<graphic file="/Macintosh HD/Users/Shared/Temp/SwearingenSig.pdf">'

 

In both instances I get the following message during composition. Graphic is not found or processed properly Macintosh HD/Users/Shared/Temp/SwearingenSig.pdf Check for file existence and that it is of the proper format

 

Any help/suggestions would be much appreciated. Thanks.

I think you want this:

return '<graphic file="/Users/Shared/Temp/SwearingenSig.pdf">'

With the newer UNIX-style BSD path specifications (with forward slashes) in Mac OS X, the default system volume name is not included like it was in the old OS 9-style HFS paths (with colons, such as "Macintosh HD:Users:Shared:Temp:SwearingenSig.pdf", which FusionPro will also accept).

 

You can see the correct path to the file if you do a "Get Info" in the Finder. Alternatively, you can go into FusionPro's Resources dialog, click "Add" then "Choose", browse to the file and click "Open"; then you can copy-and-paste the full path from the "File Name" edit box in the Resource Editor dialog.

Link to comment
Share on other sites

You can see the correct path to the file if you do a "Get Info" in the Finder. Alternatively, you can go into FusionPro's Resources dialog, click "Add" then "Choose", browse to the file and click "Open"; then you can copy-and-paste the full path from the "File Name" edit box in the Resource Editor dialog.

What I usually do is open Terminal, drag the file I want into the application window, and then paste the resulting path into FP. :cool:

 

What's more frustrating to me is trying to use relative paths (since I often set a file up in one location with intentions of changing the file to another location later). Sometimes I have found that with a folder directory like so:

 

FP_template.pdf

Subfolder

-->graphic.pdf

 

I still have to use "../Subfolder/" (yes that's a double-dot) to reference my graphic in a CreateResource() command when I would think that "Subfolder/" or "./Subfolder/" should suffice. I have never determined if the issue is FP's fault or our server's. :confused:

Link to comment
Share on other sites

What I usually do is open Terminal, drag the file I want into the application window, and then paste the resulting path into FP. :cool:

You have to be a bit careful with this, because if there are spaces or certain other special characters in the path, the shell quoting used by the Terminal may be different than what you need in FusionPro. (Although on Windows, you can safely use the path from a DOS window.)

What's more frustrating to me is trying to use relative paths (since I often set a file up in one location with intentions of changing the file to another location later). Sometimes I have found that with a folder directory like so:

 

Subfolder

-->graphic.pdf

 

I still have to use "../Subfolder/" (yes that's a double-dot) to reference my graphic in a CreateResource() command when I would think that "Subfolder/" or "./Subfolder/" should suffice. I have never determined if the issue is FP's fault or our server's. :confused:

This is surprising to me. If I open up, say, the Frodo Travel tutorial, I can reference graphics like so, on both Windows and Mac:

return '<graphic file=Assets/italy.jpg">';

Where the "Assets" folder is at the same level as the PDF template. I'm not sure why a similar setup isn't working for you. There may be something else going on.

 

Also, if the resource is in a folder named "Subfolder" at the same level as the template PDF, you can simply type "Subfolder" (without the quotes) in the Search Path box on the Advanced tab of the Composition Settings dialog and click Save. Then you can use simply the file name, without any path specification, in a call to FusionPro.ResolveFile(), like so:

return '<graphic file="' + FusionPro.ResolveFile("SwearingenSig.pdf") + '">';

Or, you can call CreateResource() and use the content property, like so:

return CreateResource("SwearingenSig.pdf", "graphic").content;

You can also put a full path in the Search Path box and FusionPro will resolve external resources at that location. You can enter more than one search path by delimiting them with semicolons.

 

Of course, you can always just create a resource in the Resources dialog and use the Resource() function and the content property, like so:

return Resource("MyResourceName").content;

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...