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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yusuke Ito
February 18, 2012
Programming
170
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
930
Server Side Swiftを しばらく運用してみた話
yusukeito
0
660
Swift からword2vecを 使ってみる
yusukeito
0
1.2k
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
690
Swiftの値付きEnumをHackする
yusukeito
0
430
Other Decks in Programming
See All in Programming
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.2k
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
280
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
200
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
260
Agentic UI
manfredsteyer
PRO
0
120
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
130
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
650
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
1.1k
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
740
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
100
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.6k
Oxcを導入して開発体験が向上した話
yug1224
4
300
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
Mobile First: as difficult as doing things right
swwweet
225
10k
Ethics towards AI in product and experience design
skipperchong
2
310
Utilizing Notion as your number one productivity tool
mfonobong
4
320
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
250
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
330
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
210
Code Reviewing Like a Champion
maltzj
528
40k
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 Λ͏ • ผͷϥΠϒϥϦΛ͏ • ࣗͰ࣮͢Δ (ղੳΑΓָ)