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
130
PDFのはなし2
Yusuke Ito
February 18, 2012
Tweet
Share
More Decks by Yusuke Ito
See All by Yusuke Ito
おうちHackを取り入れた リノベーション事例
yusukeito
0
540
Server Side Swiftを しばらく運用してみた話
yusukeito
0
500
Swift からword2vecを 使ってみる
yusukeito
0
910
Swift Outside the Box
yusukeito
1
2.2k
SwiftでgRPCとProtocolBuffersを使う
yusukeito
4
1.2k
Swift on Raspberry Pi でI2Cデバイスを使う
yusukeito
1
630
Isomorphic Swift
yusukeito
2
570
Swiftの値付きEnumをHackする
yusukeito
0
280
Swift プロトコル指向なCのラッパーを作る
yusukeito
3
1.2k
Other Decks in Programming
See All in Programming
Good first issues of TypeProf
mame
4
600
戦略的DDDは重いのか? / Is strategic DDD heavy?
pictiny
3
2.1k
[RubyKaigi 2024] Ruby Mixology 101: adding shots of PHP, Elixir, and more
palkan
0
130
『WordPressコミュニティで学ぶ』OSS貢献の多様性
ippey
0
260
Productivity is Messing Around and Having Fun
hollycummins
1
180
Jetpack Composeとデザインシステム
rmakiyama
0
230
TypeScriptとGraphQLで実現する 型安全なAPI実装 / TSKaigi 2024
hokaccha
5
2.8k
スタックトレース始めてみた
kuro_kurorrr
5
1.1k
How to improve maintainability and readability of your automated tests? ( #scrumniigata )
teyamagu
PRO
1
130
Docker_OSS_ホスティング入門
satokoki645
0
140
TypeScriptの型とパフォーマンス (TSKaigi 2024)
ypresto
14
4.6k
CQRS meets modern Java
simas
PRO
2
480
Featured
See All Featured
Thoughts on Productivity
jonyablonski
60
3.9k
YesSQL, Process and Tooling at Scale
rocio
165
13k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
26
2.3k
Clear Off the Table
cherdarchuk
86
310k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
660
120k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
Statistics for Hackers
jakevdp
790
220k
How GitHub (no longer) Works
holman
305
140k
KATA
mclloyd
16
12k
Building a Modern Day E-commerce SEO Strategy
aleyda
22
6.5k
Building a Scalable Design System with Sketch
lauravandoore
457
32k
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 Λ͏ • ผͷϥΠϒϥϦΛ͏ • ࣗͰ࣮͢Δ (ղੳΑΓָ)