Hi Jerry,

I'm not too experienced with Plotly, and this is just like, my opinion
(man)[^1], but I think you're going to be much better off in the long run
figuring out how to control the plot margins during creation rather than
clipping them after. A quick google suggests that it is possible, maybe
depending on how you're calling/creating your plot (e.g. from python, R,
etc). For example:

Setting graph size in Python (plotly.com)
<https://plotly.com/python/setting-graph-size/>

Best,
Clark

[^1]: As stated by "The Dude" i.e. the Big Lebowski

On Mon, Mar 18, 2024 at 10:31 AM <
skim-app-users-requ...@lists.sourceforge.net> wrote:

> Send Skim-app-users mailing list submissions to
>         skim-app-users@lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.sourceforge.net/lists/listinfo/skim-app-users
> or, via email, send a message with subject or body 'help' to
>         skim-app-users-requ...@lists.sourceforge.net
>
> You can reach the person managing the list at
>         skim-app-users-ow...@lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Skim-app-users digest..."
>
>
> Today's Topics:
>
>    1. Programmatically cropping PDF images (list_em...@icloud.com)
>    2. Re: Programmatically cropping PDF images (Christiaan Hofman)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 17 Mar 2024 23:20:08 -0700
> From: list_em...@icloud.com
> To: For general discussion about using Skim
>         <skim-app-users@lists.sourceforge.net>
> Subject: [Skim-app-users] Programmatically cropping PDF images
> Message-ID: <8a1dba61-3564-428d-8616-3c4a94551...@icloud.com>
> Content-Type: text/plain;       charset=utf-8
>
> I am making PDF plots using Plotly which sometimes leaves more white space
> at the margins than seems necessary, especially when considering cramming
> them into a column in a paper. Skim does a nice job of cropping, but I?m
> wondering if there is a way to do this programmatically, e.g,. from Python,
> Julia, or Ada. I know that Skim is scriptable but I can?t find anything in
> Skim?s Applescript dictionary about cropping.
>
> I know that if there is an Applescript for doing this on a specified file
> or all the PDFs in a folder that I can issue the command from any of the
> other mentioned languages. I would gladly consider a non-Skim way also but
> I need a method that detects the white-space margins rather than having me
> manually determine the coordinates of a crop box since they will be
> different for different images.
>
> Jerry
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 18 Mar 2024 10:50:00 +0100
> From: Christiaan Hofman <cmhof...@gmail.com>
> To: For general discussion about using Skim
>         <skim-app-users@lists.sourceforge.net>
> Subject: Re: [Skim-app-users] Programmatically cropping PDF images
> Message-ID: <991ec7fe-f1d3-4bb0-acc8-e4865f65d...@gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
>
>
> > On 18 Mar 2024, at 07:20, list_email--- via Skim-app-users <
> skim-app-users@lists.sourceforge.net> wrote:
> >
> > I am making PDF plots using Plotly which sometimes leaves more white
> space at the margins than seems necessary, especially when considering
> cramming them into a column in a paper. Skim does a nice job of cropping,
> but I?m wondering if there is a way to do this programmatically, e.g,. from
> Python, Julia, or Ada. I know that Skim is scriptable but I can?t find
> anything in Skim?s Applescript dictionary about cropping.
> >
> > I know that if there is an Applescript for doing this on a specified
> file or all the PDFs in a folder that I can issue the command from any of
> the other mentioned languages. I would gladly consider a non-Skim way also
> but I need a method that detects the white-space margins rather than having
> me manually determine the coordinates of a crop box since they will be
> different for different images.
> >
> > Jerry
>
>
> There are various bounds properties for pages in the Skim AppleScript
> dictionary. there is a ?bounds?, ?media bounds? and ?content bounds?. In
> particular, the latter one especially detects the white margins of the
> page. The other two are properties of the PDF that can also be changed (in
> particular the ?bounds? for the crop box).
>
> Note that by default the page bounds are not saved by Skim, as they are
> part of the PDF data which we leave alone. So you need to export with
> embedded note to have it saved. That can also be done from AppleScript.
>
> Christiaan
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Skim-app-users mailing list
> Skim-app-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/skim-app-users
>
>
> ------------------------------
>
> End of Skim-app-users Digest, Vol 194, Issue 5
> **********************************************
>
_______________________________________________
Skim-app-users mailing list
Skim-app-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-users

Reply via email to