Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PDFのはなし2
Search
Yusuke Ito
February 18, 2012
Programming
1
150
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
840
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
690
Isomorphic Swift
yusukeito
2
660
Swiftの値付きEnumをHackする
yusukeito
0
390
Other Decks in Programming
See All in Programming
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
340
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
37
23k
React Native New Architecture 移行実践報告
taminif
1
140
ゲームの物理 剛体編
fadis
0
280
関数実行の裏側では何が起きているのか?
minop1205
1
660
AWS CDKの推しポイントN選
akihisaikeda
1
240
dnx で実行できるコマンド、作ってみました
tomohisa
0
140
AIコーディングエージェント(skywork)
kondai24
0
130
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
7
2k
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
310
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
230
エディターってAIで操作できるんだぜ
kis9a
0
680
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
It's Worth the Effort
3n
187
29k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Speed Design
sergeychernyshev
33
1.4k
Designing for humans not robots
tammielis
254
26k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Agile that works and the tools we love
rasmusluckow
331
21k
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 Λ͏ • ผͷϥΠϒϥϦΛ͏ • ࣗͰ࣮͢Δ (ղੳΑΓָ)