title: Why do PDFs resized in SwiftUI getting sharp edges?
body: <p>I try to include a pdf in my SwiftUI enabled app using Xcode 11.4 and iOS 13.4. However, when I resize the pdf, it gets crips edges. I have included two versions of the pdf: One large pdf (<code>icon.pdf</code>) and one small pdf (<code>icon_small.pdf</code>). When I resize <code>icon.pdf</code> it gets start edges, while <code>icon_small.pdf</code> gets smooth edges. The issue applies to all other pdfs I have tried as well.</p>
  
  <p><a href="https://i.stack.imgur.com/adrVf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/adrVf.png" alt="enter image description here"></a></p>
  
  <p>This is my code:</p>
  
  <pre><code>struct ContentView: View {
      var body: some View {
          VStack {
              Spacer()
              Text("icon.pdf:")
              Image("icon")
                  .resizable()
                  .renderingMode(.template)
                  .aspectRatio(contentMode: .fit)
                  .frame(width: 27.0, height: 27.0)
              Spacer()
              Text("icon_small.pdf:")
              Image("icon_small")
              Spacer()
          }
      }
  }
  </code></pre>
  
  <p>Both <code>icon.pdf</code> and <code>icon_small.pdf</code> have the following asset settings:</p>
  
  <ul>
  <li>Render As: Template Image</li>
  <li>Resizing: Preserve Vector Data</li>
  <li>Devices: Universal</li>
  <li>Scales: Single Scale</li>
  </ul>
  
  <p>The pdfs are available here:</p>
  
  <ul>
  <li><a href="http://simensolbakken.com/public/stackoverflow/icon.pdf" rel="noreferrer">http://simensolbakken.com/public/stackoverflow/icon.pdf</a></li>
  <li><a href="http://simensolbakken.com/public/stackoverflow/icon_small.pdf" rel="noreferrer">http://simensolbakken.com/public/stackoverflow/icon_small.pdf</a></li>
  </ul>