I've never used this API but perhaps the problem is that you are thinking
of PDF pages as having a size in pixels. They absolutely do not, because
they are a rich collection of text, multiresolution images and vector. The
fact that your PDF pages might contain only a single resolution image is of
no importance (yes, none). PDF files do not have a DPI even if tools claim
they do. They DO have a real size in inches/mm. Clearly when painting a PDF
on screen an API will ASSUME a resolution to map to screen pixels, based on
the size in inches/mm only, since monitor inches aren't real.

A further complication is that each page may have multiple boxes. An API
might use the media, crop, art or trim box for size in inches/mm with a
default for missing boxes.

So there is much more to be concerned with than when using a bitmap format.

On Wednesday, 1 June 2016, David Catmull <davidcatm...@gmail.com> wrote:

> I'm trying to use PDF files as image templates for my segment controls, but
> they come out too small.
>
> I created them using Affinity Designer, adding the "Template" suffix. They
> end up getting drawn at half size in my controls. I tried changing the
> export DPI from the default (~144) to 72, but it had no effect.
>
> Exporting them as png instead works fine - at runtime, that is. Xcode
> 7.3.1's editor shows them at half size like the PDFs. This only happens
> with my custom images, never with standard system images.
>
> The images are 16x16, exported using Designer's "PDF (flatten)" setting. My
> segment control is "small square" style, with 37px wide segments.
>
> How can I make them display at the right size? I can make do with pngs if
> necessary, but for one thing I like not having to have @2x versions of
> everything. Plus Apple's documentation recommends PDF for template images,
> so it ought to work.
> _______________________________________________
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com <javascript:;>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/aandi%40quite.com
>
> This email sent to aa...@quite.com <javascript:;>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to