SlideShare a Scribd company logo
Nigel Barber
 @mindbrix
scalable
 assets
BITMAPS ARE FROM MARS
       Vectors are from Venus
  • Smoother work flow
  • Efficiency
  • Save time
  • Future proof
Vectors, vectors, everywhere
  • Fonts
    • Character Viewer
    • Apple Symbols (glyph variants)
  • The web
    • thenounproject.com
    • Google: filetype:eps
  • Your pencil
    • straight edge and compass
A sample work ow
 • Create in Illustrator
   • Renderer is not Quartz
 • Save a copy as EPS
   • Edge to edge
   • Huge files (© Adobe)
 • Convert to PDF
   • Preview does use Quartz
   • Small files (e.g. 400K → 8K ≈ 50x less)
Rendering
 • iOS - UIImage+PDF
  • https://github.com/mindbrix/UIImage-PDF
  •   +(UIImage   *)   imageWithPDFNamed:(NSString *)resourceName atSize:(CGSize)size;
  •   +(UIImage   *)   imageWithPDFNamed:(NSString *)resourceName atWidth:(CGFloat)width;
  •   +(UIImage   *)   imageWithPDFNamed:(NSString *)resourceName atHeight:(CGFloat)height;
  •   +(UIImage   *)   originalSizeImageWithPDFNamed:(NSString *)resourceName;




 • OS X
  -(NSImage *)pdfImageNamed:(NSString *)name atWidth:(float)width
  {
      NSString *pdfPath = [[ NSBundle mainBundle ] pathForResource:name ofType:@"pdf" ];
      NSPDFImageRep *pdfRep = [ NSPDFImageRep imageRepWithContentsOfFile: pdfPath ];
      float pdfAspect = pdfRep.bounds.size.width / pdfRep.bounds.size.height;

        NSImage *pdfImage = [[[ NSImage alloc ] init ] autorelease ];
        pdfImage.scalesWhenResized = YES;
        pdfImage.size = NSMakeSize( width, width / pdfAspect );
        [ pdfImage addRepresentation: pdfRep ];

        return pdfImage;
  }
One PDF, many sizes...
One PDF, many sizes
Nigel Barber
 @mindbrix
#indieApps

More Related Content

What's hot

HTML5 Canvas
HTML5 CanvasHTML5 Canvas
HTML5 Canvas
Dina Goldshtein
 
Geoindexing with MongoDB
Geoindexing with MongoDBGeoindexing with MongoDB
Geoindexing with MongoDB
leafnode
 
Activity intent
Activity intentActivity intent
Activity intent
YAMANE Toshiaki
 
Launching and growing a startup on the Google Cloud Platform
Launching and growing a startup on the Google Cloud PlatformLaunching and growing a startup on the Google Cloud Platform
Launching and growing a startup on the Google Cloud Platform
GDG Budapest
 
Webinar: What's new in Neo4j 2.0
Webinar: What's new in Neo4j 2.0 Webinar: What's new in Neo4j 2.0
Webinar: What's new in Neo4j 2.0
Neo4j
 
Front end-performance
Front end-performanceFront end-performance
Front end-performance
Prajwala Manchikatla
 
Scaling clusters to thousands of servers in the cloud
Scaling clusters to thousands of servers in the cloudScaling clusters to thousands of servers in the cloud
Scaling clusters to thousands of servers in the cloud
TechExeter
 
Peering Personals (3)
Peering Personals (3)Peering Personals (3)
Peering Personals (3)
APNIC
 
Ansible practices
Ansible practicesAnsible practices
Ansible practices
Sebastien Plisson
 
Convolutional Neural Networks plays Racing Game
Convolutional Neural Networks plays Racing GameConvolutional Neural Networks plays Racing Game
Convolutional Neural Networks plays Racing Game
Andre Odendaal
 

What's hot (10)

HTML5 Canvas
HTML5 CanvasHTML5 Canvas
HTML5 Canvas
 
Geoindexing with MongoDB
Geoindexing with MongoDBGeoindexing with MongoDB
Geoindexing with MongoDB
 
Activity intent
Activity intentActivity intent
Activity intent
 
Launching and growing a startup on the Google Cloud Platform
Launching and growing a startup on the Google Cloud PlatformLaunching and growing a startup on the Google Cloud Platform
Launching and growing a startup on the Google Cloud Platform
 
Webinar: What's new in Neo4j 2.0
Webinar: What's new in Neo4j 2.0 Webinar: What's new in Neo4j 2.0
Webinar: What's new in Neo4j 2.0
 
Front end-performance
Front end-performanceFront end-performance
Front end-performance
 
Scaling clusters to thousands of servers in the cloud
Scaling clusters to thousands of servers in the cloudScaling clusters to thousands of servers in the cloud
Scaling clusters to thousands of servers in the cloud
 
Peering Personals (3)
Peering Personals (3)Peering Personals (3)
Peering Personals (3)
 
Ansible practices
Ansible practicesAnsible practices
Ansible practices
 
Convolutional Neural Networks plays Racing Game
Convolutional Neural Networks plays Racing GameConvolutional Neural Networks plays Racing Game
Convolutional Neural Networks plays Racing Game
 

Similar to Scalable Assets Presentation

Mongo db washington dc 2014
Mongo db washington dc 2014Mongo db washington dc 2014
Mongo db washington dc 2014
ikanow
 
PDF.JS at SwissJeese 2012
PDF.JS at SwissJeese 2012PDF.JS at SwissJeese 2012
PDF.JS at SwissJeese 2012
Julian Viereck
 
Cocoa Heads Tricity - Design Patterns
Cocoa Heads Tricity - Design PatternsCocoa Heads Tricity - Design Patterns
Cocoa Heads Tricity - Design Patterns
Maciej Burda
 
Rwd slidedeck
Rwd slidedeckRwd slidedeck
Rwd slidedeck
Vera Kovaleva
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.
GaziAhsan
 
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDaysConexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
CAPSiDE
 
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
ICS User Group
 
Power of canvas
Power of canvasPower of canvas
Power of canvas
chrismartinez99
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
Vitaly Friedman
 
Barcelona MUG MongoDB + Hadoop Presentation
Barcelona MUG MongoDB + Hadoop PresentationBarcelona MUG MongoDB + Hadoop Presentation
Barcelona MUG MongoDB + Hadoop Presentation
Norberto Leite
 
Modernizes your objective C - Oliviero
Modernizes your objective C - OlivieroModernizes your objective C - Oliviero
Modernizes your objective C - Oliviero
Codemotion
 
Hypercubes In Hbase
Hypercubes In HbaseHypercubes In Hbase
Hypercubes In Hbase
George Ang
 
Hi performance table views with QuartzCore and CoreText
Hi performance table views with QuartzCore and CoreTextHi performance table views with QuartzCore and CoreText
Hi performance table views with QuartzCore and CoreText
Mugunth Kumar
 
Trendsetting: Web Design and Beyond
Trendsetting: Web Design and BeyondTrendsetting: Web Design and Beyond
Trendsetting: Web Design and Beyond
Andy Stratton
 
From PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to lifeFrom PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to life
Derek Christensen
 
Online File Formats.pptx
Online File Formats.pptxOnline File Formats.pptx
Online File Formats.pptx
CliffordBorromeo
 
GraphDb in XPages
GraphDb in XPagesGraphDb in XPages
GraphDb in XPages
Oliver Busse
 
Themeroller 2.0: Refactoring for Speed
Themeroller 2.0: Refactoring for SpeedThemeroller 2.0: Refactoring for Speed
Themeroller 2.0: Refactoring for Speed
Doug Neiner
 
Expert guide for PHP
Expert guide for PHPExpert guide for PHP
Expert guide for PHP
Steve Fort
 
#PDR15 - Pebble Graphics
#PDR15 - Pebble Graphics#PDR15 - Pebble Graphics
#PDR15 - Pebble Graphics
Pebble Technology
 

Similar to Scalable Assets Presentation (20)

Mongo db washington dc 2014
Mongo db washington dc 2014Mongo db washington dc 2014
Mongo db washington dc 2014
 
PDF.JS at SwissJeese 2012
PDF.JS at SwissJeese 2012PDF.JS at SwissJeese 2012
PDF.JS at SwissJeese 2012
 
Cocoa Heads Tricity - Design Patterns
Cocoa Heads Tricity - Design PatternsCocoa Heads Tricity - Design Patterns
Cocoa Heads Tricity - Design Patterns
 
Rwd slidedeck
Rwd slidedeckRwd slidedeck
Rwd slidedeck
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.
 
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDaysConexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
 
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
 
Power of canvas
Power of canvasPower of canvas
Power of canvas
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
Barcelona MUG MongoDB + Hadoop Presentation
Barcelona MUG MongoDB + Hadoop PresentationBarcelona MUG MongoDB + Hadoop Presentation
Barcelona MUG MongoDB + Hadoop Presentation
 
Modernizes your objective C - Oliviero
Modernizes your objective C - OlivieroModernizes your objective C - Oliviero
Modernizes your objective C - Oliviero
 
Hypercubes In Hbase
Hypercubes In HbaseHypercubes In Hbase
Hypercubes In Hbase
 
Hi performance table views with QuartzCore and CoreText
Hi performance table views with QuartzCore and CoreTextHi performance table views with QuartzCore and CoreText
Hi performance table views with QuartzCore and CoreText
 
Trendsetting: Web Design and Beyond
Trendsetting: Web Design and BeyondTrendsetting: Web Design and Beyond
Trendsetting: Web Design and Beyond
 
From PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to lifeFrom PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to life
 
Online File Formats.pptx
Online File Formats.pptxOnline File Formats.pptx
Online File Formats.pptx
 
GraphDb in XPages
GraphDb in XPagesGraphDb in XPages
GraphDb in XPages
 
Themeroller 2.0: Refactoring for Speed
Themeroller 2.0: Refactoring for SpeedThemeroller 2.0: Refactoring for Speed
Themeroller 2.0: Refactoring for Speed
 
Expert guide for PHP
Expert guide for PHPExpert guide for PHP
Expert guide for PHP
 
#PDR15 - Pebble Graphics
#PDR15 - Pebble Graphics#PDR15 - Pebble Graphics
#PDR15 - Pebble Graphics
 

Recently uploaded

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 

Recently uploaded (20)

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 

Scalable Assets Presentation

  • 3. BITMAPS ARE FROM MARS Vectors are from Venus • Smoother work flow • Efficiency • Save time • Future proof
  • 4. Vectors, vectors, everywhere • Fonts • Character Viewer • Apple Symbols (glyph variants) • The web • thenounproject.com • Google: filetype:eps • Your pencil • straight edge and compass
  • 5. A sample work ow • Create in Illustrator • Renderer is not Quartz • Save a copy as EPS • Edge to edge • Huge files (© Adobe) • Convert to PDF • Preview does use Quartz • Small files (e.g. 400K → 8K ≈ 50x less)
  • 6. Rendering • iOS - UIImage+PDF • https://github.com/mindbrix/UIImage-PDF • +(UIImage *) imageWithPDFNamed:(NSString *)resourceName atSize:(CGSize)size; • +(UIImage *) imageWithPDFNamed:(NSString *)resourceName atWidth:(CGFloat)width; • +(UIImage *) imageWithPDFNamed:(NSString *)resourceName atHeight:(CGFloat)height; • +(UIImage *) originalSizeImageWithPDFNamed:(NSString *)resourceName; • OS X -(NSImage *)pdfImageNamed:(NSString *)name atWidth:(float)width { NSString *pdfPath = [[ NSBundle mainBundle ] pathForResource:name ofType:@"pdf" ]; NSPDFImageRep *pdfRep = [ NSPDFImageRep imageRepWithContentsOfFile: pdfPath ]; float pdfAspect = pdfRep.bounds.size.width / pdfRep.bounds.size.height; NSImage *pdfImage = [[[ NSImage alloc ] init ] autorelease ]; pdfImage.scalesWhenResized = YES; pdfImage.size = NSMakeSize( width, width / pdfAspect ); [ pdfImage addRepresentation: pdfRep ]; return pdfImage; }
  • 7. One PDF, many sizes...