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
Introduction of Thinreports for PHP
Search
Katsuya Hidaka
June 27, 2015
Technology
0
6.5k
Introduction of Thinreports for PHP
PHP カンファレンス 2015 福岡で、Thinreports の PHP 実装を作ったよという話をしたときのスライド
Katsuya Hidaka
June 27, 2015
Tweet
Share
More Decks by Katsuya Hidaka
See All by Katsuya Hidaka
後方互換の保ち方 / How to Maintain Compatibility
hidakatsuya
0
890
HTML帳票 / Frontend Study Group in Sannin 3rd
hidakatsuya
0
3.2k
2006-2016 Ruby, OSS, Thinreports/matsue-rubykaigi08-LT
hidakatsuya
0
460
prpr でプルリクエスト運用を自動化する /Introduction-of-prpr
hidakatsuya
0
3.6k
AgileJapan2016 Shimane Session2-2
hidakatsuya
0
2.2k
Other Decks in Technology
See All in Technology
クォータ監視、AWS Organizations環境でも楽勝です✌️
iwamot
PRO
1
330
白金鉱業Meetup_Vol.18_生成AIはデータサイエンティストを代替するのか?
brainpadpr
3
120
意思決定を支える検索体験を目指してやってきたこと
hinatades
PRO
0
230
AI AgentOps LT大会(2025/04/16) Algomatic伊藤発表資料
kosukeito
0
140
Goの組織でバックエンドTypeScriptを採用してどうだったか / How was adopting backend TypeScript in a Golang company
kaminashi
6
6.9k
勝手に!深堀り!Cloud Run worker pools / Deep dive Cloud Run worker pools
iselegant
2
460
Devoxx France 2025 - Comment transformons-nous les Restos du Coeur en Cloud Provider ?
ju_hnny5
0
100
LangfuseでAIエージェントの 可観測性を高めよう!/Enhancing AI Agent Observability with Langfuse!
jnymyk
1
240
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
0
190
【Λ(らむだ)】最近のアプデ情報 / RPALT20250422
lambda
0
110
ここはMCPの夜明けまえ
nwiizo
28
10k
アセスメントで紐解く、10Xのデータマネジメントの軌跡
10xinc
1
440
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
119
51k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
23
2.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
41
2.2k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
680
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
135
33k
Transcript
ؔ٦فٝا٦أז䌘牰 خ٦ٕ⡲ת׃կ PHP Conference FUKUOKA 2015
ߴ ࠀ Ruby, PHP Thinreports ͷ։ൃऀ
SIɾσʔληϯλʔɾӡ༻ɾσʔλΤϯτϦʔ
αϚϦʔ Thinreports ͍ͬͯ͏Φʔϓϯιʔεͷாථπʔ ϧ͕͢Ͱʹ͋ͬͯɺͦͷPHP൛Λ࡞ͬͨΑɺͱ ͍͏ɻ
Thinreports ͱ • Ruby Ͱ͑ΔΦʔϓϯιʔεͷாථπʔϧ • ϨΠΞτσβΠφʢEditorʣͱ PDFग़ྗϥΠϒϥϦʢGeneratorʣ • Ҏ߱ɺͪ͜ΒΛʮຊՈʯͱݺͼ·͢
None
None
None
Editor Layout File (.tlf) Script (Generator)
PHP ൛ Thinreports • Ҏલ͔Βཁଟ • Generator ͷ PHP ࣮
• Editor ڞ௨
Editor Layout File (.tlf) Script (Generator) ࠓճ࡞ͬͨͷίί
thinreports-php • Status: dev-master • PHP >= 5.6 PHP7, HHVM
ಈ࡞ະ֬ೝ • The MIT License ճΓͰͬͯΔ TCPDF LGPLv3 Ͱ͋Δ͜ͱʹҙ • Pure PHP
None
None
Hello thinreports-php
Setup. Install thinreports-php $ vi composer.json : “require”: { “thinreports-php/thinreports-php”:
“dev-master” } : $ composer install
Setup. Install Editor
1. Create a layout file ID Λ “world”
2. Write code use Thinreports; $report = new Thinreports\Report('hello_world.tlf'); $page
= $report->addPage(); $page->item('world')->setValue('World'); // ҎԼͷΑ͏ʹॻ͚Δ: // $page(‘world’)->setValue(’World’); // $page->setItemValue(‘world’, ’World’); // $page->setItemValues([‘world’ => ’World’]); $report->generate('hello_world.pdf');
3. Run $ php hello_world.php ↩︎
4. Finish
ͦͷଞͰ͖Δ͜ͱ • ͪΖΜຊޠ OK • ը૾ͷ੩త/ಈతషΓ͚ • ਤܗɾςΩετͷಈతͳελΠϧมߋ • ϖʔδ൪߸ͷࣗಈදࣔ
• ؆қॻࣜઃఆʢ࣌ࠁɺɺࣈ٧Ίʣ ͳͲͳͲɻৄࡉຊՈެࣜαΠτΛͲ͏ͧɻ
ͱ͍͑ɺ·ͩ։ൃόʔδϣϯ • ϦετπʔϧະରԠ • ෳ߹ϨΠΞτະରԠ ൺֱత؆୯ʹͰ͖Δɻ͜ͷޙʹͰରԠ͢Δ • ϑΥϯτͷϑΥʔϧόοΫະରԠ ͜Ε͕ຯʹҰ൪ͷ՝ •
ύϑΥʔϚϯεɾϝϞϦʔফඅͷվળ IPAϑΥϯτΛ TCPDF ༻ʹม͢Δίετ͕ߴ͍ɻࣄલʹม͢ΔΈ༻ҙ • ςετίʔυͷΧόϨοδ 70% ͙Β͍ ؒʹ߹Θͣ
TCPDF • ςετίʔυ͕ͳ͍ ࠷ۙؾ͍ͮͨ… • ࠨԼʹখ͘͞ʮPowered by TCPDFʯ ۃখαΠζˍനʹനจࣈͳͷͰݟͨͳ͍͕…
• PDF ϥΠϒϥϦ։ൃͱ͍͏ҋʹखΛग़͔͢ ΜͰΔͱ͜Ζ
ࠓޙ
։ൃํ • ຊՈ Thinreports ͱผͷίϛϡχςΟͱͯ͠։ൃ ͪΖΜࢲࢀՃ͠·͢ • ϨΠΞτϑΝΠϧͷ༷ԼهͰެ։͞Ε͍ͯΔ ͷͰ͜Εʹैͬͯै͢Δײ͡ https://github.com/thinreports/thinreports/wiki/Spec:-Layout-File
• ͱ͍͑ɺPHP൛ಠࣗͷػೳશવ͋Γ ͢Ͱʹ Ruby ࣮ͱएׯ API ҧ͍·͢͠
ͥͻҰॹʹ • ݱࡏͷ։ൃϝϯόʔ: 1ਓʢࢲʣ • ͔͠ PHP ΛͪΌΜͱΔͷ 5 ͿΓ
PHPΧϯϑΝϨϯεͳͷʹ͍͢·ͤΜ • ΠέͯΔπʔϧʹͳΔ͔Ͳ͏͔ɺΈͳ͞Μ ʹ͔͔͍ͬͯ·͢!
ૣɺ։ൃʹࢀՃ͢Δ • ·ͩԿߟ͑ͯͳ͍Ͱ͢ • ͱΓ͑͋͑ͣɺGitter ͷ “dev” room ʹ JOIN
README.md ͷԼͷํʹ͋Δɹɹɹɹɹɹɹ ɹΛΫϦοΫ͢Δ͠ • ։ൃυΩϡϝϯτͳΜ͔ Wiki ʹ·ͱΊ·͢ গʑ͓ͪԼ͍͞ • Α͘Θ͔Βͳ͍Αɺͱ͍͏ํޙͰฉ͍ͯͩ͘ ͍͞
͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ ͪͳΈʹɺ • ຊՈ Thinreports v1.0 ϦϦʔε༧ఆ • ΧελϜϑΥϯτ ݱࡏ͑ΔϑΥϯτ
4 ͭͷΈɻಠࣗϑΥϯτ͕ར༻ՄೳʹͳΔ͔ • Ϧετπʔϧͷվળ ୯ථϨΠΞτͱ࿈ථϨΠΞτ͕બՄೳʹͳΔ͔ • όʔίʔυػೳͷωΠςΟϒαϙʔτͳͲ