$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PDFのはなし2
Search
Yusuke Ito
February 18, 2012
Programming
1
160
PDFのはなし2
Yusuke Ito
February 18, 2012
Tweet
Share
More Decks by Yusuke Ito
See All by Yusuke Ito
Macとオーディオ再生 2024/11/02
yusukeito
0
1.3k
おうちHackを取り入れた リノベーション事例
yusukeito
0
850
Server Side Swiftを しばらく運用してみた話
yusukeito
0
630
Swift からword2vecを 使ってみる
yusukeito
0
1.1k
Swift Outside the Box
yusukeito
1
2.7k
SwiftでgRPCとProtocolBuffersを使う
yusukeito
4
1.4k
Swift on Raspberry Pi でI2Cデバイスを使う
yusukeito
1
700
Isomorphic Swift
yusukeito
2
660
Swiftの値付きEnumをHackする
yusukeito
0
390
Other Decks in Programming
See All in Programming
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.7k
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
690
DSPy Meetup Tokyo #1 - はじめてのDSPy
masahiro_nishimi
1
170
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
310
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
140
sbt 2
xuwei_k
0
300
認証・認可の基本を学ぼう後編
kouyuume
0
190
UIデザインに役立つ 2025年の最新CSS / The Latest CSS for UI Design 2025
clockmaker
18
7.4k
AIコーディングエージェント(NotebookLM)
kondai24
0
190
エディターってAIで操作できるんだぜ
kis9a
0
730
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
420
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
190
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
730
Designing Experiences People Love
moore
143
24k
The Cult of Friendly URLs
andyhume
79
6.7k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
Building Adaptive Systems
keathley
44
2.9k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
A better future with KSS
kneath
240
18k
A Tale of Four Properties
chriscoyier
162
23k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
Transcript
1%'ͷͳ͠ଖͷೋ How to Use CGPDF API.
How to use CGPDF • ԿؾʹPDFͷαϙʔτ͋Γ͕͍ͨ(Mac, iOS) Android, WP7֎෦ϥΠϒϥϦ͕ඞཁ (ࠓݱࡏ)
• APICͰ࣮
Opening, Getting Information of the PDF • CGPDFDocument (URL or
DataProvider) • CGPDFPage αΠζ(Bounding Box, Clipping Box), ճస, ϖʔδ, ϝλσʔλ, όʔδϣϯ, ύε ϫʔυϩοΫ • CFType (Λܧঝ)
Sample Code • Apple Developer: ZoomingPDFViewer key: ֦େॖখ, ඇಉظඳը, TiledLayer
• Parent-Children Ϟσϧ • CGPDFDocument-CGPDFPage • PageΑΓઌʹDocumentΛղ์ͯ͠͠·Θ ͳ͍Α͏ʹҙ!! Memory Management
Page Document Retain/strong Assign/weak
Drawing • CGContextDrawPDFPage ύεͷଟ͍PDFը૾ͷେ͖͍PDFඳըʹ ͕͔͔࣌ؒΔ • ඇಉظඳը͕͓͢͢Ί e.g. CATiledLayer •
c.f. ઌ΄ͲͷZoomingPDFViewer
͍Α͍ΑPDF෦ • CGPDFScanner: ContentStream(≒ϖʔδ) ͷPDFΦϖϨʔλΛղੳ • CGPDFDocumentGetCatalog: Documentͷ Catalog(≒ϧʔτΦϒδΣΫτ)Λऔಘ •
CGPDFPageGetDictionary: ϖʔδΛىͱ͢ ΔPDFΦϒδΣΫτΛऔಘ ✴ NOTE: Not CF Type
API PDFObject CGPDFObject - (൚༻ܕ) CGPDFDictionary Dictionary CGPDFArray Array CGPDFString
String CGPDFStream Stream
Q. ࣍Λऔಘ͢Δʹ? • PDFͷCatalog͔Β࣍σʔλΛύʔε
Q. UnicodeςΩετʹม ͢Δʹ 1. ςΩετؔ࿈ͷΦϖϨʔλΛநग़ 2. άϦϑ൪߸͔ΒUnicodeʹม 3. ҐஔతߏΛղੳ 4.
ςΩετʹม
Q. ॻ͖ग़͢͠Δ • CGPDFContext Λ͏ • ผͷϥΠϒϥϦΛ͏ • ࣗͰ࣮͢Δ (ղੳΑΓָ)