SlideShare a Scribd company logo
1 of 4
Download to read offline
Explore GitHub
Search
Features
Blog
Sign up for free Sign in
Star 41
Fork 8

public psliwa / PdfBundle
Code
Network
Pull Requests 0
Issues 2
Graphs
PHP
1. PHP 100%
This bundle integrates Symfony2 with PHPPdf library. — Read more
http://ohey.pl
Clone in Windows
ZIP
HTTP SSH Git Read-Only https://github.com/psliwa/PdfBundle.git
Read-Only access
Tags 0
branch: master
Switch branches/tags
Filter branches/tags

Branches
Tags
1.0.x
master
zf1-in-backend
Nothing to show
Nothing to show
Files
Commits
Branches 3
71 commits
PdfBundle /
fix composer.json file
latest commit 623579091a
psliwa authored 14 days ago
Annotation
a year ago new @Pdf annotation argument (enableCache), fix DI configuration [psliwa]
Controller
7 months agoupdate composer.json, README and examples [psliwa]
DependencyInjection a year ago update supported PHPPdf version to 1.1.x branch [psliwa]
EventListener
a month ago [#28] responses with error code > 299 do not trigger pdf rendering [psliwa]
PHPPdf
a year ago support for bundle based paths in fonts configuration file and source… [psliwa]
Reflection
a year ago [#3] fix compatibility to new versions of JMS bundles [psliwa]
Resources
a year ago support for bundle based paths in fonts configuration file and source… [psliwa]
Templating
8 months agofix image location [psliwa]
Tests
a month ago [#28] responses with error code > 299 do not trigger pdf rendering [psliwa]
Twig
a year ago pdf_image Twig function [psliwa]
6 months agoreadme update [psliwa]
vendor
.travis.yml
a year ago travis-ci fix [psliwa]
CHANGELOG
5 months agoupdate version of PHPPdf in composer file [psliwa]
LICENSE
2 years ago initial commit [psliwa]
PsPdfBundle.php
2 years ago fix [psliwa]
README.markdown6 months agoreadme update [psliwa]
composer.json
14 days ago fix composer.json file [psliwa]
README.markdown

PsPdfBundle
This bundle integrates Symfony2 with PHPPdf library. Thanks to this bundle you can easily generate PDF or image (png, jpg) files.
Documentation of PHPPdf you can find on github (README file).

Installation
1. If you use composer to resolve dependencies, you can skip 2nd, 3rd and 4th steps. PsPdfBundle requires "minimum-stability" equals to dev. PHPPdf uses
zendframework packages, so if you want to use composer, you must add zendframework composer repository to your composer.json file.
"eoiois:[
rpstre"
{
"ye:"opsr,
tp" cmoe"
"r" "tp/pcae.edrmwr.o/
ul: ht:/akgsznfaeokcm"
}
,
{
"ye:"opsr,
tp" cmoe"
"r" "tp/pcaitog"
ul: ht:/akgs.r/
}
]

2. Add this bundle and PHPPdf library to deps file and update vendors:
[dBnl]
Pfude
gtgt/gtu.o/siaPfudegt
i=i:/ihbcmplw/dBnl.i
tre=bnlsP/dBnl
agt/ude/sPfude
[HPf
PPd]
gtgt/gtu.o/siaPPd.i
i=i:/ihbcmplw/HPfgt
vrinoii/..
eso=rgn11x

3. Download dependencies (for example ZF2) of PHPPdf library. You can skip this step, if your application has had dependency on ZF2 framework and Imagine already.
For more details see installation section of PHPPdf documentation.
ppvno/HPfvnospp
h edrPPd/edr.h

4. Register bundle, PHPPdf, Imagine and ZF libraries in autoloader:

/apatla.h
/p/uoodpp
$odr>eitraepcsary
lae-rgseNmsae(ra(
's = _DR_'./edrbnls,
P' > _I_./.vno/ude'
'HPf = _DR_'./edrPPd/i'
PPd' > _I_./.vno/HPflb,
'mgn'= ary_DR_'./edrPPd/i' _DR_'./edrPPd/i/edrIaielb)
Iaie > ra(_I_./.vno/HPflb, _I_./.vno/HPflbvno/mgn/i',
'ed = _DR_'./edrPPd/i/edrZn/irr'/I yuhv ue Z2pcae aray yusol si ti ety
Zn' > _I_./.vno/HPflbvno/edlbay,/f o ae sd F akgs led, o hud kp hs nr
'edd'= _DR_'./edrPPd/i/edrZnPflbay,
ZnPf > _I_./.vno/HPflbvno/edd/irr'
);
)

5. Register bundle in AppKernel:
/apApenlpp
/p/pKre.h
pbi fnto rgseBnls)
ulc ucin eitrude(
{
rtr ary
eun ra(
/ .
/ .
nwPdBnlsdBnl(,
e sPfudePPfude)
/ .
/ .
)
;
}

Configuration
All options are optional.
#apcni/ofgyl
p/ofgcni.m
p_d:
spf
ndsfl:~
oe_ie
fnsfl:~
ot_ie
cmlxatiue_ie ~
ope_trbtsfl:
clr_ie ~
oosfl:
ueccei_tlset ~
s_ah_nsyehe:
cce
ah:
tp:~
ye
otos ~
pin:
mrdw_tlsetflpt:~
akonsyehe_ieah
mrdw_ouettmlt_ieah ~
akondcmn_epaeflpt:
dcmn_asrtp:~
ouetpre_ye

nodes_file - path to file with nodes/tags definitions, internal nodes.xml file from PHPPdf library is used by default
fonts_file - path to file with fonts definitions, internal fonts.xml file from PHPPdf library is used by default
complex_attributes_file - path to file with complex attributes definitions, internal complex-attributes.xml file from PHPPdf library is used by default
colors_file - path to file with default palette of colors, internal colors.xml file from PHPPdf library is used by default
cache.type - type of cache, supported are all backend cache from Zend_Cache component (for instance File, Apc, Memcached, Sqlite etc.). File engine is used by
default.
cache.options - specyfic options for cache engine (for instance "cache_dir" for File engine). cache_dir by default is as same as kernel.cache_dir.
use_cache_in_stylesheet - stylesheet maching rules will be cache, if this option is set. In complex stylesheet cache significantly improves performance. Default is true, but
in dev environment cache should be off.
markdown_stylesheet_filepath - filepath of stylesheet for markdown parser
markdown_document_template_filepath - xml document template form output of markdown parser
document_parser_type - default parser type: xml or markdown

Images in source document
If you want to display image, you must provide absolute path to image file via "src" attribute of image tag. Asset Twig function dosn't work, because it converts image path to
relative path according to web directory. To make using of images easier, bundle provides Twig function, that converts image logical name to real, absolute path.
Example:
<d>
pf
<yai-ae
dnmcpg>
<- pfiae'udeaeiaenm.xeso' ->
!- d_mg(BnlNm:mg-aeetnin) <m sc"{pfiae'yfnWbofgrtrudebu-ro.n' }"/
ig r={ d_mg(SmoyeCniuaoBnl:learwpg) } >
<dnmcpg>
/yai-ae
<pf
/d>

Bundle based paths in fonts and document xml file
If you want to use custom fonts, you should create your own fonts.xml config file (default fonts filepath is PHPPdfResourcesconfigfonts.xml). To make easier defining fonts
paths, bundle based paths are supported. Example:
<- sm fnsxlfl ->
!- oe ot.m ie <tlcsc"SmBnl:ietf"/
iai r=%oeudefl.t% >

"%SomeBundle:file.ttf%" will be replaced by "path/to/SomeBundle/Resources/file.ttf"

Example
/ I cnrle
/ n otolr
/..
/.
uePdBnlnoainPf
s sPfudeAnttod;
/..
/.
/*
*
*@d(
Pf)
*
/
pbi fnto hlocin$ae
ulc ucin elAto(nm)
{
$omt=$hs>e(rqet)>e(_omt)
fra
ti-gt'eus'-gt'fra';
rtr $hs>edrsrnf'oeudeSmCnrle:elAto.sti' $omt,ary
eun ti-rne(pit(SmBnl:oeotolrhlocin%.wg, fra) ra(
'ae = $ae
nm' > nm,
);
)
}
/ i hlocinhm.wg
/ n elAto.tlti
Hlo{ nm }!
el { ae }
/ i hlocinpfti
/ n elAto.d.wg
<d>
pf
<yai-ae
dnmcpg>
Hlo{ nm }!
el { ae }
<dnmcpg>
/yai-ae
<pf
/d>

Bundle automatically detects pdf format (via _format) request and create pdf document from response.
Pdf annotation has four optional properties:
headers - associative array of specyfic headers
stylesheet - pdf stylesheet template file in standard Symfony2 notation ("Bundle:Controller:file.format.engine")
documentParserType - type of parser: xml or markdown
enableCache - pdf output should by cached? True or false, default: false. Hash (md5) from template and stylesheet content is a cache key, only PHPPdf invocation is
cached, controller is always called.

GitHub
About us
Blog
Contact & support
GitHub Enterprise
Site status
Applications
GitHub for Mac
GitHub for Windows
GitHub for Eclipse
GitHub mobile apps
Services
Gauges: Web analytics
Speaker Deck: Presentations
Gist: Code snippets
Job board
Documentation
GitHub Help
Developer API
GitHub Flavored Markdown
GitHub Pages
More
Training
Students & teachers
The Shop
Plans & pricing
The Octodex
© 2013 GitHub Inc. All rights reserved.
Terms of Service
Privacy
Security

Something went wrong with that request. Please try again.

More Related Content

Recently uploaded

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Featured

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Featured (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Crear un Pdf con un bundle en symfony 2

  • 1. Explore GitHub Search Features Blog Sign up for free Sign in Star 41 Fork 8 public psliwa / PdfBundle Code Network Pull Requests 0 Issues 2 Graphs PHP 1. PHP 100% This bundle integrates Symfony2 with PHPPdf library. — Read more http://ohey.pl Clone in Windows ZIP HTTP SSH Git Read-Only https://github.com/psliwa/PdfBundle.git Read-Only access Tags 0 branch: master Switch branches/tags Filter branches/tags Branches Tags 1.0.x master zf1-in-backend Nothing to show Nothing to show Files Commits Branches 3 71 commits PdfBundle / fix composer.json file latest commit 623579091a psliwa authored 14 days ago Annotation a year ago new @Pdf annotation argument (enableCache), fix DI configuration [psliwa] Controller 7 months agoupdate composer.json, README and examples [psliwa] DependencyInjection a year ago update supported PHPPdf version to 1.1.x branch [psliwa] EventListener a month ago [#28] responses with error code > 299 do not trigger pdf rendering [psliwa] PHPPdf a year ago support for bundle based paths in fonts configuration file and source… [psliwa] Reflection a year ago [#3] fix compatibility to new versions of JMS bundles [psliwa] Resources a year ago support for bundle based paths in fonts configuration file and source… [psliwa] Templating 8 months agofix image location [psliwa] Tests a month ago [#28] responses with error code > 299 do not trigger pdf rendering [psliwa] Twig a year ago pdf_image Twig function [psliwa] 6 months agoreadme update [psliwa] vendor .travis.yml a year ago travis-ci fix [psliwa] CHANGELOG 5 months agoupdate version of PHPPdf in composer file [psliwa] LICENSE 2 years ago initial commit [psliwa] PsPdfBundle.php 2 years ago fix [psliwa] README.markdown6 months agoreadme update [psliwa] composer.json 14 days ago fix composer.json file [psliwa]
  • 2. README.markdown PsPdfBundle This bundle integrates Symfony2 with PHPPdf library. Thanks to this bundle you can easily generate PDF or image (png, jpg) files. Documentation of PHPPdf you can find on github (README file). Installation 1. If you use composer to resolve dependencies, you can skip 2nd, 3rd and 4th steps. PsPdfBundle requires "minimum-stability" equals to dev. PHPPdf uses zendframework packages, so if you want to use composer, you must add zendframework composer repository to your composer.json file. "eoiois:[ rpstre" { "ye:"opsr, tp" cmoe" "r" "tp/pcae.edrmwr.o/ ul: ht:/akgsznfaeokcm" } , { "ye:"opsr, tp" cmoe" "r" "tp/pcaitog" ul: ht:/akgs.r/ } ] 2. Add this bundle and PHPPdf library to deps file and update vendors: [dBnl] Pfude gtgt/gtu.o/siaPfudegt i=i:/ihbcmplw/dBnl.i tre=bnlsP/dBnl agt/ude/sPfude [HPf PPd] gtgt/gtu.o/siaPPd.i i=i:/ihbcmplw/HPfgt vrinoii/.. eso=rgn11x 3. Download dependencies (for example ZF2) of PHPPdf library. You can skip this step, if your application has had dependency on ZF2 framework and Imagine already. For more details see installation section of PHPPdf documentation. ppvno/HPfvnospp h edrPPd/edr.h 4. Register bundle, PHPPdf, Imagine and ZF libraries in autoloader: /apatla.h /p/uoodpp $odr>eitraepcsary lae-rgseNmsae(ra( 's = _DR_'./edrbnls, P' > _I_./.vno/ude' 'HPf = _DR_'./edrPPd/i' PPd' > _I_./.vno/HPflb, 'mgn'= ary_DR_'./edrPPd/i' _DR_'./edrPPd/i/edrIaielb) Iaie > ra(_I_./.vno/HPflb, _I_./.vno/HPflbvno/mgn/i', 'ed = _DR_'./edrPPd/i/edrZn/irr'/I yuhv ue Z2pcae aray yusol si ti ety Zn' > _I_./.vno/HPflbvno/edlbay,/f o ae sd F akgs led, o hud kp hs nr 'edd'= _DR_'./edrPPd/i/edrZnPflbay, ZnPf > _I_./.vno/HPflbvno/edd/irr' ); ) 5. Register bundle in AppKernel: /apApenlpp /p/pKre.h pbi fnto rgseBnls) ulc ucin eitrude( { rtr ary eun ra( / . / . nwPdBnlsdBnl(, e sPfudePPfude) / . / . ) ; } Configuration All options are optional. #apcni/ofgyl p/ofgcni.m p_d: spf ndsfl:~ oe_ie fnsfl:~ ot_ie cmlxatiue_ie ~ ope_trbtsfl: clr_ie ~ oosfl: ueccei_tlset ~ s_ah_nsyehe: cce ah: tp:~ ye otos ~ pin: mrdw_tlsetflpt:~ akonsyehe_ieah mrdw_ouettmlt_ieah ~ akondcmn_epaeflpt: dcmn_asrtp:~ ouetpre_ye nodes_file - path to file with nodes/tags definitions, internal nodes.xml file from PHPPdf library is used by default fonts_file - path to file with fonts definitions, internal fonts.xml file from PHPPdf library is used by default complex_attributes_file - path to file with complex attributes definitions, internal complex-attributes.xml file from PHPPdf library is used by default colors_file - path to file with default palette of colors, internal colors.xml file from PHPPdf library is used by default cache.type - type of cache, supported are all backend cache from Zend_Cache component (for instance File, Apc, Memcached, Sqlite etc.). File engine is used by default. cache.options - specyfic options for cache engine (for instance "cache_dir" for File engine). cache_dir by default is as same as kernel.cache_dir. use_cache_in_stylesheet - stylesheet maching rules will be cache, if this option is set. In complex stylesheet cache significantly improves performance. Default is true, but
  • 3. in dev environment cache should be off. markdown_stylesheet_filepath - filepath of stylesheet for markdown parser markdown_document_template_filepath - xml document template form output of markdown parser document_parser_type - default parser type: xml or markdown Images in source document If you want to display image, you must provide absolute path to image file via "src" attribute of image tag. Asset Twig function dosn't work, because it converts image path to relative path according to web directory. To make using of images easier, bundle provides Twig function, that converts image logical name to real, absolute path. Example: <d> pf <yai-ae dnmcpg> <- pfiae'udeaeiaenm.xeso' -> !- d_mg(BnlNm:mg-aeetnin) <m sc"{pfiae'yfnWbofgrtrudebu-ro.n' }"/ ig r={ d_mg(SmoyeCniuaoBnl:learwpg) } > <dnmcpg> /yai-ae <pf /d> Bundle based paths in fonts and document xml file If you want to use custom fonts, you should create your own fonts.xml config file (default fonts filepath is PHPPdfResourcesconfigfonts.xml). To make easier defining fonts paths, bundle based paths are supported. Example: <- sm fnsxlfl -> !- oe ot.m ie <tlcsc"SmBnl:ietf"/ iai r=%oeudefl.t% > "%SomeBundle:file.ttf%" will be replaced by "path/to/SomeBundle/Resources/file.ttf" Example / I cnrle / n otolr /.. /. uePdBnlnoainPf s sPfudeAnttod; /.. /. /* * *@d( Pf) * / pbi fnto hlocin$ae ulc ucin elAto(nm) { $omt=$hs>e(rqet)>e(_omt) fra ti-gt'eus'-gt'fra'; rtr $hs>edrsrnf'oeudeSmCnrle:elAto.sti' $omt,ary eun ti-rne(pit(SmBnl:oeotolrhlocin%.wg, fra) ra( 'ae = $ae nm' > nm, ); ) } / i hlocinhm.wg / n elAto.tlti Hlo{ nm }! el { ae } / i hlocinpfti / n elAto.d.wg <d> pf <yai-ae dnmcpg> Hlo{ nm }! el { ae } <dnmcpg> /yai-ae <pf /d> Bundle automatically detects pdf format (via _format) request and create pdf document from response. Pdf annotation has four optional properties: headers - associative array of specyfic headers stylesheet - pdf stylesheet template file in standard Symfony2 notation ("Bundle:Controller:file.format.engine") documentParserType - type of parser: xml or markdown enableCache - pdf output should by cached? True or false, default: false. Hash (md5) from template and stylesheet content is a cache key, only PHPPdf invocation is cached, controller is always called. GitHub About us Blog Contact & support GitHub Enterprise Site status Applications GitHub for Mac GitHub for Windows GitHub for Eclipse GitHub mobile apps Services Gauges: Web analytics
  • 4. Speaker Deck: Presentations Gist: Code snippets Job board Documentation GitHub Help Developer API GitHub Flavored Markdown GitHub Pages More Training Students & teachers The Shop Plans & pricing The Octodex © 2013 GitHub Inc. All rights reserved. Terms of Service Privacy Security Something went wrong with that request. Please try again.