Exporting Gradients in Sketch to PDF

I switched from Adobe Fireworks to Bohemian Sketch about 9–10 months ago and one issue that consistently raises its heads is exporting elements with gradients to PDF.

Image for post
Image for post

Above is my usual set up for designing gradients; I create my shape, add a gradient fill and change the opacity settings to apply the fade. However, exporting a shape such as the one above to PDF always results with a solid shape like this:

Image for post
Image for post

Not ideal by any means. So here is a step by step guide as to how I overcame this particular issue.

Step 1: Your Gradient

Image for post
Image for post

Instead of having the points of the gradient fade from 100% black to 0% black, I change the gradient fill to 100% black to 100% white.

Step 2: Create a Mask

Image for post
Image for post

Copy and paste your shape with the gradient then alter the colour settings to be a solid white fill.

Step 3: Flatten your shape

Image for post
Image for post

Select the original layer with your gradient and go to Layer > Flatten Selection to Bitmap. This layer should still appear below the white mask you created in step 2.

Step 4: Apply the Mask

Image for post
Image for post

Select your solid white mask and the Bitmap layer you’ve just created, then go to Layer > Mask with Selected Shape. You should now have a grouped item in your layers like below.

Image for post
Image for post

Step 5: Add Layer Style

With your Bitmap folder selected, change the Blending settings of the layer to “Multiply”

Image for post
Image for post

For the purposes of this demo I have changed the background colour of my Artboard so that you can see what changing the blending mode has done and furthermore I have altered the layer opacity to get the desired effect.

Image for post
Image for post

Step 6: Export to PDF

Once you have finished, go to File > Export Artboards to PDF and as below you can see the comparison between my original export, in the thumbnail view, where the shadow is solid to the steps followed above to create a simple shape with a gradient.

Image for post
Image for post

I hope this is of some help to anyone having issues with their PDF exports.

User experience design consultant http://www.thisisrad.co

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store