Jump to content
Server Maintenance This Week. ×

Creating an Image with Field Data & A Picture


This topic is 2587 days old. Please don't post here. Open a new topic instead.

Recommended Posts

In one of my layouts I have created an ID Card like view that has a persons image and layered over the top of it I have some fields. 

Is there a way to export that composite as an image?

I was thinking something like if I grouped the composite and gave it a name I could export it as a script step but searching came up with mostly how to copy layout objects to a different layout...

Currently it works to screenshot the composite but I would like to automate the process a little bit.

Thanks for any help

Edited by BradDuns
Link to comment
Share on other sites

A PDF isn't an allowed image format so I would need to convert it.

I ended up using a Shell/AppleScript to automate the screen capture and name it using: 

"do shell script \"screencapture -x -R11,221,490,413 ~/FolderPath/" & User::UserName & ".png\""

I put the part I wanted captured in the far upper left of the layout so it's always in the same spot. I got the coordinates using the numbers from Cmd+shift+4. 

Maybe there is a better way but this works pretty good.

Edited by BradDuns
Link to comment
Share on other sites

The composite image I am creating is for posting to social media.

It has a User's picture with updated stats so I just need the composite digitally. 

Link to comment
Share on other sites

Screencapture can be unpredictable. What if a user zooms in or out? Or they move the window? An alternative approach is to use imagemagick (open source) in a script. Export the image, then use imagemagick to overlay it with information and keep tight control. Imagemagick works on both OSX and Windows.

Link to comment
Share on other sites

5 hours ago, OlgerDiekstra said:

Screencapture can be unpredictable. What if a user zooms in or out? Or they move the window? An alternative approach is to use imagemagick (open source) in a script. Export the image, then use imagemagick to overlay it with information and keep tight control. Imagemagick works on both OSX and Windows.

That's true. 

I have updated my script to use GetLayoutObjectAttribute to set the coordinates of the layout object I want to capture. This script won't work on PC but it will adjust if the user moves the window or zooms.

Thank you!

Link to comment
Share on other sites

This topic is 2587 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.