Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PDFのはなし2
Search
Yusuke Ito
February 18, 2012
Programming
160
1
Share
PDFのはなし2
Yusuke Ito
February 18, 2012
More Decks by Yusuke Ito
See All by Yusuke Ito
Macとオーディオ再生 2024/11/02
yusukeito
0
1.4k
おうちHackを取り入れた リノベーション事例
yusukeito
0
920
Server Side Swiftを しばらく運用してみた話
yusukeito
0
650
Swift からword2vecを 使ってみる
yusukeito
0
1.1k
Swift Outside the Box
yusukeito
1
2.9k
SwiftでgRPCとProtocolBuffersを使う
yusukeito
4
1.5k
Swift on Raspberry Pi でI2Cデバイスを使う
yusukeito
1
730
Isomorphic Swift
yusukeito
2
680
Swiftの値付きEnumをHackする
yusukeito
0
420
Other Decks in Programming
See All in Programming
実用!Hono RPC2026
yodaka
2
280
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
240
Don't Prompt Harder, Structure Better
kitasuke
0
800
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
910
第3木曜LT会 #28
tinykitten
PRO
0
120
GitHubCopilotCLIをはじめよう.pdf
htkym
0
300
Swift Concurrency Type System
inamiy
1
560
Running Swift without an OS
kishikawakatsumi
0
870
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
120
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
530
Symfony AI in Action - SymfonyLive Berlin 2026
chr_hertel
1
100
AI-DLC Deep Dive
yuukiyo
9
5k
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
220
Raft: Consensus for Rubyists
vanstee
141
7.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
We Have a Design System, Now What?
morganepeng
55
8.1k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
290
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.9k
Mind Mapping
helmedeiros
PRO
1
170
Designing for Performance
lara
611
70k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
130
The Curse of the Amulet
leimatthew05
1
12k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
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 Λ͏ • ผͷϥΠϒϥϦΛ͏ • ࣗͰ࣮͢Δ (ղੳΑΓָ)