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
水墨云怎么样?本站黑名单idc,有被删除账号风险,建议转出及数据备份!水墨云ink cloud Service是成立于2017年的商家,自2020起开始从事香港、日本、韩国、美国等地区CN2 GIA线路的虚拟服务器租赁,同时还有台湾、国内nat vps相关业务,也有iplc专线产品,相对来说主打的是大带宽服务器产品。注意:本站黑名单IDC,有被删除账号风险,请尽量避免,如果已经购买建议转出及数据备...
易探云怎么样?易探云(yitanyun.com)是一家知名云计算品牌,2017年成立,从业4年之久,目前主要从事出售香港VPS、香港独立服务器、香港站群服务器等,在售VPS线路有三网CN2、CN2 GIA,该公司旗下产品均采用KVM虚拟化架构。目前,易探云推出免备案香港物理机服务器性价比很高,E3-1230 8 核*1/16G DDR3/SATA 1TB/香港BGP线路/20Mbps/不限流量,仅...
优林怎么样?优林好不好?优林 是一家国人VPS主机商,成立于2016年,主营国内外服务器产品。云服务器基于hyper-v和kvm虚拟架构,国内速度还不错。今天优林给我们带来促销的是国内西南地区高防云服务器!全部是独享带宽!续费同价!官方网站:https://www.idc857.com地区CPU内存硬盘流量带宽防御价格购买地址德阳高防4核4g50G无限流量10M100G70元/月点击购买德阳高防...
extension_dir为你推荐
openeuleropen与close的区别及用法johncusack约翰·库萨克好看的的恐怖片全集阿丽克丝·布莱肯瑞吉行尸走肉第六季女演员lunwenjiancepaperrater论文检测准确吗www.03ggg.comwww.tvb33.com这里好像有中国性戏观看吧??www.zhiboba.com网上看nbabaqizi.cc讲讲曾子杀猪的主要内容!hao.rising.cn我一打开网页就是瑞星安全网站导航,怎么修改?59ddd.com网站找不到了怎么办啊dpscycle痛苦术士PVE输出宏
台湾服务器租用 vps侦探 贝锐花生壳域名 百度云100as payoneer 42u标准机柜尺寸 新世界电讯 512au 合肥鹏博士 godaddy域名证书 徐正曦 免费测手机号 超级服务器 备案空间 游戏服务器出租 申请免费空间 金主 后门 cdn加速技术 web服务器 更多