Chapter1:ScopeofthisDocument1HowtousePDFlibproductswithPHPLastchange:October22,2020LatestPDFlibversioncoveredinthisdocument:9.
3.
0p2Latestversionofthisdocumentavailableat:www.
pdflib.
com/documentation/howtos/Contact:PDFlibGmbHFranziska-Bilek-Weg980339München,Germanyphone+49894523384-0support@pdflib.
comwww.
pdflib.
com1ScopeofthisDocumentThisdocumentexplainsvariouspossibilitiesforsuccessfullydeployingPDFlibproductsasaPHPextension.
ThegenerictermPDFlibisusedtodesignateoneofthefollowingdistinctproducts:>ThePDFlibbaseproduct>PDFlib+PDI,asupersetofPDFlibwhichcontainsthePDFImportLibrary(PDI)>PDFlibPersonalizationServer(PPS),asupersetofPDFlib+PDIwithadvancedBlockfillingfeaturesforpersonalizingPDFdocuments.
MostofthePDFlibinformationappliestootherPDFlibGmbHproductsanalogously.
Notesforthefollowingproductsareincludedwhereapplicable:>PDFlibTET(TextandImageExtractionToolkit)>PDFlibPLOP(Linearization,Optimization,Protection)andPLOPDS(DigitalSigna-ture)ThemethodsfordeployinganyoftheseproductsasaPHPextensionarethesameinallcases.
Multipleversionsoftheseproductscannotbedeployedatthesametime.
Howev-er,multipleproductscancoexistwithinonePHPinstallation.
EvaluationversionsofPDFlibproductsarefullyfunctional,butdisplayademostampacrossallgeneratedPDFpagesunlessavalidlicensekeyisapplied.
OtherPDFlibGmbHproductshaveotherre-strictionsinevaluationmode(seedocumentation).
ThisdocumentappliestothefollowingversionsofPDFlibGmbHproducts:>PDFlib9.
3.
0p2>TET5.
3>PLOPandPLOPDS5.
5Whereapplicable,version-specificinformationisprovidedseparately.
2ThePDFlib-in-PHPHowTo2Platforms,PHPVersionsandThreadSafetySupportedplatforms.
PDFlibGmbHproductsforusewithPHPareasloadableexten-sionmoduleswhichareimplementedasDSOs(dynamicsharedobjects,alsocalleddy-namiclinklibraryDLL).
Theyareavailableonthefollowingplatforms:>WindowsServerx86/x64andWindows7/8/10x86/x64>macOS>Linuxonx86andIntel64>AlpineLinuxonIntel64>LinuxonzSeries>FreeBSDIntel64SupportedPHPversions.
ThedistributionpackagesshippedbyPDFlibGmbHcontainDSOsforseveralPHPversions.
Thesearegroupedintodirectoriesasfollows(notallPHPversionsaresupportedonallplatforms,though):>bind/php/php-730forPHP7.
3.
x>bind/php/php-740forPHP7.
4.
x>bind/php/php-800forPHP8.
0.
xThreadsafety.
OnmostplatformstwovariantsofthePHPbinaryareavailable,andthePDFlibDSOmustmatchtheselectedPHPversion:>Thread-safe(TS):thisversionshouldgenerallybeusedwhenloadingPHPasamod-uleintoaWebserver.
Thethread-safeversionshouldbeusedwhenloadingPHPasanApachemodule.
>Non-thread-safe(NTS):thisversionincludesntsinthedirectorynameandshouldgenerallybeusedwhenusingPHPinaWebserverthroughFastCGIprotocol,work-ingwiththecommand-lineinterface(CLI),orintegratingPHPwithIISviaFastCGI.
RefertothePHPWebsiteformoreinformationregardingTSandNTSversionsofPHP.
Chapter3:RequiredSkillLevels33RequiredSkillLevelsMakingPDFlibworkwithPHPrequiresvariousskilllevelsdependingonyouroperatingsystemplatform.
Wewillclassifytasksaccordingtothefollowingskillsets:>APHPWebprogrammerknowshowtowritecodeforPHP,butdoesn'thaveexperi-encewithotherlanguagesorgeneralsystemadministrationtasks.
ThePHPpro-grammerusuallyhasaccesstootherpeoplewhoareresponsibleforperformingcon-figurationtasks.
>AsysadminfeelscomfortableworkingwithPEARandothercommand-linetools,hap-pilyeditsphp.
inianddoesnothesitatetorestarttheWebserver(i.
e.
ApacheorIIS)ifrequiredforinstallationorconfigurationpurposes.
Appropriatepermissions(accessrights)todoallthisarealsopartofthesysadminprofile.
>ACdeveloperhasaccesstoaCdevelopmentenvironment(headerfiles,compiler,linker,associatedsystemlibraries)andcanworkwithconfigurescriptsandMake-filesorcorrespondingIDEfeatures.
Itmayhelptoclassifyyourselfaccordingtothesetypesofdevelopers.
TheremainderofthisdocumentdescribestaskswhichrequireatleastsysadminorCdeveloperskills.
PHPdeveloperswithoutadditionalknowledgeorassistancewillnotbeabletoperformtherequiredstepswithoutassistance.
4ThePDFlib-in-PHPHowTo4TestingyourInstallationAfteryouinstalledyourPDFlibproductextensionforPHPusinganyofthemethodsdiscussedinthisdocumentyoumaywanttotestyourinstallationinordertoseewhethereverythingworksasexpected.
ThePHPinfopage.
YoucantestthesuccessofyourPDFlibproductinstallationandconfigurationwiththefollowingsmallPHPscript:Checktheoutputcreatedbyphpinfo().
IfitcontainsthelinePDFlibGmbHBinaryVersionyouareusingaprecompiledPDFlibDSOprovidedbyPDFlibGmbH.
Ifyoudon'tfindanyPDFlibsectioncheckyourlogfilestodeterminethereason.
ThePDFlibproductexamples.
ThedistributionpackageofyourPDFlibproductcon-tainsexamplesinthebind/phpdirectory.
Youcanusethemtotestyourinstallationasfollows:>CopythePHPsamplesanddatafilestoyourhtdocsdirectoryoranotherdirectorywhichhasbeenconfiguredappropriatelyintheWebserver:cp-rbind/php/path/to/htdocscp-rbind/data/path/to/htdocs>pointyourbrowsertotheURLsoftheexamples>enjoythegeneratedPDFsChapter5:PDFlibinHostingEnvironments55PDFlibinHostingEnvironmentsYouarerunningasiteataWebhostingprovider.
Inthiscasetherearevariousconsid-erations(wecanignorethecasewhereaPDFlibextensionforPHPisalreadyinstalledsincethere'snothingmoretodo):>SomeprovidersdonotallowcustomPHPextensions;inthiscaseyouareoutofluck.
>Withsomeprovidersyoucanmaintainyourowncopyofphp.
ini,whileothersdon'tallowthis.
Ifyoucan'teditphp.
iniandthisfilecontainsenable_dl=Offyouareoutofluck.
YouareaWebhostingprovider.
Asaprovideryoushouldbeawareofthefollowing:>AlthoughPDFlibLitesourcecodeisfreelyavailable,andmanyLinuxandPHPdistri-butionscontainPDFlibLite,thePDFlibLitelicensedoesnotcoverfreeuseofPDFlibLiteonaWebhoster'ssystems.
>YoucaninstallcommercialPDFlibDSOsevenwithoutobtainingalicense.
Inthissit-uationyoucaninstalloneoftheprecompiledPDFlibDSOssuppliedbyPDFlibGmbHwithoutalicensekey(i.
e.
ademostampwillbecreated).
Thoseamongyourcustom-erswhowishtocommerciallyuseitcanobtainacommerciallicensetodisablethedemostamp.
Inotherwords,youcanofferPDFlibwithouttheneedforobtainingali-censeforallofyourservers.
TherecommendedmethodistoinstallthePDFlibDSOinsomegloballyaccessibledirectory,andsettheextension=lineinphp.
iniappropri-ately.
>Alternatively,if(likeanincreasingnumberofproviders)youbelieveinPDFlibavail-abilityasacompetitiveadvantage,youcanobtainasitelicensewhichcoversallyourserversandcustomers.
Individualuserswillnolongerberequiredtoobtainalicenseontheirowninthiscase.
PleasecontactPDFlibGmbHifyouareinterestedinmoredetails.
6ThePDFlib-in-PHPHowTo6DeployingthePDFlibDSONoteInadditiontothePDFlibproductfamily,thissectionalsoappliestoPDFlibTETandPDFlibPLOPifyoureplacethestringphp_pdflibwithphp_tetorphp_plop.
Requirements:>Skilllevel:sysadmin>ThePDFlibDSO,eitherbuiltonyourownor(preferably)fromabinarypackagepro-videdbyPDFlibGmbHatwww.
pdflib.
com/download/pdflib-product-family/>WorkingPHPbinaryThissectionappliestotheprecompiledDSOsdistributedbyPDFlibGmbH,aswellastoDSOswhichyouhavebuiltyourself.
6.
1InstallingthePDFlibDSOonWindowsThePDFlibDSOsforWindows(actuallyDLLs)havebeentestedwiththebinaryPHPdis-tributionwhichisavailablefromwindows.
php.
net.
YouwillfindPDFlibDSOsforvariousversionsofPHPonWindowswithandwithoutmulti-threadingsupportinthedistribu-tionpackage.
DependingonthetargetPHPversionthePDFlibDSOshavebeenbuiltwithdifferentversionsofVisualStudio,whichmeansthatthecorrespondingredistributableruntimeDLLsmustbeavailableonthesystem:>ThePDFlibDSOsforPHP7.
0and7.
1havebeenbuiltwithVisualStudio2015(VC14).
>ThePDFlibDSOsforPHP7.
2havebeenbuiltwithVisualStudio2017(VC15).
ForthePHPinstallationprocesspleasefollowthedocumentationofyourPHPdistribu-tionandcopythePDFlibDSOtothedirectorywhichisspecifiedintheextension_dirlineinphp.
ini.
6.
2InstallingthePDFlibDSOonUnixThePDFlibDSOsforvariousUnixplatformswithandwithoutmulti-threadingsupportareavailablefordifferentversionsofPHP.
YouwillfindPDFlibDSOsinthefollowinglo-cationofthedistributionpackage(adjustthesharedlibrarysuffixasnecessaryforyourplatform):bind/php/php-/php_pdflib.
soCopythePDFlibDSOtothedirectorywhichisspecifiedintheextension_dirlineinphp.
ini.
UsingPDFlibwithZendServer.
InordertousePDFlibwithZendServeryoumustin-stalltheDSOphp_pdflib.
sofromthephp-directory.
CopythisDSOtotheexten-siondirectoryandrestartPHP.
6.
3InstallingthePDFlibDSOonmacOSwithSIPThegeneralinstallationprocedureformacOSisthesameasonUnixsystems(seeabove).
However,therearesomeadditionalaspectswhenApple'sSystemIntegrityPro-tection(SIP)isinvolved.
WhenSIPisenabledthePHPbinarywhichcomespreinstalledChapter6:DeployingthePDFlibDSO7withmacOS10.
14Mojaveacceptsonlysignedextensions,andextensionsmustbeload-edfromoneoftheprotectedsystemdirectoriesforlibraries.
Otherextensiondirecto-riesarenotaccepted.
ThePDFlibDSOissignedbyPDFlibGmbH,butinstallationre-quiressomeextrastepsonsystemswithactiveSIP.
ThesestepsarenotrequiredforotherbuildsofthePHPbinary,e.
g.
thosefromHomebrew.
Step1:TemporarilydisableSystemIntegrityProtection(SIP).
Thisrequiresrebootingintorecoverymode:>Restartthesystemandpresscmd-RuntiltheApplelogoappears.
>SelectTerminalfromtheUtilitiesmenu.
>InthewindowthatopenstypecsrutildisableandpressreturntodisableSystemIn-tegrityProtection.
>ChooseRestartfromtheApplemenu.
Step2:InstallthePDFlibDSOinthePHPextensiondirectory.
CopytheappropriateversionofthePDFlibDSOtotheextensiondirectoryofthepreinstalledPHPbinary,e.
g.
cpbind/php/php-710-nts/php_pdflib.
so/usr/lib/php/extensions/no-debug-non-zts-20160303/Step3:EnableSystemIntegrityProtectionagain.
Thisrequiresrebootingagain:>Restartthesystemandpresscmd-RuntiltheApplelogoappears.
>SelectTerminalfromtheUtilitiesmenu.
>InthewindowthatopenstypecsrutilenableandpressreturntoenableSystemInteg-rityProtection.
ThisensuresthatyourmachineisfullyprotectedbySIP.
>ChooseRestartfromtheApplemenu.
NowconfigurethePDFlibextensionforPHPwithoneofthemethodsdescribedinthenextsection.
6.
4UsingthePDFlibDSOLoadingthePDFlibDSOinphp.
ini.
IfyoudecidetoloadthePDFlibDSOeverytimePHPstarts,insertthefollowinglineinphp.
ini(adjustthesharedlibrarysuffix.
dllasnec-essaryforyourplatform,e.
g.
.
so):extension=php_pdflib.
dllandrestartyourWebserversothatthechangesarerecognized.
Custompdflib.
inifile.
IfyourPHPversionsupportsadditional.
inifilesparsingyoucancreateapdflib.
iniconfigurationfilewithasinglelineasfollows(adjustthesharedli-brarysuffix.
dllasnecessaryforyourplatform,e.
g.
.
so):extension=php_pdflib.
dllinthePHP_INI_SCAN_DIRdirectory.
8ThePDFlib-in-PHPHowTo6.
5CommonProblemswithPDFlibDSOs6.
5.
1AllPlatformsBinarycharacteristicsofPHPandPDFlibDSOmustmatch.
SeveralpropertiesofyourPHPbinarymustmatchthecorrespondingpropertiesofthePDFlibDSO.
Theseproper-tiesaredeterminedwhenbuildingPHPandcannotbechangedafterwards.
Theprecom-piledDSOsforPDFlibhavebeenbuiltasfollows:>non-debugversion>withorwithoutmulti-threadingsupport(seeThreadsafety,page2)>theAPIversion:choosethematchingversionfrombind/php/php-IfyouseeanerrormessagesimilartothefollowingwhentryingtoloadthePDFlibDSO,yourPHPbuildnumberdoesnotmatchthatofthePDFlibmodule:Warning:PHPStartup:PDFlib:UnabletoinitializemoduleModulecompiledwithbuildID=API20190902,TSPHPcompiledwithbuildID=API20190902,NTSTheseoptionsneedtomatchinUnknownonline0Alloftheseoptionsmustmatch.
Intheexampleaboveitwasattemptedtoloadthenon-thread-safeDSOintoathread-safePHPbinary.
6.
5.
2Linuxx86andIntel64PDFlibwithXAMPPonLinuxx86.
SomeversionsofsystemlibrariesbundledwiththeXAMPPpackagemaytriggerthefollowingerrormessage:Warning:PHPStartup:Unabletoloaddynamiclibrary'/opt/lampp/htdocs/test/pdf/pdflib/bind/php/php-720/php_pdflib.
so'-/opt/lampp/lib/libgcc_s.
so.
1:version`GCC_4.
2.
0'notfound(requiredby/usr/lib/libstdc++.
so.
6)inUnknownonline0Inthiscaseyoumustdisablethefollowingtwolinesinthefilebin/envvars,e.
g.
byadd-ingacommentcharacteratthestartoftheline:#binbuildLD_LIBRARY_PATH="/opt/lampp/lib/:$LD_LIBRARY_PATH"#binbuildexportLD_LIBRARY_PATHPDFlibwithXAMPPonLinuxIntel64.
Ifyouareusingthe32-biteditionofXAMPPyoumustusethe32-biteditionofPDFlibforthiscombination.
However,youmayseethefollowingerrormessage:Warning:PHPStartup:Unabletoloaddynamiclibrary'/opt/lampp/htdocs/test/pdf/PDFlib-x.
y.
z-Linux-php/bind/php/php-720/php_pdflib.
so'-libstdc++.
so.
6:wrongELFclass:ELFCLASS64inUnknownonline0ThereasonforthiserroristhatwhileXAMPPincludessomeofthe32-bitruntimelibrar-iesrequiredforPDFlib,oneimportantruntimelibraryisstillmissing.
Youmustinstallthe32-bitversionoflibstdc++.
so.
6onthesystem.
Forexample,onDebiansystemsthiscanbeachievedwiththefollowingcommand:apt-getinstallia32-libsChapter6:DeployingthePDFlibDSO96.
5.
3macOSPDFlibwithXAMPPonmacOS.
IfyouaddthePDFlibPHPextensiontoyourphp.
inionanmacOSIntelmachinewhichhasXAMPPinstalled,thefollowingerrormessageap-pears:dyld:NSLinkModule()errordyld:Symbolnotfound:__cg_jpeg_resync_to_restartReferencedfrom:/System/Library/Frameworks/ApplicationServices.
framework/Versions/A/Frameworks/ImageIO.
framework/Versions/A/ImageIOExpectedin:/Applications/xampp/xamppfiles/lib/libjpeg.
62.
dylibThePDFlibextensionislinkedagainsttheApplicationServicesFramework,andXAMPPchangestheDYLD_LIBRARY_PATH.
Thiscombinationconfusesthedynamiclinkeditor.
WefoundthatunsettingDYLD_LIBRARY_PATHcuresthisproblem.
Usethefollowinglineaslastcommandinxamppfiles/bin/envvars:unsetDYLD_LIBRARY_PATH10ThePDFlib-in-PHPHowTo7AdditionalResources>ThepublicPDFlibmailinglistforgeneraldiscussion:groups.
yahoo.
com/neo/groups/pdflib/conversations/topics>PDFlibsupportforcommerciallicensees:support@pdflib.
com>GeneralinformationoninstallingPHP:www.
php.
net/install
我们一般的站长或者企业服务器配置WEB环境会用到免费版本的宝塔面板。但是如果我们需要较多的付费插件扩展,或者是有需要企业功能应用的,短期来说我们可能选择按件按月付费的比较好,但是如果我们长期使用的话,有些网友认为选择宝塔面板企业版或者专业版是比较划算的。这样在年中大促618的时候,我们也可以看到宝塔面板也有发布促销活动。企业版年付899元,专业版永久授权1888元起步。对于有需要的网友来说,还是值...
GreencloudVPS此次在四个机房都上线10Gbps大带宽VPS,并且全部采用AMD处理器,其中美国芝加哥机房采用Ryzen 3950x处理器,新加坡、荷兰阿姆斯特丹、美国杰克逊维尔机房采用Ryzen 3960x处理器,全部都是RAID-1 NVMe硬盘、DDR4 2666Mhz内存,GreenCloudVPS本次促销的便宜VPS最低仅需20美元/年,支持支付宝、银联和paypal。Gree...
RAKsmart 虽然是美国主机商,但是商家的主要客户群还是在我们国内,于是我们可以看到每次的国内节日促销活动期间商家也会发布促销。包括这次年中大促活动,RAKsmart商家也有发布为期两个月的年终活动,其中有商家擅长的独立服务器和便宜VPS主机。服务器包括站群服务器、特价服务器、高达10G带宽不限制流量的美国服务器。商家优惠活动,可以看到对应商品的优惠,同时也可以使用 优惠码 RAKBL9 同时...
extension_dir为你推荐
.cn域名cn是什么域名?brandoff淘宝上的代购奢侈品都是真品吗?摩根币摩根币是怎么骗人的?网站检测请问,对网站进行监控检测的工具有哪些?www.haole012.comhttp://fj.qq.com/news/wm/wm012.htm 这个链接的视频的 第3分20秒开始的 背景音乐 是什么?www.5ff.comhttp://www.940777.com/网站,是不是真的网投六合789se.com莫非现在的789mmm珍的com不管了抓站工具抓鸡要什么工具?javlibrary.com大家有没有在线图书馆WWW。QUESTIA。COM的免费帐号彪言彪语( )言( )语
新加坡虚拟主机 vps动态ip 中国域名交易中心 国外永久服务器 主机测评网 512au ubuntu更新源 服务器怎么绑定域名 500m空间 qingyun 193邮箱 东莞数据中心 佛山高防服务器 php空间购买 鲁诺 超级服务器 免费外链相册 独享主机 便宜空间 德隆中文网 更多