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
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
780
おうちHackを取り入れた リノベーション事例
yusukeito
0
670
Server Side Swiftを しばらく運用してみた話
yusukeito
0
570
Swift からword2vecを 使ってみる
yusukeito
0
1k
Swift Outside the Box
yusukeito
1
2.5k
SwiftでgRPCとProtocolBuffersを使う
yusukeito
4
1.3k
Swift on Raspberry Pi でI2Cデバイスを使う
yusukeito
1
660
Isomorphic Swift
yusukeito
2
600
Swiftの値付きEnumをHackする
yusukeito
0
310
Other Decks in Programming
See All in Programming
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
9
2.5k
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
160
kintone開発を効率化するためにチームで試した施策とその結果を大放出!
oguemon
0
170
CDKを使ったPagerDuty連携インフラのテンプレート化
shibuya_shogo
0
110
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
240
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
1.1k
もう僕は OpenAPI を書きたくない
sgash708
6
1.9k
JAWS Days 2025のインフラ
komakichi
1
120
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
150
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
470
Unity Android XR入門
sakutama_11
0
180
生成AIで加速するテスト実装 - ロリポップ for Gamersの事例と 生成AIエディタの活用
kinosuke01
0
130
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
How STYLIGHT went responsive
nonsquared
99
5.4k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
10
520
Scaling GitHub
holman
459
140k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
Why Our Code Smells
bkeepers
PRO
336
57k
Designing Experiences People Love
moore
140
23k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
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 Λ͏ • ผͷϥΠϒϥϦΛ͏ • ࣗͰ࣮͢Δ (ղੳΑΓָ)