Documente Academic
Documente Profesional
Documente Cultură
Contents
Package create Procedural Elements
CreateDocument.inc CreateDocx.inc 2 2 3 4 4 4 5 5 5 5 5 5 6 6 6 6 9 11 11 12 13 13 14 14 15 17 17 17 18 19 19 22 22 23 24 24 24 25 26 26 29 31 32
example: example example: example Method addGraphicImg Method addGraphicTemplate Method addHeader example: example example: example example: example Method addHTML example: example example: example Method addImage example: example example: example Method addLink example: example example: example Method addList example: example example: example example: example example: example example: example Method addMacroFromDoc Method addMathDocx example: example Method addMathEq example: example Method addMathMML Method addObject Method addProperties example: example Method addRawWordML Method addRTF example: example Method addSection example: example Method addShape example: example Method addTable example: example example: example example: example example: example Method addTableContents example: example Method addTemplate example: example Method addTemplateChart
33 33 34 35 35 35 38 39 40 40 41 42 42 43 44 44 47 48 48 49 50 51 51 52 53 53 53 53 54 55 55 55 56 56 56 57 57 58 58 59 59 62 63 64 65 65 66 66 67
example: example Method addTemplateCheckBox Method addTemplateImage example: example Method addTemplateVariable example: example Method addText example: example example: example example: example example: example example: example example: example example: example Method addTextBox example: example Method addTitle example: example example: example example: example Method clearBlocks Method createDocx example: example example: example Method createDocxAndDownload Method deleteTemplateBlock Method disableDebug Method enableDebug Method getTemplateVariables Method getTemporaryDirectory Method getXmlContentTypes Method getXmlDocPropsApp Method getXmlDocPropsCore Method getXmlDocPropsCustom Method getXmlRelsRels Method getXmlWordDocumentContent Method getXmlWordDocumentStyles Method getXmlWordEndnotes Method getXmlWordFontTable Method getXmlWordFooter1 Method getXmlWordHeader1 Method getXmlWordRelsDocumentRels Method getXmlWordSettings Method getXmlWordStyles Method getXmlWordThemeTheme1 Method getXml_Word_WebSettings Method mergeDOCX Method readDOCX Method setDefaultFont
67 68 68 68 69 69 70 70 70 73 75 75 76 77 78 78 79 79 82 84 85 85 85 88 89 89 90 90 90 90 91 91 91 91 91 92 92 92 92 92 93 93 93 93 94 94 94 94 95
Method setEncodeUTF8 Method setLanguage Method setMarkAsFinal Method setTemplateSymbol Method setTemporaryDirectory Method setXmlContentTypes Method setXmlDocPropsApp Method setXmlDocPropsCore Method setXmlDocPropsCustom Method setXmlRelsRels Method setXmlWordDocument Method setXmlWordDocumentStyles Method setXmlWordEndnotes Method setXmlWordFontTable Method setXmlWordFooter1 Method setXmlWordHeader1 Method setXmlWordRelsDocumentRels Method setXmlWordSettings Method setXmlWordStyles Method setXmlWordThemeTheme1 Method setXmlWordWebSettings Method __destruct Method __toString
95 95 96 96 96 96 97 97 97 98 98 98 99 99 100 100 100 101 101 101 102 102 102 104 104 105 105 105 105 106 106 106 106 107 107 107 107 108 108 110 110 111 112 113 114 115 116 117
CreateFooter.inc CreateFootnote.inc CreateGraphic.inc CreateHeader.inc CreateImage.inc CreateLink.inc CreateList.inc CreateMacro.inc CreateMath.inc CreatePage.inc CreateProperties.inc CreateSettings.inc CreateShape.inc CreateStyle.inc CreateStyleTable.inc CreateTable.inc CreateTableContents.inc CreateTemplate.inc CreateText.inc CreateTextBox.inc CreateTheme1.inc CreateWebSettings.inc CreateXlsx.inc EmbedDocument.inc EmbedDOCX.inc EmbedHTML.inc EmbedRTF.inc TransformDoc.inc
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 146 146 146 147 147 147 148 148 148 148 149 149 149 149 149 149 150 150 150 151
Method generateBLIP Method generateBLIPFILL Method generateCNVGRAPHICFRAMEPR Method generateCNVPICPR Method generateCNVPR Method generateDOCPR Method generateDRAWING Method generateEFFECTEXTENT Method generateEXT Method generateEXTENT Method generateFILLRECT Method generateGRAPHIC Method generateGRAPHICDATA Method generateGRAPHICPRAMELOCKS Method generateINLINE Method generateJC Method generateLINETO Method generateLN Method generateNOPROOF Method generateNVPICPR Method generateOFF Method generateP Method generatePIC Method generatePICT Method generatePOSITIONH Method generatePOSITIONV Method generatePOSOFFSET Method generatePPR Method generatePRSTDASH Method generatePRSTGEOM Method generatePSTYLE Method generateQUITAR Method generateR Method generateRFONTS Method generateRPR Method generateRSTYLE Method generateSCHEMECLR Method generateSIMPLEPOS Method generateSOLIDFILL Method generateSPPR Method generateSTART Method generateSTRETCH Method generateT Method generateWRAPNONE Method generateWRAPPOLYGON Method generateWRAPSQUARE Method generateWRAPTHROUGH Method generateWRAPTOPANDBOTTOM Method generateXFRM
151 151 151 152 152 152 153 153 153 154 154 154 155 155 155 156 156 156 157 157 157 157 158 158 158 159 159 159 159 160 160 161 161 161 161 162 162 162 163 163 163 163 164 164 164 164 165 165 165
Method __destruct Method __toString Class CreateEmbeddedElement Constructor __construct Constructor CreateEmbeddedElement Method getInstance Method __toString Class CreateEndnote Var $init Constructor __construct Method createDocumentEndnote Method createEndnote Method createInitEndnote Method generateENDNOTE Method generateENDNOTEREF Method generateENDNOTEREFERENCE Method generateP Method generatePPR Method generateR Method generateSEPARATOR Method generateSPACING Method getInstance Method __destruct Method __toString Class CreateExcelSharedStrings Constructor __construct Method createExcelSharedStrings Method generateSI Method generateSST Method generateT Method getInstance Method __destruct Method __toString Class CreateExcelSheet Constructor __construct Method createExcelSheet Method generateC Method generateCOL Method generateCOLS Method generateDIMENSION Method generatePAGEMARGINS Method generatePAGESETUP Method generateROW Method generateSELECTION Method generateSHEETDATA Method generateSHEETFORMATPR Method generateSHEETVIEW Method generateSHEETVIEWS Method generateTABLEPART
166 166 166 166 167 167 167 167 168 168 168 168 168 169 169 169 170 170 170 170 171 171 171 172 172 172 172 173 173 173 174 174 174 174 175 175 175 176 176 176 177 177 177 178 178 178 179 179 179
Method generateTABLEPARTS Method generateV Method generateWORKSHEET Method getInstance Method __destruct Method __toString Class CreateExcelTable Constructor __construct Method createExcelTable Method generateTABLE Method generateTABLECOLUMN Method generateTABLECOLUMNS Method generateTABLESTYLEINFO Method getInstance Method __destruct Method __toString Class CreateFontTable Var $_xml Constructor __construct Method createFont Method generateCHARSET Method generateFAMILY Method generateFONT Method generatePANOSE1 Method generatePITCH Method generateSIG Method getInstance Method __destruct Method __toString Class CreateFooter Constructor __construct Method createFooter Method generateFLDSIMPLE Method generateFTR Method generateP Method generatePTAB Method generateR Method getInstance Method __destruct Method __toString Class CreateFootnote Var $init Constructor __construct Method createDocumentFootnote Method createFootnote Method createInitFootnote Method generateFOOTNOTE Method generateFOOTNOTEREF Method generateFOOTNOTEREFERENCE
180 180 180 180 181 181 181 181 182 182 182 183 183 184 184 184 184 185 185 185 185 186 186 186 187 187 187 188 188 188 188 189 189 189 189 190 190 190 190 191 191 191 191 192 192 192 193 193 193
Method generateP Method generatePPR Method generateR Method generateSEPARATOR Method generateSPACING Method getInstance Method __destruct Method __toString Class CreateGraphic Class Constant NAMESPACEWORD Var $_xmlChart Constructor __construct Method createCHARTXML Method createDOCUEMNTXML Method createEmbeddedDocumentXml Method createEmbeddedGraphic Method createEmbeddedXmlChart Method createGraphic Method generateAUTO Method generateAUTOTITLEDELETED Method generateAXAXID Method generateAXID Method generateAXPOS Method generateBAR3DCHART Method generateBARCHART Method generateBARDIR Method generateBODYPR Method generateCAT Method generateCATAX Method generateCHART Method generateCHARTSPACE Method generateCROSSAX Method generateCROSSBETWEEN Method generateCROSSES Method generateDATE1904 Method generateDEFRPR Method generateDLBLS Method generateDOCUMENTCHART Method generateEXTERNALDATA Method generateF Method generateFIRSTSLICEANG Method generateFORMATCODE Method generateGROUPING Method generateIDX Method generateLANG Method generateLAYOUT Method generateLBLALGN Method generateLBLOFFSET Method generateLEGEND
194 194 194 194 195 195 195 196 196 196 196 196 197 197 197 198 198 198 198 199 199 199 200 200 200 201 201 201 201 202 202 202 202 203 203 203 204 204 204 204 205 205 205 206 206 206 207 207 207
Method generateLEGENDFONT Method generateLEGENDPOS Method generateLINE3DCHART Method generateLINECHART Method generateLN Method generateLSTSTYLE Method generateMAJORGRIDLINES Method generateNOFILL Method generateNUMCACHE Method generateNUMFMT Method generateNUMREF Method generateORDER Method generateORIENTATION Method generateOVERLAP Method generatePERSPECTIVE Method generatePIE3DCHART Method generatePIECHART Method generatePLOTAREA Method generatePLOTVISONLY Method generatePT Method generatePTCOUNT Method generateRFONTS Method generateRICH Method generateROTX Method generateROTY Method generateSCALING Method generateSER Method generateSHAPE Method generateSHOWPERCENT Method generateSPPR Method generateSTRCACHE Method generateSTRREF Method generateSTYLE Method generateTICKLBLPOS Method generateTITLE Method generateTITLELAYOUT Method generateTITLEP Method generateTITLEPPR Method generateTITLER Method generateTITLERFONTS Method generateTITLERPR Method generateTITLET Method generateTITLETX Method generateTX Method generateV Method generateVAL Method generateVALAX Method generateVARYCOLORS Method generateVIEW3D
208 208 208 208 209 209 209 209 210 210 210 210 211 211 211 212 212 212 212 213 213 213 214 214 214 215 215 215 215 216 216 216 216 217 217 217 218 218 218 218 219 219 219 219 220 220 220 220 221
Method getInstance Method getName Method getRId Method getXmlChart Method initGraphic Method setName Method setRId Method setXmlChart Method __destruct Method __toString Class CreateHeader Constructor __construct Method createHeader Method generateHDR Method generateP Method getInstance Method __destruct Method __toString Class CreateImage Class Constant CONSTWORD Class Constant NAMESPACEWORD Class Constant NAMESPACEWORD1 Class Constant NAMESPACEWORD2 Class Constant TAMBORDER Constructor __construct Method createEmbeddedImage Method createImage Method getInstance Method getName Method getRId Method initImage Method setName Method setRId Method __destruct Method __toString Class CreateLink Constructor __construct Method createEmbeddedLink Method createLink Method generateFLDCHAR Method generateHYPERLINK Method generateINSTRTEXT Method generatePROOFERR Method generateR Method generateRSTYLE Method getFont Method getInstance Method getLink Method getTitle
221 221 221 222 222 222 222 223 223 223 224 224 224 225 225 225 225 225 226 226 226 226 226 226 226 227 227 227 227 228 228 228 228 229 229 229 230 230 230 230 231 231 232 232 232 232 233 233 233
Method initLink Method __destruct Method __toString Class CreateList Class Constant MAXDEPTH Var $data Var $font Var $list Var $val Constructor __construct Method addList Method createEmbeddedList Method createList Method createListStyles Method generateILFO Method generateILVL Method generateIND Method generateLISTPR Method generateLVL Method generateLVLJC Method generateLVLTEXT Method generateNUMFMT Method generateNUMID Method generateNUMPR Method generatePPRS Method generatePSTYLE Method generateRFONTSTYLE Method generateRPRS Method generateSTART Method getInstance Method initList Method runArray Method runArrayEmbedded Method __destruct Method __toString Class CreateMacro Constructor __construct Method getInstance Method __destruct Method __toString Class CreateMath Constructor __construct Method createMath Method getInstance Method getMathXML Method setMathXML Method transformMath Method __destruct Method __toString
233 234 234 234 235 235 235 235 235 235 236 236 236 237 237 237 238 238 238 238 239 239 239 240 240 240 240 241 241 241 241 242 242 242 243 243 243 243 244 244 244 245 245 245 245 246 246 246 246
Class CreatePage Var $_xml Constructor __construct Method createPage Method createSection Method createSECTPR Method generateBR Method generateCOL Method generateCOLS Method generateDOCGRID Method generatePageBreak Method generatePGMAR Method generatePGSZ Method generateSECTIONSECTPR Method generateSECTPR Method generateTITLEPG Method getInstance Method __destruct Method __toString Class CreateProperties Class Constant NAMESPACECP Class Constant NAMESPACEDC Class Constant NAMESPACEVT Class Constant PROPERTYID Constructor CreateProperties Constructor __construct Method createPropertiesApp Method createPropertiesCustom Method generateCATEGORY Method generateCOMPANY Method generateCREATOR Method generateDESCRIPTION Method generateKEYWORDS Method generateLPWSTR Method generateMANAGER Method generatePROPERTY Method generateSUBJECT Method generateTITLE Method getInstance Method __destruct Method __toString Class CreateSettings Var $_xml Constructor __construct Method generateSettings Method getInstance Method __destruct Method __toString Class CreateShape
247 247 247 248 248 248 248 249 249 250 250 250 251 251 251 252 252 252 252 253 253 253 253 253 253 253 254 254 254 255 255 255 256 256 256 257 257 257 258 258 258 259 259 259 259 260 260 260 260
Class Constant NAMESPACEWORDSHAPES Constructor __construct Method createShape Method generateLINE Method getInstance Method __destruct Method __toString Class CreateStyle Var $_xml Constructor __construct Method addStyle Method addStyleTabla Method createStyle Method generateAUTOREDEFINE Method generateB Method generateBASEDON Method generateBCS Method generateBOTTOM Method generateCOLOR Method generateCONTEXTUALSPACING Method generateI Method generateICS Method generateILVL Method generateIND Method generateKEEPLINES Method generateKEEPNEXT Method generateKERN Method generateLEFT Method generateLINK Method generateNAME Method generateNEXT Method generateNUMPR Method generateOUTLINELVL Method generatePBDR Method generatePBDR_BOTTOM Method generatePPR Method generateQFORMAT Method generateRFONTS Method generateRFONTS2 Method generateRIGHT Method generateRPR Method generateRPR_SPACING Method generateRSID Method generateSEMIHIDDEN Method generateSHD Method generateSPACING Method generateSTYLE Method generateSZ Method generateSZCS
261 261 261 261 262 262 262 262 263 263 263 263 264 264 264 265 265 265 266 266 266 266 267 267 267 268 268 268 269 269 269 270 270 270 270 271 271 271 272 272 272 273 273 273 273 274 274 275 275
Method generateTABCENTER Method generateTABRIGHT Method generateTABS Method generateTBLBORDERS Method generateTBLBORDERS_BOTTOM Method generateTBLBORDERS_INSIDEH Method generateTBLBORDERS_INSIDEV Method generateTBLBORDERS_LEFT Method generateTBLBORDERS_RIGHT Method generateTBLBORDERS_TOP Method generateTBLCELLMAR Method generateTBLIND Method generateTBLPR Method generateTBLSTYLECOLBANDSIZE Method generateTBLSTYLEROWBANDSIZE Method generateTCPR Method generateTOP Method generateU Method generateUIPRIORITY Method generateUNHIDEWHENUSED Method generateVERTALIGN Method getInstance Method __destruct Method __toString Class CreateStyleTable Var $_xml Constructor __construct Method addStyleTable Method generateSHD Method generateTBLPR Method generateTBLSTYLEPR Method generateTCBORDERS Method generateTCPR Method getInstance Method __destruct Method __toString Class CreateTable Constructor __construct Method addList Method createTable Method generateGRIDCOLS Method generateHMERGE Method generateJC Method generateP Method generateSHD Method generateTBL Method generateTBLBORDERS Method generateTBLBOTTOM Method generateTBLCELLSPACING
275 276 276 276 277 277 277 278 278 279 279 279 280 280 280 281 281 281 282 282 282 283 283 283 283 284 284 284 284 285 285 285 285 286 286 286 286 287 287 287 288 288 288 289 289 289 289 290 290
Method generateTBLGRID Method generateTBLINSIDEH Method generateTBLINSIDEV Method generateTBLLEFT Method generateTBLLOOK Method generateTBLOVERLAP Method generateTBLPR Method generateTBLRIGHT Method generateTBLSTYLE Method generateTBLTOP Method generateTBLW Method generateTC Method generateTCPR Method generateTCW Method generateTR Method generateTRHEIGHT Method generateTRPR Method generateVMERGE Method getInstance Method __destruct Method __toString Class CreateTableContents Var $_xml Constructor __construct Method createTableContents Method generateFLDSIMPLE Method getInstance Method __destruct Method __toString Class CreateTemplate Var $embedFiles Var $path Var $placeholderImages Var $ridInitTemplateCharts Var $totalTemplateCharts Constructor __construct Method addContentTypes Method addRelationship Method deleteAllBlocks Method deleteBlock Method getBlnTemplate Method getContentTypes Method getDocument Method getFooter Method getHeader Method getInstance Method getRelsDocumentXMLRels Method getTemplateSymbol Method mergeFiles
290 291 291 292 292 292 293 293 293 294 294 294 295 295 295 295 296 296 296 296 297 297 297 297 298 298 298 299 299 299 299 300 300 300 300 301 301 301 301 302 302 302 302 303 303 303 303 304 304
Method openTemplate Method parseBlock Method replaceChart Method replaceCheckbox Method replaceImage Method replaceImages Method replaceVariable Method replaceVariableChart Method returnVariables Method setTemplateSymbol Method __destruct Class CreateText Class Constant IDTITLE Constructor __construct Method createEmbeddedText Method createText Method createTitle Method generateBOOKMARKEND Method generateBOOKMARKSTART Method generateCOLOR Method generateI Method generateJC Method generatePAGEBREAKBEFORE Method generatePPR Method generatePSTYLE Method generateSPACING Method generateSZ Method generateT Method generateTABS Method generateU Method generateWIDOWCONTROL Method generateWORDWRAP Method getInstance Method initText Method __destruct Method __toString Class CreateTextBox Class Constant NAMESPACEWORD Constructor __construct Method addText Method createEmbeddedTextBox Method createTextBox Method generatePATH Method generateSHAPE Method generateSHAPETYPE Method generateSTROKE Method generateTEXTBOX Method generateTXBXCONTENT Method generateWRAP
304 305 305 305 306 306 306 307 307 307 308 308 308 309 309 309 309 310 310 311 311 311 312 312 312 312 313 313 314 314 314 314 315 315 315 316 316 316 316 316 317 317 317 318 318 319 319 319 319
Method getInstance Method initTextBox Method __destruct Method __toString Class CreateTheme1 Class Constant NAMESPACEWORD Var $_xml Constructor __construct Method createTheme Method generateACCENT1 Method generateACCENT2 Method generateACCENT3 Method generateACCENT4 Method generateACCENT5 Method generateACCENT6 Method generateALPHA Method generateBEVELT Method generateBGFILLSTYLELST Method generateCAMERA Method generateCLRSCHEME Method generateCS Method generateDK1 Method generateDK2 Method generateEA Method generateEFFECTLST Method generateEFFECTLST2 Method generateEFFECTSTYLE Method generateEFFECTSTYLE2 Method generateEFFECTSTYLELST Method generateEXTRACLRSCHEMELST Method generateFILLSTYLELST Method generateFILLTORECT Method generateFMTSCHEME Method generateFOLHLINK Method generateFONT Method generateFONT2 Method generateFONT3 Method generateFONTSCHEMA Method generateGRADFILL Method generateGRADFILL2 Method generateGS Method generateGS2 Method generateGSLST Method generateHLINK Method generateLATIN Method generateLIGHTRIG Method generateLIN Method generateLN Method generateLN2
320 320 320 321 321 321 321 321 322 322 322 322 323 323 323 323 324 324 324 325 325 325 325 326 326 326 326 327 327 327 327 328 328 328 328 329 329 330 330 330 331 331 331 331 332 332 332 333 333
Method generateLNSTYLELST Method generateLT1 Method generateLT2 Method generateMAYORFONT Method generateMINORFONT Method generateOBJECTDEFAULTS Method generateOUTERSHDW Method generatePATH Method generatePRSTDASH Method generateROT Method generateSATMOD Method generateSCENE3D Method generateSCHEMECLR Method generateSCHEMECLR2 Method generateSCHEMECLR3 Method generateSHADE Method generateSOLIDFILL Method generateSP3D Method generateSRGBCLR Method generateSRGBCLR2 Method generateSYSCLR Method generateTHEMEELEMENTS Method generateTINT Method generateTINT2 Method getInstance Method __destruct Method __toString Class CreateWebSettings Var $_xml Constructor __construct Method generateWebSettings Method getInstance Method __destruct Method __toString Class CreateXlsx Constructor __construct Method addSharedStrings Method addSheet Method addTable Method createXlsx Method getInstance Method __destruct Method __toString Class EmbedDocument Method embed Method generateALTCHUNK Method getId Class EmbedDOCX Var $_xml
334 334 334 334 334 335 335 335 336 336 336 337 337 337 337 338 338 338 339 339 339 340 340 340 341 341 341 341 342 342 342 342 342 343 343 343 344 344 344 345 345 345 345 345 346 346 346 347 347
Constructor __construct Method embed Method generateALTCHUNK Method getId Method getInstance Method __destruct Method __toString Class EmbedHTML Var $_xml Constructor __construct Method embed Method generateALTCHUNK Method getId Method getInstance Method __destruct Method __toString Class EmbedRTF Var $_xml Constructor __construct Method embed Method generateALTCHUNK Method getId Method getInstance Method __destruct Method __toString Class TransformDoc Class Constant SCHEMA_IMAGEDOCUMENT Class Constant SCHEMA_OFFICEDOCUMENT Constructor __construct Method absoluteZipPath Method cleanXHTML Method generatePDF Method generateXHTML Method getFileName Method getstrFile Method getStrOutputFile Method getStrXHTML Method setstrFile Method setStrOutputFile Method setStrXHTML Method validatorXHTML Method __destruct
347 347 348 348 348 348 348 349 349 349 349 350 350 350 350 351 351 351 351 352 352 352 352 353 353 353 353 354 354 354 354 354 355 355 355 355 355 356 356 356 357 357 359 359 360 360 360 362
GenerateDocx.inc
362 363 363 363 365 365 366 366 366 366 369 369 370 370 370 370 371 371 371 371 372 372 374 374 375 375 375 375 376 376 376 376 377 377 377 377 378 379 380 380 381 381 381 382 382 382
Appendices
Appendix A - Class Trees elements factory license debug create loader parser
transform
382
Page 1 of 382
CreateDocument.inc
Abstract class used for creating documents
Package create Version 2.2 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 2.2 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Page 2 of 382
CreateDocx.inc
Generate a DOCX file
Package create Version 05.26.2011 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Page 3 of 382
Class CreateDocument
[line 28]
Package create Version 2.2 Copyright Copyright (c) 2009-2011 Narcea ProduCiones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Abstract Element Since Class available since Release 2.2 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Class CreateDocx
[line 33]
Package create Version 05.26.2011 Copyright Copyright (c) 2009-2011 Narcea ProduCiones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com
Page 4 of 382
CreateDocx::NAMESPACEWORD = 'w' [line 35] CreateDocx::SCHEMA_IMAGEDOCUMENT = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image' [line 36] CreateDocx::SCHEMA_OFFICEDOCUMENT = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument' [line 38] CreateDocx::$fileGraphicTemplate array = [line 46]
Access public
Access public
CreateDocx::$log
Page 5 of 382
Construct
Access public
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 <?php /** * Create a DOCX file. Report example * * @category Phpdocx * @package examples * @subpackage advanced * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); // browser stats $statsFeb2009Feb2010 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>58</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME>
Page 6 of 382
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
<VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>3</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; $statsFeb2010Feb2011 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>50</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>11</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; // add text and date in header $header = 'Browsers stats'; $paramsHeader = array( 'jc' => 'right', 'textWrap' => 5, ); $date = getdate(); $docx-> addHeader($header . ' ' . $date['mon'] . '/' . $date['mday'] . '/' . $date['year'], $paramsHeader); // add footer with pager $footer = 'DOCX generated using PHPDOCX PRO.'; $paramsFooter = array( 'pager' => 'true', 'pagerAlignment' => ); $docx->
'center',
addFooter($footer, $paramsFooter);
// add chart title $title = 'Browsers stats chart'; $paramsTitle = array( 'val' => 1, 'b' => 'single', 'sz' => 22 ); $docx-> addTitle($title, $paramsTitle);
Page 7 of 382
113 // add line break 114 $docx-> addBreak('line'); 115 $docx-> addBreak('line'); 116 $docx-> addBreak('line'); 117 118 // read XML Feb209Feb2010 119 $xmlFeb2009Feb2010 = new DOMDocument(); 120 $xmlFeb2009Feb2010-> loadXML($statsFeb2009Feb2010); 121 122 // read XML Feb2010Feb2011 123 $xmlFeb2010Feb2011 = new DOMDocument(); 124 $xmlFeb2010Feb2011-> loadXML($statsFeb2010Feb2011); 125 126 // read stats and create charts 127 $legendsAndValues = array(); 128 129 for ($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" $i++) { 130 $legendsAndValues[$xmlFeb2009Feb2010-> getElementsByTagName("NAME" > nodeValue] = array( 131 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> 132 ); 133 } 134 135 $chart = array( 136 'data' => $legendsAndValues, 137 'type' => 'pie3DChart', 138 'title' => 'Feb 2009 - Feb 2010', 139 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 140 'color' => 2, 141 'textWrap' => 0, 142 'sizeX' => 14, 'sizeY' => 8, 143 'jc' => 'center', 144 'showPercent' => 1, 145 ); 146 147 $docx-> addGraphic($chart); 148 149 // add line break 150 $docx-> addBreak('line'); 151 $docx-> addBreak('line'); 152 153 $legendsAndValues = array(); 154 155 for($i = 0; $i < $xmlFeb2010Feb2011-> getElementsByTagName("NAME" { 156 $legendsAndValues[$xmlFeb2010Feb2011-> getElementsByTagName("NAME" > nodeValue] = array( 157 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> 158 ); 159 } 160 161 $chart['data'] = $legendsAndValues; 162 $chart['title'] = 'Feb 2010 - Feb 2011'; 163 164 $docx-> addGraphic($chart); 165 166 // add page break 167 $docx-> addBreak('page'); 168 169 // add table title 170 $title = 'Browsers stats table'; 171 172 $paramsTitle = array( 173 'val' => 1, 174 'b' => 'single', 175 'sz' => 22 176 ); 177 178 $docx-> addTitle($title, $paramsTitle); 179 180 // add line break 181 $docx-> addBreak('line'); 182 $docx-> addBreak('line'); 183 $docx-> addBreak('line'); 184 185 // read stats and create table 186 $table = array(); 187 188 $table[] = array(
length; item($i)nodeValue
Page 8 of 382
189 '', 190 'Feb 2009 - Feb 2010', 191 'Feb 2010 - Feb 2011', 192 ); 193 194 195 for($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" )-> length; $i++) { 196 $paramsHeaderTextTable[0] = array( 197 'text' => $xmlFeb2009Feb2010-> getElementsByTagName("NAME" )-> item($i)> nodeValue, 198 'b' => 'single', 199 'sz' => 14 200 ); 201 202 $table[] = array( 203 $docx-> addElement('addText', $paramsHeaderTextTable), 204 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> item($i)-> nodeValue, 205 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> item($i)-> nodeValue 206 ); 207 } 208 209 $paramsTable = array( 210 'border' => 'single', 211 'border_sz' => 2, 212 'jc' => 'center', 213 'size_col' => 2800 214 ); 215 216 $docx-> addTable($table, $paramsTable); 217 218 // add page break 219 $docx-> addBreak('page'); 220 221 // add text 222 $textInfo = 'Stats are based on aggregate data collected by StatCounter on a' 223 . ' sample exceeding 15 billion pageviews per month collected from across' 224 . ' the StatCounter network of more than 3 million websites. Stats are ' 225 . ' updated and made available every 4 hours, however are subject to ' 226 . 'quality assurance testing and revision for 7 days from publication.'; 227 228 $paramsTextInfo = array( 229 'val' => 1, 230 'i' => 'single', 231 'sz' => 8 232 ); 233 234 $docx-> addText($textInfo, $paramsTextInfo); 235 236 // add link 237 $docx-> addLink('Source: StatCounter', 'http://gs.statcounter.com'); 238 239 // generate DOCX file 240 $docx-> createDocx('example_report');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 <?php /** * Create a DOCX file. User customized document * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $users = array( 0 => array( 'name' 'value1' 'value2' 'value3' => => => => 'Don Mattingly', '0.2', '0.4', '0.6',
Page 9 of 382
), 'name' 'value1' 'value2' 'value3' ), 2 => array( 'name' 'value1' 'value2' 'value3' ) 1 => array( ); foreach ($users as $user) { $docx = new CreateDocx(); $paramsTitle = array( 'val' => 1, 'u' => 'single', ); $docx-> $docx->
'Brian Sipe', '0.3', '0.3', '0.4', 'Julius Erving', '0.1', '0.2', '0.7',
'Hi, ',
$text[] = array( 'text' => $user['name'], 'b' => 'single', ); $text[] = array( 'text' => ' lorem ipsum dolor sit amet, consectetur' . 'adipiscing elit. Pellentesque egestas gravida tincidunt. ' . 'Nunc ante enim, auctor at elementum porttitor, pharetra a' . ' erat. Vivamus semper orci nec neque faucibus a varius ' . 'libero ultrices. Mauris viverra, nisl sed ullamcorper.', ); $docx-> $docx-> $docx-> addText($text); addBreak('line'); addText('Lorem ipsum dolor sit amet, consectetur: ');
3, 1, 2)
$valuesList = array( 'Donec tellus justo', array( 'faucibus nec commodo quis', 'dignissim ut ipsum', 'Aenean hendrerit interdum', array( 'Morbi malesuada luctus libero', 'sodales est placerat eget', 'Aenean eget nulla vel' ), ), 'enim viverra iaculis', 'aliquet aliquam nisl', ); $docx-> addList($valuesList, $paramsList); $docx-> addBreak('page');
$legends = array(
Page 10 of 382
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
'0' => array( 'sequence 1', 'sequence 2', 'sequence 3'), 'legend1' => array( $user['value1']), 'legend2' => array( $user['value2']), 'legend3' => array( $user['value3']) ); $args = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => $user['name'] . '\'s chart', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'left', 'showPercent' => 1, 'font' => 'Times New Roman' ); $docx-> addGraphic($args); $docx-> }
30,
createDocx('example_multidocument_' . $user['name']);
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 <?php /** * Create a DOCX file. Footer Paginator example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once('../../classes/CreateDocx.inc'); $docx = new CreateDocx(); $docx-> $docx-> $docx-> $docx-> $docx-> addText('Page 1 Content'); addBreak('page'); addText('Page 2 Content'); addBreak('page'); addText('Page 3 Content');
$paramsFooter = array( 'font' => 'Arial', 'pager' => 'true', 'pagerAlignment' => ); $docx-> $docx->
'right'
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 <?php /** * Create a DOCX file. Footnotes in different objects * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2
Page 11 of 382
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
*/ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua:'; $paramsText = array( 'font' => 'Arial' ); $docx-> addText($text, $paramsText);
$legends = array( 'legend1' => array( 24), 'legend2' => array( 45), 'legend3' => array( 31) ); $args = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => 'Title first chart', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'left', 'showPercent' => 1, 'font' => 'Times New Roman', 'border' => 1 ); $docx-> addGraphic($args); $docx-> addFootnote( array( 'textDocument' => 'textEndNote' => ) ); $docx-> addBreak('line');
30,
'Lorem ipsum dolor sit amet', 'Curabitur id dui purus, sit amet blandit lacus. ' . 'Vivamus mollis magna et risus molestie blandit. ' . 'Phasellus vel tortor quis metus consectetur.'
$text = 'Cras eget porttitor sapien. Aenean tristique, nibh quis egestas ' . 'varius, erat neque sodales neque, quis bibendum sem lorem accumsan ' . 'mauris. Aliquam justo justo, vulputate sed condimentum non, pharetra:'; $paramsText = array( 'font' => 'Arial' ); $docx-> addText($text, $paramsText);
$paramsImg = array( 'name' => '../files/img/image.png', 'scaling' => 75, 'textWrap' => 0, 'border' => 1, ); $docx-> addImage($paramsImg);
'Aenean non gravida sapien', 'Nunc pretium bibendum dui id laoreet. Nunc ' . 'venenatis. Duis quis lorem vel dui tincidunt ' . 'pellentesque quis sed diam.'
createDocx('example_chart_footnotes');
example
1 2 <?php
Page 12 of 382
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
/** * Create a DOCX file. Page break example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut ' . 'enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut' . 'aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit ' . 'in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ' . 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui ' . 'officia deserunt mollit anim id est laborum.'; $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> addText($text); addBreak('line'); addText($text); addBreak('line'); addBreak('line'); addText($text); addBreak('page'); addText($text); createDocx('example_pagebreak');
Function Parameters:
Add a break
example
Page 13 of 382
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
<?php /** * Create a DOCX file. Add HTML code in a DOCX file * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. // * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 05.24.2011 * @link http://www.phpdocx.com * @since File available since Release 2.3 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $docx-> $docx-> $docx-> $docx-> addText('DOCX content'); addDOCX('../files/Text.docx'); addText('End DOCX content'); createDocx('example_docx');
Function Parameters:
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 <?php /** * Create a DOCX file. Table styled * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $frameworks = array(
Page 14 of 382
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
array('name' => 'Code Igniter', 'ajax' => 'Prototype/script.aculo.us, jQuery/jQuery UI', 'mvc' => 'Modified active record pattern', 'orm' => 'No', 'security' => 'Yes' ), array('name' => 'Drupal', 'ajax' => 'jQuery/jQuery UI, more', 'mvc' => 'No', 'orm' => 'Optional module', 'security' => 'Yes' ), array('name' => 'eZ Components', 'ajax' => 'No', 'mvc' => 'Yes', 'orm' => 'Yes', 'security' => 'Yes' ), array('name' => 'Symfony', 'ajax' => 'Prototype, script.aculo.us, Unobtrusive Ajax ' . 'with UJS and PJS plugins', 'mvc' => 'Push', 'orm' => 'Yes', 'security' => 'Plugin' ), array('name' => 'Zend Framework', 'ajax' => 'Toolkit-independent', 'mvc' => 'Push and Pull', 'orm' => 'Yes', 'security' => 'ACL-based' ) ); $headerStyle[0] = array( 'b' => 'single', 'font' => 'Arial', ); $table[] = array( '', 'Ajax', 'MVC framework', 'ORM', 'Security Framework(s)' ); foreach ($frameworks as $framework) { $headerStyle[0]['text'] = $framework['name']; $table[] = array( $docx-> addElement('addText', $headerStyle), $framework['ajax'], $framework['mvc'], $framework['orm'], $framework['security'] ); } $paramsTable = array( 'TBLLOOKval' => 'ffff01E0', 'TBLSTYLEval' => 'Tablanormal', 'TBLWtype' => 'center', 'TBLWw' => '50', 'border' => 'single', 'border_sz' => 20, 'border_spacing' => 0, 'border_color' => '000000', 'jc' => 'center', 'size_col' => 2800 ); $docx-> $docx-> addTable($table, $paramsTable); createDocx('example_table_styled');
example
1 2 3 <?php /**
Page 15 of 382
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
* Create a DOCX file. List with image, list, chart and textbox * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $paramsLink = array( 'title' => 'Link to Google', 'link' => 'http://www.google.es' ); $link = $docx-> addElement('addLink', $paramsLink);
$paramsImage = array( 'name' => '../files/img/image.png' ); $image = $docx-> addElement('addImage', $paramsImage); 10, 11, 12), 0, 1, 2), 40, 41, 42)
$legends = array( 'legend1' => array( 'legend2' => array( 'legend3' => array( );
$paramsChart = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => 'Title' ); $chart = $docx-> addElement('addGraphic', $paramsChart); $paramsText = array( 'b' => 'single' ); $paramsBox = array( 'jc' => 'square' ); $paramsTextBox = array( array( 'text' => 'Lorem ipsum dolor sit amet, consectetur adipisicing ' . 'elit, sed do eiusmod tempor incididunt ut labore et ' . 'dolore magna aliqua. Ut enim ad minim veniam, quis ' . 'nostrud exercitation ullamco laboris nisi ut aliquip ' . 'ex ea commodo consequat. Duis aute irure dolor in ' . 'reprehenderit in voluptate velit esse cillum dolore ' . 'eu fugiat nulla pariatur. Excepteur sint occaecat ' . 'cupidatat non proident, sunt in culpa qui officia ' . 'deserunt mollit anim id est laborum.', 'args' => $paramsText ), $paramsBox ); $textBox = $docx-> $valuesList = array( 'Line 1', $link, $image, $chart, 'Line 2', 'Line 3', $textBox, ); $paramsList = array( 'val' => 1 addElement('addTextBox', $paramsTextBox);
Page 16 of 382
84 85 86 87
); $docx-> $docx->
Function Parameters:
string $type Element type. Values: 'addImage', 'addGraphic', 'addLink', 'addTextBox', 'addText' array $parrams Set of parameters. Values: same as elements $params
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 <?php /** * Create a DOCX file. Endnote and footnote example * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once('../../classes/CreateDocx.inc'); $docx = new CreateDocx(); $docx-> addEndnote( array( 'textDocument' => 'textEndNote' => ) ); $docx-> addFootnote( array( 'textDocument' => 'textEndNote' => ) ); $docx->
createDocx('example_endnote_footnote');
example
1 <?php
Page 17 of 382
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
/** * Create a DOCX file. Enodnote example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $docx-> addEndnote( array( 'textDocument' => 'Lorem ipsum dolor sit amet', 'textEndNote' => 'endnote', 'font' => 'Arial' ) ); $docx-> createDocx('example_endnote');
Function Parameters:
string $paramsEndnote Parameters of endnote. Optional, default empty. Values: 'font', 'textDocument', 'textEndNote'
Add an endnote
Access public
Page 18 of 382
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 <?php /** * Create a DOCX file. Report example * * @category Phpdocx * @package examples * @subpackage advanced * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); // browser stats $statsFeb2009Feb2010 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>58</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>3</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; $statsFeb2010Feb2011 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>50</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>11</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE>
Page 19 of 382
71 </BROWSER> 72 <BROWSER> 73 <NAME>Other</NAME> 74 <VALUE>2</VALUE> 75 </BROWSER> 76 </STATS> 77 '; 78 79 // add text and date in header 80 $header = 'Browsers stats'; 81 82 $paramsHeader = array( 83 'jc' => 'right', 84 'textWrap' => 5, 85 ); 86 87 $date = getdate(); 88 89 $docx-> addHeader($header . ' ' . $date['mon'] . '/' . $date['mday'] . '/' 90 . $date['year'], $paramsHeader); 91 92 // add footer with pager 93 $footer = 'DOCX generated using PHPDOCX PRO.'; 94 95 $paramsFooter = array( 96 'pager' => 'true', 97 'pagerAlignment' => 'center', 98 ); 99 100 $docx-> addFooter($footer, $paramsFooter); 101 102 // add chart title 103 $title = 'Browsers stats chart'; 104 105 $paramsTitle = array( 106 'val' => 1, 107 'b' => 'single', 108 'sz' => 22 109 ); 110 111 $docx-> addTitle($title, $paramsTitle); 112 113 // add line break 114 $docx-> addBreak('line'); 115 $docx-> addBreak('line'); 116 $docx-> addBreak('line'); 117 118 // read XML Feb209Feb2010 119 $xmlFeb2009Feb2010 = new DOMDocument(); 120 $xmlFeb2009Feb2010-> loadXML($statsFeb2009Feb2010); 121 122 // read XML Feb2010Feb2011 123 $xmlFeb2010Feb2011 = new DOMDocument(); 124 $xmlFeb2010Feb2011-> loadXML($statsFeb2010Feb2011); 125 126 // read stats and create charts 127 $legendsAndValues = array(); 128 129 for ($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" )-> $i++) { 130 $legendsAndValues[$xmlFeb2009Feb2010-> getElementsByTagName("NAME" )-> > nodeValue] = array( 131 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> item($i)-> 132 ); 133 } 134 135 $chart = array( 136 'data' => $legendsAndValues, 137 'type' => 'pie3DChart', 138 'title' => 'Feb 2009 - Feb 2010', 139 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 140 'color' => 2, 141 'textWrap' => 0, 142 'sizeX' => 14, 'sizeY' => 8, 143 'jc' => 'center', 144 'showPercent' => 1, 145 ); 146 147 $docx-> addGraphic($chart); 148
length; item($i)nodeValue
Page 20 of 382
149 // add line break 150 $docx-> addBreak('line'); 151 $docx-> addBreak('line'); 152 153 $legendsAndValues = array(); 154 155 for($i = 0; $i < $xmlFeb2010Feb2011-> getElementsByTagName("NAME" { 156 $legendsAndValues[$xmlFeb2010Feb2011-> getElementsByTagName("NAME" > nodeValue] = array( 157 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> 158 ); 159 } 160 161 $chart['data'] = $legendsAndValues; 162 $chart['title'] = 'Feb 2010 - Feb 2011'; 163 164 $docx-> addGraphic($chart); 165 166 // add page break 167 $docx-> addBreak('page'); 168 169 // add table title 170 $title = 'Browsers stats table'; 171 172 $paramsTitle = array( 173 'val' => 1, 174 'b' => 'single', 175 'sz' => 22 176 ); 177 178 $docx-> addTitle($title, $paramsTitle); 179 180 // add line break 181 $docx-> addBreak('line'); 182 $docx-> addBreak('line'); 183 $docx-> addBreak('line'); 184 185 // read stats and create table 186 $table = array(); 187 188 $table[] = array( 189 '', 190 'Feb 2009 - Feb 2010', 191 'Feb 2010 - Feb 2011', 192 ); 193 194 195 for($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" { 196 $paramsHeaderTextTable[0] = array( 197 'text' => $xmlFeb2009Feb2010-> getElementsByTagName("NAME" > nodeValue, 198 'b' => 'single', 199 'sz' => 14 200 ); 201 202 $table[] = array( 203 $docx-> addElement('addText', $paramsHeaderTextTable), 204 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> 205 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> 206 ); 207 } 208 209 $paramsTable = array( 210 'border' => 'single', 211 'border_sz' => 2, 212 'jc' => 'center', 213 'size_col' => 2800 214 ); 215 216 $docx-> addTable($table, $paramsTable); 217 218 // add page break 219 $docx-> addBreak('page'); 220 221 // add text 222 $textInfo = 'Stats are based on aggregate data collected by StatCounter on 223 . ' sample exceeding 15 billion pageviews per month collected from across' 224 . ' the StatCounter network of more than 3 million websites. Stats are '
)-> )->
item($i)-> item($i)->
nodeValue, nodeValue
a'
Page 21 of 382
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
. ' updated and made available every 4 hours, however are subject to ' . 'quality assurance testing and revision for 7 days from publication.'; $paramsTextInfo = array( 'val' => 1, 'i' => 'single', 'sz' => 8 ); $docx-> addText($textInfo, $paramsTextInfo);
// add link $docx-> addLink('Source: StatCounter', 'http://gs.statcounter.com'); // generate DOCX file $docx-> createDocx('example_report');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 <?php /** * Create a DOCX file. Footer Paginator example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once('../../classes/CreateDocx.inc'); $docx = new CreateDocx(); $docx-> $docx-> $docx-> $docx-> $docx-> addText('Page 1 Content'); addBreak('page'); addText('Page 2 Content'); addBreak('page'); addText('Page 3 Content');
$paramsFooter = array( 'font' => 'Arial', 'pager' => 'true', 'pagerAlignment' => ); $docx-> $docx->
'right'
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 <?php /** * Create a DOCX file. Header and footer with font styles * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $paramsHeader = array(
Page 22 of 382
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
'name' => '../files/img/image.png', 'jc' => 'right', 'textWrap' => 5, 'font' => 'Arial' ); $docx-> addHeader('Header Arial', $paramsHeader);
$paramsHeader = array( 'font' => 'Times New Roman' ); $docx-> addHeader('Header Times New Roman', $paramsHeader);
$paramsFooter = array( 'pager' => 'true', 'pagerAlignment' => 'font' => 'Arial' ); $docx->
'center',
$paramsFooter = array( 'font' => 'Times New Roman' ); $docx-> $docx-> addFooter('Footer Times New Roman', $paramsFooter); createDocx('example_header_and_footer');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 <?php /** * Create a DOCX file. Footer example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $paramsFooter = array( 'font' => 'Times New Roman' ); $docx-> $docx-> addFooter('Footer. Times New Roman font', $paramsFooter); createDocx('example_footer');
Function Parameters:
string $dat Text to add array $paramsFooter Parameters of footer Values: 'name', 'pager' (true, false), 'pagerAlignment' (left, right, false)
Add a footer
Page 23 of 382
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 <?php /** * Create a DOCX file. Endnote and footnote example * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once('../../classes/CreateDocx.inc'); $docx = new CreateDocx(); $docx-> addEndnote( array( 'textDocument' => 'textEndNote' => ) ); $docx-> addFootnote( array( 'textDocument' => 'textEndNote' => ) ); $docx->
createDocx('example_endnote_footnote');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 <?php /** * Create a DOCX file. Footnotes in different objects * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua:'; $paramsText = array( 'font' => 'Arial' );
Page 24 of 382
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
$docx->
addText($text, $paramsText);
$legends = array( 'legend1' => array( 24), 'legend2' => array( 45), 'legend3' => array( 31) ); $args = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => 'Title first chart', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'left', 'showPercent' => 1, 'font' => 'Times New Roman', 'border' => 1 ); $docx-> addGraphic($args); $docx-> addFootnote( array( 'textDocument' => 'textEndNote' => ) ); $docx-> addBreak('line');
30,
'Lorem ipsum dolor sit amet', 'Curabitur id dui purus, sit amet blandit lacus. ' . 'Vivamus mollis magna et risus molestie blandit. ' . 'Phasellus vel tortor quis metus consectetur.'
$text = 'Cras eget porttitor sapien. Aenean tristique, nibh quis egestas ' . 'varius, erat neque sodales neque, quis bibendum sem lorem accumsan ' . 'mauris. Aliquam justo justo, vulputate sed condimentum non, pharetra:'; $paramsText = array( 'font' => 'Arial' ); $docx-> addText($text, $paramsText);
$paramsImg = array( 'name' => '../files/img/image.png', 'scaling' => 75, 'textWrap' => 0, 'border' => 1, ); $docx-> addImage($paramsImg);
'Aenean non gravida sapien', 'Nunc pretium bibendum dui id laoreet. Nunc ' . 'venenatis. Duis quis lorem vel dui tincidunt ' . 'pellentesque quis sed diam.'
createDocx('example_chart_footnotes');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 <?php /** * Create a DOCX file. Footnote example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com
Page 25 of 382
14 15 16 17 18 19 20 21 22 23 24 25 26 27
* @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $docx-> addFootnote( array( 'textDocument' => 'textEndNote' => ) ); $docx->
createDocx('example_footnote');
Function Parameters:
Add a footnote
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 <?php /** * Create a DOCX file. Report example * * @category Phpdocx * @package examples * @subpackage advanced * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); // browser stats $statsFeb2009Feb2010 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>58</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER>
Page 26 of 382
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
<BROWSER> <NAME>Chrome</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>3</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; $statsFeb2010Feb2011 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>50</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>11</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; // add text and date in header $header = 'Browsers stats'; $paramsHeader = array( 'jc' => 'right', 'textWrap' => 5, ); $date = getdate(); $docx-> addHeader($header . ' ' . $date['mon'] . '/' . $date['mday'] . '/' . $date['year'], $paramsHeader); // add footer with pager $footer = 'DOCX generated using PHPDOCX PRO.'; $paramsFooter = array( 'pager' => 'true', 'pagerAlignment' => ); $docx->
'center',
addFooter($footer, $paramsFooter);
// add chart title $title = 'Browsers stats chart'; $paramsTitle = array( 'val' => 1, 'b' => 'single', 'sz' => 22 );
Page 27 of 382
111 $docx-> addTitle($title, $paramsTitle); 112 113 // add line break 114 $docx-> addBreak('line'); 115 $docx-> addBreak('line'); 116 $docx-> addBreak('line'); 117 118 // read XML Feb209Feb2010 119 $xmlFeb2009Feb2010 = new DOMDocument(); 120 $xmlFeb2009Feb2010-> loadXML($statsFeb2009Feb2010); 121 122 // read XML Feb2010Feb2011 123 $xmlFeb2010Feb2011 = new DOMDocument(); 124 $xmlFeb2010Feb2011-> loadXML($statsFeb2010Feb2011); 125 126 // read stats and create charts 127 $legendsAndValues = array(); 128 129 for ($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" $i++) { 130 $legendsAndValues[$xmlFeb2009Feb2010-> getElementsByTagName("NAME" > nodeValue] = array( 131 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> 132 ); 133 } 134 135 $chart = array( 136 'data' => $legendsAndValues, 137 'type' => 'pie3DChart', 138 'title' => 'Feb 2009 - Feb 2010', 139 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 140 'color' => 2, 141 'textWrap' => 0, 142 'sizeX' => 14, 'sizeY' => 8, 143 'jc' => 'center', 144 'showPercent' => 1, 145 ); 146 147 $docx-> addGraphic($chart); 148 149 // add line break 150 $docx-> addBreak('line'); 151 $docx-> addBreak('line'); 152 153 $legendsAndValues = array(); 154 155 for($i = 0; $i < $xmlFeb2010Feb2011-> getElementsByTagName("NAME" { 156 $legendsAndValues[$xmlFeb2010Feb2011-> getElementsByTagName("NAME" > nodeValue] = array( 157 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> 158 ); 159 } 160 161 $chart['data'] = $legendsAndValues; 162 $chart['title'] = 'Feb 2010 - Feb 2011'; 163 164 $docx-> addGraphic($chart); 165 166 // add page break 167 $docx-> addBreak('page'); 168 169 // add table title 170 $title = 'Browsers stats table'; 171 172 $paramsTitle = array( 173 'val' => 1, 174 'b' => 'single', 175 'sz' => 22 176 ); 177 178 $docx-> addTitle($title, $paramsTitle); 179 180 // add line break 181 $docx-> addBreak('line'); 182 $docx-> addBreak('line'); 183 $docx-> addBreak('line'); 184 185 // read stats and create table 186 $table = array();
length; item($i)nodeValue
Page 28 of 382
187 188 $table[] = array( 189 '', 190 'Feb 2009 - Feb 2010', 191 'Feb 2010 - Feb 2011', 192 ); 193 194 195 for($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" )-> length; $i++) { 196 $paramsHeaderTextTable[0] = array( 197 'text' => $xmlFeb2009Feb2010-> getElementsByTagName("NAME" )-> item($i)> nodeValue, 198 'b' => 'single', 199 'sz' => 14 200 ); 201 202 $table[] = array( 203 $docx-> addElement('addText', $paramsHeaderTextTable), 204 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> item($i)-> nodeValue, 205 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> item($i)-> nodeValue 206 ); 207 } 208 209 $paramsTable = array( 210 'border' => 'single', 211 'border_sz' => 2, 212 'jc' => 'center', 213 'size_col' => 2800 214 ); 215 216 $docx-> addTable($table, $paramsTable); 217 218 // add page break 219 $docx-> addBreak('page'); 220 221 // add text 222 $textInfo = 'Stats are based on aggregate data collected by StatCounter on a' 223 . ' sample exceeding 15 billion pageviews per month collected from across' 224 . ' the StatCounter network of more than 3 million websites. Stats are ' 225 . ' updated and made available every 4 hours, however are subject to ' 226 . 'quality assurance testing and revision for 7 days from publication.'; 227 228 $paramsTextInfo = array( 229 'val' => 1, 230 'i' => 'single', 231 'sz' => 8 232 ); 233 234 $docx-> addText($textInfo, $paramsTextInfo); 235 236 // add link 237 $docx-> addLink('Source: StatCounter', 'http://gs.statcounter.com'); 238 239 // generate DOCX file 240 $docx-> createDocx('example_report');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 <?php /** * Create a DOCX file. User customized document * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $users = array( 0 => array( 'name' => 'value1' => 'Don Mattingly', '0.2',
Page 29 of 382
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
'value2' 'value3' ), 1 => array( 'name' 'value1' 'value2' 'value3' ), 2 => array( 'name' 'value1' 'value2' 'value3' ) ); foreach ($users as $user) { $docx = new CreateDocx(); $paramsTitle = array( 'val' => 1, 'u' => 'single', ); $docx-> $docx->
=> => => => => => => => => =>
'0.4', '0.6', 'Brian Sipe', '0.3', '0.3', '0.4', 'Julius Erving', '0.1', '0.2', '0.7',
'Hi, ',
$text[] = array( 'text' => $user['name'], 'b' => 'single', ); $text[] = array( 'text' => ' lorem ipsum dolor sit amet, consectetur' . 'adipiscing elit. Pellentesque egestas gravida tincidunt. ' . 'Nunc ante enim, auctor at elementum porttitor, pharetra a' . ' erat. Vivamus semper orci nec neque faucibus a varius ' . 'libero ultrices. Mauris viverra, nisl sed ullamcorper.', ); $docx-> $docx-> $docx-> addText($text); addBreak('line'); addText('Lorem ipsum dolor sit amet, consectetur: ');
3, 1, 2)
$valuesList = array( 'Donec tellus justo', array( 'faucibus nec commodo quis', 'dignissim ut ipsum', 'Aenean hendrerit interdum', array( 'Morbi malesuada luctus libero', 'sodales est placerat eget', 'Aenean eget nulla vel' ), ), 'enim viverra iaculis', 'aliquet aliquam nisl', ); $docx-> addList($valuesList, $paramsList); $docx-> addBreak('page');
Page 30 of 382
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
$legends = array( '0' => array( 'sequence 1', 'sequence 2', 'sequence 3'), 'legend1' => array( $user['value1']), 'legend2' => array( $user['value2']), 'legend3' => array( $user['value3']) ); $args = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => $user['name'] . '\'s chart', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'left', 'showPercent' => 1, 'font' => 'Times New Roman' ); $docx-> addGraphic($args); $docx-> } createDocx('example_multidocument_' . $user['name']);
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 <?php /** * Create a DOCX file. Footnotes in different objects * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua:'; $paramsText = array( 'font' => 'Arial' ); $docx-> addText($text, $paramsText);
$legends = array( 'legend1' => array( 24), 'legend2' => array( 45), 'legend3' => array( 31) ); $args = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => 'Title first chart', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'left', 'showPercent' => 1, 'font' => 'Times New Roman', 'border' => 1 ); $docx-> addGraphic($args); $docx-> addFootnote( array( 'textDocument' => 'textEndNote' =>
30,
'Lorem ipsum dolor sit amet', 'Curabitur id dui purus, sit amet blandit lacus. ' .
Page 31 of 382
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
'Vivamus mollis magna et risus molestie blandit. ' . 'Phasellus vel tortor quis metus consectetur.' ) ); $docx-> addBreak('line');
$text = 'Cras eget porttitor sapien. Aenean tristique, nibh quis egestas ' . 'varius, erat neque sodales neque, quis bibendum sem lorem accumsan ' . 'mauris. Aliquam justo justo, vulputate sed condimentum non, pharetra:'; $paramsText = array( 'font' => 'Arial' ); $docx-> addText($text, $paramsText);
$paramsImg = array( 'name' => '../files/img/image.png', 'scaling' => 75, 'textWrap' => 0, 'border' => 1, ); $docx-> addImage($paramsImg);
'Aenean non gravida sapien', 'Nunc pretium bibendum dui id laoreet. Nunc ' . 'venenatis. Duis quis lorem vel dui tincidunt ' . 'pellentesque quis sed diam.'
createDocx('example_chart_footnotes');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 <?php /** * Create a DOCX file. Bar Chart example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $colChartValues = array( 'legend' => array( 'Internet Explorer', 'Firefox', 'Chrome', 'Safari', 'Opera'), 'November 2010' => array( '28.6', '44.0', '20.5', '4.0', '2.3'), 'December 2010' => array( '27.5', '43.5', '22.4', '3.8', '2.2'), 'January 2011' => array( '26.6', '42.8', '23.8', '4.0', '2.5') ); $paramsChart = array( 'data' => $colChartValues, 'type' => 'colChart', 'title' => 'W3C Browser Statistics', 'color' => 2, 'sizeX' => 15, 'sizeY' => 15, 'jc' => 'center', 'groupBar' => 'clustered', 'font' => 'Lucida Console' ); $docx-> addGraphic($paramsChart); $docx-> createDocx('example_bar_chart');
Page 32 of 382
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 <?php /** * Create a DOCX file. Two charts in the same DOCX * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $legends = array( 'legend1' => array( 10), 'legend2' => array( 0), 'legend3' => array( 40) ); $args = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => 'Title first chart', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'left', 'showPercent' => 1, 'font' => 'Times New Roman' ); $docx-> addGraphic($args);
30,
$legends = array( 'legend' => array( 'sequence 1', 'sequence 2', 'sequence 3'), 'Category 1' => array( 9.3, 2.4, 2), 'Category 2' => array( 2.5, 4.4, 1), 'Category 3' => array( 3.5, 1.8, 0.5), 'Category 4' => array( 1.5, 8, 1) ); $args = array( 'data' => $legends, 'type' => 'colChart', 'title' => 'Title second chart', 'color' => 2, 'textWrap' => 0, 'sizeX' => 17, 'sizeY' => 7, 'jc' => 'center', 'font' => 'Arial' ); $docx-> addGraphic($args); $docx-> createDocx('example_chart');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <?php /** * Create a DOCX file. Chart example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */
Page 33 of 382
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $legends = array( 'legend1' => array( 'legend2' => array( 'legend3' => array( ); 10), 0), 40)
$paramsChart = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => 'Title', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'right', 'showPercent' => 1, 'font' => 'Times New Roman' ); $docx-> addGraphic($paramsChart); $docx-> createDocx('example_chart');
Function Parameters:
array $dats Parameters of graphic Values: 'color' (1, 2, 3...), 'cornerP' (20, 30...), 'cornerX' (20, 30...), 'cornerY' (20, 30...), 'data' (array of values), 'font' (Arial, Times New Roman...), 'groupBar' (clustered, stacked), 'jc' (center, left, right), 'showPercent' (0, 1), 'sizeX' (10, 11, 12...), 'sizeY' (10, 11, 12...), 'textWrap' (0 (inline), 1 (square), 2 (front), 3 (back), 4 (up and bottom), 5 (clear)), 'title', 'type' (barChart, bar3DChart, colChart, col3DChart, pieChart, pie3DChart)
Add a graphic
array $dats Parameters of graphic Values: 'color' (1, 2, 3, 4, 5), 'cornerX' (20, 30...), 'data' (array of values), sizeX' (10, 11, 12...), 'sizeY' (10, 11, 12...), 'title', 'type' (barChart, bar3DChart, colChart, col3DChart, pieChart, pie3DChart)
Page 34 of 382
Access public
Access public
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 <?php /** * Create a DOCX file. Report example * * @category Phpdocx * @package examples * @subpackage advanced * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); // browser stats $statsFeb2009Feb2010 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>58</VALUE> </BROWSER> <BROWSER>
Page 35 of 382
<NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>3</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; $statsFeb2010Feb2011 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>50</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>11</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; // add text and date in header $header = 'Browsers stats'; $paramsHeader = array( 'jc' => 'right', 'textWrap' => 5, ); $date = getdate(); $docx-> addHeader($header . ' ' . $date['mon'] . '/' . $date['mday'] . '/' . $date['year'], $paramsHeader); // add footer with pager $footer = 'DOCX generated using PHPDOCX PRO.'; $paramsFooter = array( 'pager' => 'true', 'pagerAlignment' => ); $docx->
'center',
addFooter($footer, $paramsFooter);
// add chart title $title = 'Browsers stats chart'; $paramsTitle = array( 'val' => 1, 'b' => 'single',
Page 36 of 382
108 'sz' => 22 109 ); 110 111 $docx-> addTitle($title, $paramsTitle); 112 113 // add line break 114 $docx-> addBreak('line'); 115 $docx-> addBreak('line'); 116 $docx-> addBreak('line'); 117 118 // read XML Feb209Feb2010 119 $xmlFeb2009Feb2010 = new DOMDocument(); 120 $xmlFeb2009Feb2010-> loadXML($statsFeb2009Feb2010); 121 122 // read XML Feb2010Feb2011 123 $xmlFeb2010Feb2011 = new DOMDocument(); 124 $xmlFeb2010Feb2011-> loadXML($statsFeb2010Feb2011); 125 126 // read stats and create charts 127 $legendsAndValues = array(); 128 129 for ($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" $i++) { 130 $legendsAndValues[$xmlFeb2009Feb2010-> getElementsByTagName("NAME" > nodeValue] = array( 131 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> 132 ); 133 } 134 135 $chart = array( 136 'data' => $legendsAndValues, 137 'type' => 'pie3DChart', 138 'title' => 'Feb 2009 - Feb 2010', 139 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 140 'color' => 2, 141 'textWrap' => 0, 142 'sizeX' => 14, 'sizeY' => 8, 143 'jc' => 'center', 144 'showPercent' => 1, 145 ); 146 147 $docx-> addGraphic($chart); 148 149 // add line break 150 $docx-> addBreak('line'); 151 $docx-> addBreak('line'); 152 153 $legendsAndValues = array(); 154 155 for($i = 0; $i < $xmlFeb2010Feb2011-> getElementsByTagName("NAME" { 156 $legendsAndValues[$xmlFeb2010Feb2011-> getElementsByTagName("NAME" > nodeValue] = array( 157 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> 158 ); 159 } 160 161 $chart['data'] = $legendsAndValues; 162 $chart['title'] = 'Feb 2010 - Feb 2011'; 163 164 $docx-> addGraphic($chart); 165 166 // add page break 167 $docx-> addBreak('page'); 168 169 // add table title 170 $title = 'Browsers stats table'; 171 172 $paramsTitle = array( 173 'val' => 1, 174 'b' => 'single', 175 'sz' => 22 176 ); 177 178 $docx-> addTitle($title, $paramsTitle); 179 180 // add line break 181 $docx-> addBreak('line'); 182 $docx-> addBreak('line'); 183 $docx-> addBreak('line');
length; item($i)nodeValue
Page 37 of 382
184 185 // read stats and create table 186 $table = array(); 187 188 $table[] = array( 189 '', 190 'Feb 2009 - Feb 2010', 191 'Feb 2010 - Feb 2011', 192 ); 193 194 195 for($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" )-> length; $i++) { 196 $paramsHeaderTextTable[0] = array( 197 'text' => $xmlFeb2009Feb2010-> getElementsByTagName("NAME" )-> item($i)> nodeValue, 198 'b' => 'single', 199 'sz' => 14 200 ); 201 202 $table[] = array( 203 $docx-> addElement('addText', $paramsHeaderTextTable), 204 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> item($i)-> nodeValue, 205 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> item($i)-> nodeValue 206 ); 207 } 208 209 $paramsTable = array( 210 'border' => 'single', 211 'border_sz' => 2, 212 'jc' => 'center', 213 'size_col' => 2800 214 ); 215 216 $docx-> addTable($table, $paramsTable); 217 218 // add page break 219 $docx-> addBreak('page'); 220 221 // add text 222 $textInfo = 'Stats are based on aggregate data collected by StatCounter on a' 223 . ' sample exceeding 15 billion pageviews per month collected from across' 224 . ' the StatCounter network of more than 3 million websites. Stats are ' 225 . ' updated and made available every 4 hours, however are subject to ' 226 . 'quality assurance testing and revision for 7 days from publication.'; 227 228 $paramsTextInfo = array( 229 'val' => 1, 230 'i' => 'single', 231 'sz' => 8 232 ); 233 234 $docx-> addText($textInfo, $paramsTextInfo); 235 236 // add link 237 $docx-> addLink('Source: StatCounter', 'http://gs.statcounter.com'); 238 239 // generate DOCX file 240 $docx-> createDocx('example_report');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <?php /** * Create a DOCX file. Header and footer with font styles * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc';
Page 38 of 382
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
$docx = new CreateDocx(); $paramsHeader = array( 'name' => '../files/img/image.png', 'jc' => 'right', 'textWrap' => 5, 'font' => 'Arial' ); $docx-> addHeader('Header Arial', $paramsHeader);
$paramsHeader = array( 'font' => 'Times New Roman' ); $docx-> addHeader('Header Times New Roman', $paramsHeader);
$paramsFooter = array( 'pager' => 'true', 'pagerAlignment' => 'font' => 'Arial' ); $docx->
'center',
$paramsFooter = array( 'font' => 'Times New Roman' ); $docx-> $docx-> addFooter('Footer Times New Roman', $paramsFooter); createDocx('example_header_and_footer');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 <?php /** * Create a DOCX file. Header * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $paramsHeader = array( 'font' => 'Times New Roman', 'jc' => 'right', 'textWrap' => 5, ); $docx-> $docx-> addHeader('Header text', $paramsHeader); createDocx('example_header');
Function Parameters:
string $text Text to add array $paramsHeader Parameters of header Values: 'border'(1, 2, 3...), 'borderDiscontinuous' (0, 1), 'font' (Arial, Times New Roman...), 'jc' (center, left, right), 'name', 'scaling' (50, 100), 'sizeX' (10, 11, 12...), 'sizeY' (10, 11, 12...), spacingTop (10, 11...), spacingBottom (10, 11...), spacingLeft (10, 11...), spacingRight (10, 11...), 'textWrap' (0 (inline), 1 (square), 2 (front), 3 (back), 4 (up and bottom), 5 (clear))
Page 39 of 382
Add a header.
example
1 <?php 2 3 /** 4 * Create a DOCX file. Add HTML code in a DOCX file 5 * 6 * @category Phpdocx 7 * @package examples 8 * @subpackage intermediate 9 * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. 10 * (http://www.2mdc.com) 11 * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php 12 * @version 05.24.2001 13 * @link http://www.phpdocx.com 14 * @since File available since Release 2.2 15 */ 16 require_once('../../classes/CreateDocx.inc'); 17 18 $docx = new CreateDocx(); 19 20 $html = ' 21 <span> 22 <h3>Dynamic DOCX generation. <span style="font-size: 17px; padding: 0pt; color: rgb(0, 0, 0); margin: 9px 0pt 0pt;"><img src="http://www.phpdocx.com/wpcontent/themes/lightword/images/new.gif" style="vertical-align: middle;"> New 2.2 version<br> 23 <strong style="color: rgb(4, 133, 232); font-weight: normal;">with support for OpenOffice Documents, rewritten and faster API<br> 24 and <a href="features" style="color: rgb(4, 133, 232);">new features</a>!</strong></span></h3> 25 <p>Do you need to dynamically generate Word documents?.</p> 26 <p> <strong>PHPDOCX</strong> do this and much more. You may create highly customized reports in Word extracting data directly from any database or spreadsheet. These reports may include editable graphs, images, tables, headers, footers, etcetera. <strong>PHPDOCX</strong> can create Word documents from scratch or use predefined templates to simplify your work. With a few lines of code you may integrate <strong>PHPDOCX</strong> in your website or intranet and offer a valuable service to your customers and employees..</p> 27 28 <div style="clear: both;"></div> 29 30 <a href="wordpress/download" class="download_home">DOWNLOAD NOW</a> 31 <p>Do you need this functionality with Java ? <a href="http://www.javadocx.com" class="link_destacado">Try JavadocX!</a></p> 32 <div class="compatible"> 33 <h3>100% compatibility</h3><h3> 34 <img src="http://www.phpdocx.com/wpcontent/themes/lightword/images/100_compatibility.gif" alt="100% compatibility"></h3></div> 35 </span>' ; 36 37 $docx-> addHTML($html); 38 39 $html = ' 40 <div class="index_caja">
Page 40 of 382
41 <h2>What is PHPDOCX ?</h2> 42 <p><strong>PHPDOCX</strong> is a PHP library designed to generate completely dynamic and fully customizable Word documents. </p> 43 <p><strong>PHPDOCX</strong> is hosted in your server providing a very and complete flexible solution for your document and<strong> report generation needs</strong>.</p> 44 <h2>What can I do with PHPDOCX ?</h2> 45 46 <p>With a few lines of code you can generate a complete report that includes: </p> 47 <ul> 48 <li> Editable Text</li> 49 <li>Images and Graphic elements</li> 50 <li>Standard paragraphs</li> 51 <li>Bulleted or numbered lists</li> 52 <li>Customized tables</li> 53 54 <li>Dynamic tables</li> 55 <li>All kind of customizable and editable charts or graphs to display numerical data</li> 56 <li>Tables of content to simplify readability within long documents</li> 57 <li>Headers that will reflect your corporate branding</li> 58 <li>Footers with automatic page numbering </li> 59 </ul> 60 61 <p>You could also create and use your own templates for Mailmerge or to generate really sophisticated reports and documents. </p> 62 <h2><a href="blog-news"><img src="http://www.phpdocx.com/wpcontent/themes/lightword/images/index_blog.gif" alt="blog news"> Latest Blog entries</a></h2> 63 </div>' ; 64 65 $docx-> addHTML($html); 66 67 $docx-> createDocx('example_html');
example
1 <?php 2 3 /** 4 * Create a DOCX file. Add HTML code in a DOCX file 5 * 6 * @category Phpdocx 7 * @package examples 8 * @subpackage easy 9 * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. 10 // * (http://www.2mdc.com) 11 * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php 12 * @version 05.24.2011 13 * @link http://www.phpdocx.com 14 * @since File available since Release 2.3 15 */ 16 require_once '../../classes/CreateDocx.inc'; 17 18 $docx = new CreateDocx(); 19 20 $docx-> addText('HTML content'); 21 22 $html= '<p><strong>PHPDOCX</strong> is a PHP library designed to generate completely dynamic and fully customizable Word documents.</p>' ; 23 24 $docx-> addHTML($html); 25 26 $docx-> addText('End HTML content'); 27 28 $docx-> createDocx('example_html');
Function Parameters:
Page 41 of 382
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 <?php /** * Create a DOCX file. Footnotes in different objects * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua:'; $paramsText = array( 'font' => 'Arial' ); $docx-> addText($text, $paramsText);
$legends = array( 'legend1' => array( 24), 'legend2' => array( 45), 'legend3' => array( 31) ); $args = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => 'Title first chart', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'left', 'showPercent' => 1, 'font' => 'Times New Roman', 'border' => 1 ); $docx-> addGraphic($args); $docx-> addFootnote( array( 'textDocument' => 'textEndNote' => ) ); $docx-> addBreak('line');
30,
'Lorem ipsum dolor sit amet', 'Curabitur id dui purus, sit amet blandit lacus. ' . 'Vivamus mollis magna et risus molestie blandit. ' . 'Phasellus vel tortor quis metus consectetur.'
Page 42 of 382
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
$text = 'Cras eget porttitor sapien. Aenean tristique, nibh quis egestas ' . 'varius, erat neque sodales neque, quis bibendum sem lorem accumsan ' . 'mauris. Aliquam justo justo, vulputate sed condimentum non, pharetra:'; $paramsText = array( 'font' => 'Arial' ); $docx-> addText($text, $paramsText);
$paramsImg = array( 'name' => '../files/img/image.png', 'scaling' => 75, 'textWrap' => 0, 'border' => 1, ); $docx-> addImage($paramsImg);
'Aenean non gravida sapien', 'Nunc pretium bibendum dui id laoreet. Nunc ' . 'venenatis. Duis quis lorem vel dui tincidunt ' . 'pellentesque quis sed diam.'
createDocx('example_chart_footnotes');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 <?php /** * Create a DOCX file. Image example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $paramsImg = array( 'name' => '../files/img/image.png', 'scaling' => 50, 'spacingTop' => 100, 'spacingBottom' => 0, 'spacingLeft' => 100, 'spacingRight' => 0, 'textWrap' => 1, 'border' => 1, 'borderDiscontinuous' => 1 ); $docx-> $docx-> addImage($paramsImg); createDocx('example_image');
Function Parameters:
array $dats Image to add and paramaters to use Values: 'border'(1, 2, 3...), 'borderDiscontinuous' (0, 1), 'font' (Arial, Times New Roman...), 'jc' (center, left, right), 'name', 'scaling' (50, 100), 'sizeX' (10, 11, 12...), 'sizeY' (10, 11, 12...), spacingTop (10, 11...), spacingBottom (10, 11...), spacingLeft (10, 11...), spacingRight (10, 11...), 'textWrap' (0 (inline), 1 (square), 2 (front), 3 (back), 4 (up and bottom), 5 (clear))
Page 43 of 382
Add an image
void function CreateDocx::addLink([$text = ''], [$textLink = ''], [$font = ''], $link) [line 1456]
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 <?php /** * Create a DOCX file. Report example * * @category Phpdocx * @package examples * @subpackage advanced * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); // browser stats $statsFeb2009Feb2010 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>58</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>3</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; $statsFeb2010Feb2011 = ' <STATS> <BROWSER>
Page 44 of 382
53 <NAME>Internet Explorer</NAME> 54 <VALUE>50</VALUE> 55 </BROWSER> 56 <BROWSER> 57 <NAME>Firefox</NAME> 58 <VALUE>31</VALUE> 59 </BROWSER> 60 <BROWSER> 61 <NAME>Chrome</NAME> 62 <VALUE>11</VALUE> 63 </BROWSER> 64 <BROWSER> 65 <NAME>Safari</NAME> 66 <VALUE>4</VALUE> 67 </BROWSER> 68 <BROWSER> 69 <NAME>Opera</NAME> 70 <VALUE>2</VALUE> 71 </BROWSER> 72 <BROWSER> 73 <NAME>Other</NAME> 74 <VALUE>2</VALUE> 75 </BROWSER> 76 </STATS> 77 '; 78 79 // add text and date in header 80 $header = 'Browsers stats'; 81 82 $paramsHeader = array( 83 'jc' => 'right', 84 'textWrap' => 5, 85 ); 86 87 $date = getdate(); 88 89 $docx-> addHeader($header . ' ' . $date['mon'] . '/' . $date['mday'] . '/' 90 . $date['year'], $paramsHeader); 91 92 // add footer with pager 93 $footer = 'DOCX generated using PHPDOCX PRO.'; 94 95 $paramsFooter = array( 96 'pager' => 'true', 97 'pagerAlignment' => 'center', 98 ); 99 100 $docx-> addFooter($footer, $paramsFooter); 101 102 // add chart title 103 $title = 'Browsers stats chart'; 104 105 $paramsTitle = array( 106 'val' => 1, 107 'b' => 'single', 108 'sz' => 22 109 ); 110 111 $docx-> addTitle($title, $paramsTitle); 112 113 // add line break 114 $docx-> addBreak('line'); 115 $docx-> addBreak('line'); 116 $docx-> addBreak('line'); 117 118 // read XML Feb209Feb2010 119 $xmlFeb2009Feb2010 = new DOMDocument(); 120 $xmlFeb2009Feb2010-> loadXML($statsFeb2009Feb2010); 121 122 // read XML Feb2010Feb2011 123 $xmlFeb2010Feb2011 = new DOMDocument(); 124 $xmlFeb2010Feb2011-> loadXML($statsFeb2010Feb2011); 125 126 // read stats and create charts 127 $legendsAndValues = array(); 128 129 for ($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" $i++) { 130 $legendsAndValues[$xmlFeb2009Feb2010-> getElementsByTagName("NAME" > nodeValue] = array(
)-> )->
length; item($i)-
Page 45 of 382
131 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> 132 ); 133 } 134 135 $chart = array( 136 'data' => $legendsAndValues, 137 'type' => 'pie3DChart', 138 'title' => 'Feb 2009 - Feb 2010', 139 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 140 'color' => 2, 141 'textWrap' => 0, 142 'sizeX' => 14, 'sizeY' => 8, 143 'jc' => 'center', 144 'showPercent' => 1, 145 ); 146 147 $docx-> addGraphic($chart); 148 149 // add line break 150 $docx-> addBreak('line'); 151 $docx-> addBreak('line'); 152 153 $legendsAndValues = array(); 154 155 for($i = 0; $i < $xmlFeb2010Feb2011-> getElementsByTagName("NAME" { 156 $legendsAndValues[$xmlFeb2010Feb2011-> getElementsByTagName("NAME" > nodeValue] = array( 157 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> 158 ); 159 } 160 161 $chart['data'] = $legendsAndValues; 162 $chart['title'] = 'Feb 2010 - Feb 2011'; 163 164 $docx-> addGraphic($chart); 165 166 // add page break 167 $docx-> addBreak('page'); 168 169 // add table title 170 $title = 'Browsers stats table'; 171 172 $paramsTitle = array( 173 'val' => 1, 174 'b' => 'single', 175 'sz' => 22 176 ); 177 178 $docx-> addTitle($title, $paramsTitle); 179 180 // add line break 181 $docx-> addBreak('line'); 182 $docx-> addBreak('line'); 183 $docx-> addBreak('line'); 184 185 // read stats and create table 186 $table = array(); 187 188 $table[] = array( 189 '', 190 'Feb 2009 - Feb 2010', 191 'Feb 2010 - Feb 2011', 192 ); 193 194 195 for($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" { 196 $paramsHeaderTextTable[0] = array( 197 'text' => $xmlFeb2009Feb2010-> getElementsByTagName("NAME" > nodeValue, 198 'b' => 'single', 199 'sz' => 14 200 ); 201 202 $table[] = array( 203 $docx-> addElement('addText', $paramsHeaderTextTable), 204 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> 205 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> 206 );
item($i)->
nodeValue
)-> )->
item($i)-> item($i)->
nodeValue, nodeValue
Page 46 of 382
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
} $paramsTable = array( 'border' => 'single', 'border_sz' => 2, 'jc' => 'center', 'size_col' => 2800 ); $docx-> addTable($table, $paramsTable);
// add page break $docx-> addBreak('page'); // add text $textInfo = 'Stats are based on aggregate data collected by StatCounter on a' . ' sample exceeding 15 billion pageviews per month collected from across' . ' the StatCounter network of more than 3 million websites. Stats are ' . ' updated and made available every 4 hours, however are subject to ' . 'quality assurance testing and revision for 7 days from publication.'; $paramsTextInfo = array( 'val' => 1, 'i' => 'single', 'sz' => 8 ); $docx-> addText($textInfo, $paramsTextInfo);
// add link $docx-> addLink('Source: StatCounter', 'http://gs.statcounter.com'); // generate DOCX file $docx-> createDocx('example_report');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 <?php /** * Create a DOCX file. Link example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $docx-> $docx-> addLink('Link to Google', 'http://www.google.es', 'Arial'); createDocx('example_link');
Function Parameters:
string $text Text to use as link string $link URL link string $font Type of font Values: 'Arial', 'Times New Roman'... $textLink
Add a link
Page 47 of 382
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 <?php /** * Create a DOCX file. User customized document * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $users = array( 0 => array( 'name' 'value1' 'value2' 'value3' ), 1 => array( 'name' 'value1' 'value2' 'value3' ), 2 => array( 'name' 'value1' 'value2' 'value3' ) ); foreach ($users as $user) { $docx = new CreateDocx(); $paramsTitle = array( 'val' => 1, 'u' => 'single', ); $docx-> $docx-> addTitle($user['name'] . '\'s Document', $paramsTitle); addBreak('line'); => => => => => => => => => => => => 'Don Mattingly', '0.2', '0.4', '0.6', 'Brian Sipe', '0.3', '0.3', '0.4', 'Julius Erving', '0.1', '0.2', '0.7',
'Hi, ',
Page 48 of 382
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
$text[] = array( 'text' => ' lorem ipsum dolor sit amet, consectetur' . 'adipiscing elit. Pellentesque egestas gravida tincidunt. ' . 'Nunc ante enim, auctor at elementum porttitor, pharetra a' . ' erat. Vivamus semper orci nec neque faucibus a varius ' . 'libero ultrices. Mauris viverra, nisl sed ullamcorper.', ); $docx-> $docx-> $docx-> addText($text); addBreak('line'); addText('Lorem ipsum dolor sit amet, consectetur: ');
3, 1, 2)
$valuesList = array( 'Donec tellus justo', array( 'faucibus nec commodo quis', 'dignissim ut ipsum', 'Aenean hendrerit interdum', array( 'Morbi malesuada luctus libero', 'sodales est placerat eget', 'Aenean eget nulla vel' ), ), 'enim viverra iaculis', 'aliquet aliquam nisl', ); $docx-> addList($valuesList, $paramsList); $docx-> addBreak('page');
$legends = array( '0' => array( 'sequence 1', 'sequence 2', 'sequence 3'), 'legend1' => array( $user['value1']), 'legend2' => array( $user['value2']), 'legend3' => array( $user['value3']) ); $args = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => $user['name'] . '\'s chart', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'left', 'showPercent' => 1, 'font' => 'Times New Roman' ); $docx-> addGraphic($args); $docx-> } createDocx('example_multidocument_' . $user['name']);
example
1 2 3 4 5 6 7 8 9 10 11 12 13 <?php /** * Create a DOCX file. List nested * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com
Page 49 of 382
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
* @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $paramsList = 'val' => ); $valuesList = 'Line 1', array( 'Line 'Line 'Line ), 'Line 2', 'Line 3', ); $docx-> $docx-> array( 1 array( A', B', C'
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 <?php /** * Create a DOCX file. List with image, list, chart and textbox * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $paramsLink = array( 'title' => 'Link to Google', 'link' => 'http://www.google.es' ); $link = $docx-> addElement('addLink', $paramsLink);
$paramsImage = array( 'name' => '../files/img/image.png' ); $image = $docx-> addElement('addImage', $paramsImage); 10, 11, 12), 0, 1, 2), 40, 41, 42)
$legends = array( 'legend1' => array( 'legend2' => array( 'legend3' => array( );
$paramsChart = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => 'Title' ); $chart = $docx-> addElement('addGraphic', $paramsChart); $paramsText = array( 'b' => 'single' ); $paramsBox = array( 'jc' => 'square' );
Page 50 of 382
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
$paramsTextBox = array( array( 'text' => 'Lorem ipsum dolor sit amet, consectetur adipisicing ' . 'elit, sed do eiusmod tempor incididunt ut labore et ' . 'dolore magna aliqua. Ut enim ad minim veniam, quis ' . 'nostrud exercitation ullamco laboris nisi ut aliquip ' . 'ex ea commodo consequat. Duis aute irure dolor in ' . 'reprehenderit in voluptate velit esse cillum dolore ' . 'eu fugiat nulla pariatur. Excepteur sint occaecat ' . 'cupidatat non proident, sunt in culpa qui officia ' . 'deserunt mollit anim id est laborum.', 'args' => $paramsText ), $paramsBox ); $textBox = $docx-> addElement('addTextBox', $paramsTextBox);
$valuesList = array( 'Line 1', $link, $image, $chart, 'Line 2', 'Line 3', $textBox, ); $paramsList = array( 'val' => 1 ); $docx-> addList($valuesList, $paramsList); $docx-> createDocx('example_list');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 <?php /** * Create a DOCX file. Custom Bullets List example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $valuesList = array( 'Line 1', 'Line 2', 'Line 3', 'Line 4', 'Line 5' ); $paramsList = array( 'val' => 1, 'bullets' => array( ); $docx-> $docx->
3)
example
1 2 3 <?php /**
Page 51 of 382
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
* Create a DOCX file. List example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $valuesList = array( 'Line 1', 'Line 2', 'Line 3', 'Line 4', 'Line 5' ); $paramsList = array( 'val' => 1 ); $docx-> $docx-> addList($valuesList, $paramsList); createDocx('example_list');
Function Parameters:
array $dats Values of the list array $paramsList Parameters to use Values: 'font' (Arial, Times New Roman...), 'val' (0 (clear), 1 (inordinate), 2(numerical)), array 'bullets' (1 (), 2 (o), 3 ())
Add a list
Page 52 of 382
Access public
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 <?php /** * Create a DOCX file. List example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.0 * @link http://www.phpdocx.com * @since File available since Release 2.0 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $docx-> addMathEq( '<m:oMathPara> <m:oMath><m:r><m:t>=~</m:t></m:r></m:oMath> </m:oMathPara>' ); $docx-> $docx-> addMathDocx('../files/math.docx'); createDocx('example_math');
Function Parameters:
example
Page 53 of 382
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
<?php /** * Create a DOCX file. List example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.0 * @link http://www.phpdocx.com * @since File available since Release 2.0 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $docx-> addMathEq( '<m:oMathPara> <m:oMath><m:r><m:t>=~</m:t></m:r></m:oMath> </m:oMathPara>' ); $docx-> $docx-> addMathDocx('../files/math.docx'); createDocx('example_math');
Function Parameters:
Access public
Page 54 of 382
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 <?php /** * Create a DOCX file. Properties example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $paramsProperties = array( 'title' => 'my title', 'subject' => 'my subject', 'creator' => 'the creator', 'keywords' => 'my keywords', 'description' => 'my description', 'category' => 'my category', 'custom' => array( array( 'title' => 'my title 1', 'value' => 'my content 1'), array( 'title' => 'my title 2', 'value' => 'my content 2'), array( 'title' => 'my title 3', 'value' => 'my content 3') ) ); $docx-> addProperties($paramsProperties); $docx-> createDocx('example_properties');
Page 55 of 382
Function Parameters:
array $values Parameters to use Values: 'title', 'subject', 'creator', 'keywords', 'description', 'category', 'manager', 'custom' ('title', 'value')
Access public
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 <?php /** * Create a DOCX file. Add RTF file in a DOCX file * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. // * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 05.24.2011 * @link http://www.phpdocx.com * @since File available since Release 2.3 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx();
Page 56 of 382
19 20 21 22 23 24 25 26
Function Parameters:
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 <?php /** * Create a DOCX file. Section example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut ' . 'enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut' . 'aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit ' . 'in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ' . 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui ' . 'officia deserunt mollit anim id est laborum.'; $docx-> addText($text);
Page 57 of 382
39 40 41 42 43 44 45 46 47 48 49
'bottom' => 'right' => 'left' => ); $docx-> $docx-> $docx-> $docx->
Function Parameters:
array $dats Parameters to use Values: 'bottom' (4000, 4001...), 'columns' (1, 2, 3), 'left' (4000, 4001...), 'orient' (landscape), 'right' (4000, 4001), 'titlePage' (1), 'top' (4000, 4001)
Add a section
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 <?php /** * Create a DOCX file. Shape example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $type = 'line'; $paramsShape = array( 'width' => 300, 'height' => 500 ); $docx-> $docx-> addShape($type, $paramsShape); createDocx('example_shape');
Function Parameters:
Page 58 of 382
array $style Style of text Values: 'width' (300, 400...), 'height' (300, 400...)
Add a shape
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 <?php /** * Create a DOCX file. Report example * * @category Phpdocx * @package examples * @subpackage advanced * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); // browser stats $statsFeb2009Feb2010 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>58</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>3</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; $statsFeb2010Feb2011 = ' <STATS> <BROWSER>
Page 59 of 382
53 <NAME>Internet Explorer</NAME> 54 <VALUE>50</VALUE> 55 </BROWSER> 56 <BROWSER> 57 <NAME>Firefox</NAME> 58 <VALUE>31</VALUE> 59 </BROWSER> 60 <BROWSER> 61 <NAME>Chrome</NAME> 62 <VALUE>11</VALUE> 63 </BROWSER> 64 <BROWSER> 65 <NAME>Safari</NAME> 66 <VALUE>4</VALUE> 67 </BROWSER> 68 <BROWSER> 69 <NAME>Opera</NAME> 70 <VALUE>2</VALUE> 71 </BROWSER> 72 <BROWSER> 73 <NAME>Other</NAME> 74 <VALUE>2</VALUE> 75 </BROWSER> 76 </STATS> 77 '; 78 79 // add text and date in header 80 $header = 'Browsers stats'; 81 82 $paramsHeader = array( 83 'jc' => 'right', 84 'textWrap' => 5, 85 ); 86 87 $date = getdate(); 88 89 $docx-> addHeader($header . ' ' . $date['mon'] . '/' . $date['mday'] . '/' 90 . $date['year'], $paramsHeader); 91 92 // add footer with pager 93 $footer = 'DOCX generated using PHPDOCX PRO.'; 94 95 $paramsFooter = array( 96 'pager' => 'true', 97 'pagerAlignment' => 'center', 98 ); 99 100 $docx-> addFooter($footer, $paramsFooter); 101 102 // add chart title 103 $title = 'Browsers stats chart'; 104 105 $paramsTitle = array( 106 'val' => 1, 107 'b' => 'single', 108 'sz' => 22 109 ); 110 111 $docx-> addTitle($title, $paramsTitle); 112 113 // add line break 114 $docx-> addBreak('line'); 115 $docx-> addBreak('line'); 116 $docx-> addBreak('line'); 117 118 // read XML Feb209Feb2010 119 $xmlFeb2009Feb2010 = new DOMDocument(); 120 $xmlFeb2009Feb2010-> loadXML($statsFeb2009Feb2010); 121 122 // read XML Feb2010Feb2011 123 $xmlFeb2010Feb2011 = new DOMDocument(); 124 $xmlFeb2010Feb2011-> loadXML($statsFeb2010Feb2011); 125 126 // read stats and create charts 127 $legendsAndValues = array(); 128 129 for ($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" $i++) { 130 $legendsAndValues[$xmlFeb2009Feb2010-> getElementsByTagName("NAME" > nodeValue] = array(
)-> )->
length; item($i)-
Page 60 of 382
131 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> 132 ); 133 } 134 135 $chart = array( 136 'data' => $legendsAndValues, 137 'type' => 'pie3DChart', 138 'title' => 'Feb 2009 - Feb 2010', 139 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 140 'color' => 2, 141 'textWrap' => 0, 142 'sizeX' => 14, 'sizeY' => 8, 143 'jc' => 'center', 144 'showPercent' => 1, 145 ); 146 147 $docx-> addGraphic($chart); 148 149 // add line break 150 $docx-> addBreak('line'); 151 $docx-> addBreak('line'); 152 153 $legendsAndValues = array(); 154 155 for($i = 0; $i < $xmlFeb2010Feb2011-> getElementsByTagName("NAME" { 156 $legendsAndValues[$xmlFeb2010Feb2011-> getElementsByTagName("NAME" > nodeValue] = array( 157 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> 158 ); 159 } 160 161 $chart['data'] = $legendsAndValues; 162 $chart['title'] = 'Feb 2010 - Feb 2011'; 163 164 $docx-> addGraphic($chart); 165 166 // add page break 167 $docx-> addBreak('page'); 168 169 // add table title 170 $title = 'Browsers stats table'; 171 172 $paramsTitle = array( 173 'val' => 1, 174 'b' => 'single', 175 'sz' => 22 176 ); 177 178 $docx-> addTitle($title, $paramsTitle); 179 180 // add line break 181 $docx-> addBreak('line'); 182 $docx-> addBreak('line'); 183 $docx-> addBreak('line'); 184 185 // read stats and create table 186 $table = array(); 187 188 $table[] = array( 189 '', 190 'Feb 2009 - Feb 2010', 191 'Feb 2010 - Feb 2011', 192 ); 193 194 195 for($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" { 196 $paramsHeaderTextTable[0] = array( 197 'text' => $xmlFeb2009Feb2010-> getElementsByTagName("NAME" > nodeValue, 198 'b' => 'single', 199 'sz' => 14 200 ); 201 202 $table[] = array( 203 $docx-> addElement('addText', $paramsHeaderTextTable), 204 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> 205 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> 206 );
item($i)->
nodeValue
)-> )->
item($i)-> item($i)->
nodeValue, nodeValue
Page 61 of 382
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
} $paramsTable = array( 'border' => 'single', 'border_sz' => 2, 'jc' => 'center', 'size_col' => 2800 ); $docx-> addTable($table, $paramsTable);
// add page break $docx-> addBreak('page'); // add text $textInfo = 'Stats are based on aggregate data collected by StatCounter on a' . ' sample exceeding 15 billion pageviews per month collected from across' . ' the StatCounter network of more than 3 million websites. Stats are ' . ' updated and made available every 4 hours, however are subject to ' . 'quality assurance testing and revision for 7 days from publication.'; $paramsTextInfo = array( 'val' => 1, 'i' => 'single', 'sz' => 8 ); $docx-> addText($textInfo, $paramsTextInfo);
// add link $docx-> addLink('Source: StatCounter', 'http://gs.statcounter.com'); // generate DOCX file $docx-> createDocx('example_report');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 <?php /** * Create a DOCX file. Table styled * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $frameworks = array( array('name' => 'Code Igniter', 'ajax' => 'Prototype/script.aculo.us, jQuery/jQuery UI', 'mvc' => 'Modified active record pattern', 'orm' => 'No', 'security' => 'Yes' ), array('name' => 'Drupal', 'ajax' => 'jQuery/jQuery UI, more', 'mvc' => 'No', 'orm' => 'Optional module', 'security' => 'Yes' ), array('name' => 'eZ Components', 'ajax' => 'No', 'mvc' => 'Yes', 'orm' => 'Yes', 'security' => 'Yes' ), array('name' => 'Symfony', 'ajax' => 'Prototype, script.aculo.us, Unobtrusive Ajax ' . 'with UJS and PJS plugins', 'mvc' => 'Push',
Page 62 of 382
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
'orm' => 'Yes', 'security' => 'Plugin' ), array('name' => 'Zend Framework', 'ajax' => 'Toolkit-independent', 'mvc' => 'Push and Pull', 'orm' => 'Yes', 'security' => 'ACL-based' ) ); $headerStyle[0] = array( 'b' => 'single', 'font' => 'Arial', ); $table[] = array( '', 'Ajax', 'MVC framework', 'ORM', 'Security Framework(s)' ); foreach ($frameworks as $framework) { $headerStyle[0]['text'] = $framework['name']; $table[] = array( $docx-> addElement('addText', $headerStyle), $framework['ajax'], $framework['mvc'], $framework['orm'], $framework['security'] ); } $paramsTable = array( 'TBLLOOKval' => 'ffff01E0', 'TBLSTYLEval' => 'Tablanormal', 'TBLWtype' => 'center', 'TBLWw' => '50', 'border' => 'single', 'border_sz' => 20, 'border_spacing' => 0, 'border_color' => '000000', 'jc' => 'center', 'size_col' => 2800 ); $docx-> $docx-> addTable($table, $paramsTable); createDocx('example_table_styled');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 <?php /** * Create a DOCX file. Table with text, link and image * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $paramsLink = array( 'title' => 'Link to Google', 'link' => 'http://www.google.es' ); $link = $docx-> addElement('addLink', $paramsLink);
Page 63 of 382
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
$valuesTable = array( array( 'Title A', 'Title B', 'Title C', ), array( 'Line A', $link, $image, ) ); $paramsTable = array( 'TBLLOOKval' => 'ffff01E0', 'TBLSTYLEval' => 'Tablanormal', 'TBLWtype' => 'center', 'TBLWw' => '50', 'border' => 'single', 'border_sz' => 20, 'border_spacing' => 0, 'border_color' => 'ff0000', 'jc' => 'center', 'size_col' => 1200 ); $docx-> $docx-> addTable($valuesTable, $paramsTable); createDocx('example_table');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 <?php /** * Create a DOCX file. Table example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $valuesTable = array( array( 11, 12 ), array( 21, 22 ), ); $paramsTable = array( 'border' => 'single', 'border_sz' => 20 ); $docx-> $docx-> addTable($valuesTable, $paramsTable); createDocx('example_table');
Function Parameters:
Page 64 of 382
array $dats Values to add array $parameters Parameters to use Values: 'border' (none, single, double), 'border_color' (ffffff, ff0000), 'border_spacing' (0, 1, 2...), 'border_sz' (10, 11...), 'font' (Arial, Times New Roman...), 'jc' (center, left, right), 'size_col' (1200, 1300...), 'TBLSTYLEval' (Cuadrculamedia3nfasis1, Sombreadomedio1, Tablaconcuadrcula, TableGrid)
Add a table.
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 <?php /** * Create a DOCX file. Table of contents example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $objDocx = new CreateDocx(); $objDocx-> $objDocx-> addTableContents('Arial'); createDocx('example_tablecontents');
Function Parameters:
string $font Set font type Values: 'Arial', 'Times New Roman'...
Page 65 of 382
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 <?php /** * Create a DOCX file. Template example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> addTemplate('../files/TemplateText.docx'); addTemplateVariable('WEIGHT1', '10'); addTemplateVariable('WEIGHT2', '20'); addTemplateVariable('WEIGHT3', '25'); addTemplateVariable('PRICE1', '5'); addTemplateVariable('PRICE2', '30'); addTemplateVariable('PRICE3', '7'); addTemplateVariable('TOTALWEIGHT', '55'); addTemplateVariable('TOTALPRICE', '42'); addTemplateVariable('NAME', 'David Hume'); createDocx('template_text');
Function Parameters:
Page 66 of 382
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 <?php /** * Create a DOCX file. Template chart example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $docx-> addTemplate('../files/TemplateChart.docx'); 10, 11, 12), 30, 21, 12), 40, 41, 42)
$legends = array( 'legend1' => array( 'legend2' => array( 'legend3' => array( );
$paramsChart = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => 'Title', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'right', 'showPercent' => 1, 'font' => 'Times New Roman' ); $docx-> $docx-> addTemplateChart('PIECHART', $paramsChart); createDocx('template_chart');
Function Parameters:
string $var Value of the variable string $chart Chart to add Values: same as charts.
Page 67 of 382
Access public
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 <?php /** * Create a DOCX file. Template image example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $objDocx = new CreateDocx(); $objDocx-> $objDocx-> $objDocx-> addTemplate('../files/TemplateImage.docx'); addTemplateImage('IMAGE', '../files/img/logo_phpdocx.gif'); createDocx('template_image');
Function Parameters:
string $var Value of the variable string $pathImage Path of the new image
Page 68 of 382
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 <?php /** * Create a DOCX file. Template example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> $docx-> addTemplate('../files/TemplateText.docx'); addTemplateVariable('WEIGHT1', '10'); addTemplateVariable('WEIGHT2', '20'); addTemplateVariable('WEIGHT3', '25'); addTemplateVariable('PRICE1', '5'); addTemplateVariable('PRICE2', '30'); addTemplateVariable('PRICE3', '7'); addTemplateVariable('TOTALWEIGHT', '55'); addTemplateVariable('TOTALPRICE', '42'); addTemplateVariable('NAME', 'David Hume'); createDocx('template_text');
Function Parameters:
mixed $var Value of the variable. String or array of values string $value Text value, type of value or text array Values type of template: list, table, html, rtf, docx array $settings Template settings
Page 69 of 382
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 <?php /** * Create a DOCX file. Text with different styles in the same paragraph * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once('../../classes/CreateDocx.inc'); $docx = new CreateDocx(); $text = array(); $text[] = array( 'text' => 'Lorem ipsum', 'u' => 'single', ); $text[] = array( 'text' => ' sed do eiusmod tempor incididunt', 'b' => 'single', ); $docx-> $docx-> addText($text); createDocx('example_text');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 <?php /** * Create a DOCX file. Report example * * @category Phpdocx * @package examples * @subpackage advanced * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); // browser stats $statsFeb2009Feb2010 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>58</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME>
Page 70 of 382
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
<VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>3</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; $statsFeb2010Feb2011 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>50</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>11</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; // add text and date in header $header = 'Browsers stats'; $paramsHeader = array( 'jc' => 'right', 'textWrap' => 5, ); $date = getdate(); $docx-> addHeader($header . ' ' . $date['mon'] . '/' . $date['mday'] . '/' . $date['year'], $paramsHeader); // add footer with pager $footer = 'DOCX generated using PHPDOCX PRO.'; $paramsFooter = array( 'pager' => 'true', 'pagerAlignment' => ); $docx->
'center',
addFooter($footer, $paramsFooter);
// add chart title $title = 'Browsers stats chart'; $paramsTitle = array( 'val' => 1, 'b' => 'single', 'sz' => 22 ); $docx-> addTitle($title, $paramsTitle);
Page 71 of 382
113 // add line break 114 $docx-> addBreak('line'); 115 $docx-> addBreak('line'); 116 $docx-> addBreak('line'); 117 118 // read XML Feb209Feb2010 119 $xmlFeb2009Feb2010 = new DOMDocument(); 120 $xmlFeb2009Feb2010-> loadXML($statsFeb2009Feb2010); 121 122 // read XML Feb2010Feb2011 123 $xmlFeb2010Feb2011 = new DOMDocument(); 124 $xmlFeb2010Feb2011-> loadXML($statsFeb2010Feb2011); 125 126 // read stats and create charts 127 $legendsAndValues = array(); 128 129 for ($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" $i++) { 130 $legendsAndValues[$xmlFeb2009Feb2010-> getElementsByTagName("NAME" > nodeValue] = array( 131 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> 132 ); 133 } 134 135 $chart = array( 136 'data' => $legendsAndValues, 137 'type' => 'pie3DChart', 138 'title' => 'Feb 2009 - Feb 2010', 139 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 140 'color' => 2, 141 'textWrap' => 0, 142 'sizeX' => 14, 'sizeY' => 8, 143 'jc' => 'center', 144 'showPercent' => 1, 145 ); 146 147 $docx-> addGraphic($chart); 148 149 // add line break 150 $docx-> addBreak('line'); 151 $docx-> addBreak('line'); 152 153 $legendsAndValues = array(); 154 155 for($i = 0; $i < $xmlFeb2010Feb2011-> getElementsByTagName("NAME" { 156 $legendsAndValues[$xmlFeb2010Feb2011-> getElementsByTagName("NAME" > nodeValue] = array( 157 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> 158 ); 159 } 160 161 $chart['data'] = $legendsAndValues; 162 $chart['title'] = 'Feb 2010 - Feb 2011'; 163 164 $docx-> addGraphic($chart); 165 166 // add page break 167 $docx-> addBreak('page'); 168 169 // add table title 170 $title = 'Browsers stats table'; 171 172 $paramsTitle = array( 173 'val' => 1, 174 'b' => 'single', 175 'sz' => 22 176 ); 177 178 $docx-> addTitle($title, $paramsTitle); 179 180 // add line break 181 $docx-> addBreak('line'); 182 $docx-> addBreak('line'); 183 $docx-> addBreak('line'); 184 185 // read stats and create table 186 $table = array(); 187 188 $table[] = array(
length; item($i)nodeValue
Page 72 of 382
189 '', 190 'Feb 2009 - Feb 2010', 191 'Feb 2010 - Feb 2011', 192 ); 193 194 195 for($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" )-> length; $i++) { 196 $paramsHeaderTextTable[0] = array( 197 'text' => $xmlFeb2009Feb2010-> getElementsByTagName("NAME" )-> item($i)> nodeValue, 198 'b' => 'single', 199 'sz' => 14 200 ); 201 202 $table[] = array( 203 $docx-> addElement('addText', $paramsHeaderTextTable), 204 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> item($i)-> nodeValue, 205 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> item($i)-> nodeValue 206 ); 207 } 208 209 $paramsTable = array( 210 'border' => 'single', 211 'border_sz' => 2, 212 'jc' => 'center', 213 'size_col' => 2800 214 ); 215 216 $docx-> addTable($table, $paramsTable); 217 218 // add page break 219 $docx-> addBreak('page'); 220 221 // add text 222 $textInfo = 'Stats are based on aggregate data collected by StatCounter on a' 223 . ' sample exceeding 15 billion pageviews per month collected from across' 224 . ' the StatCounter network of more than 3 million websites. Stats are ' 225 . ' updated and made available every 4 hours, however are subject to ' 226 . 'quality assurance testing and revision for 7 days from publication.'; 227 228 $paramsTextInfo = array( 229 'val' => 1, 230 'i' => 'single', 231 'sz' => 8 232 ); 233 234 $docx-> addText($textInfo, $paramsTextInfo); 235 236 // add link 237 $docx-> addLink('Source: StatCounter', 'http://gs.statcounter.com'); 238 239 // generate DOCX file 240 $docx-> createDocx('example_report');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 <?php /** * Create a DOCX file. User customized document * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $users = array( 0 => array( 'name' 'value1' 'value2' 'value3' => => => => 'Don Mattingly', '0.2', '0.4', '0.6',
Page 73 of 382
), 'name' 'value1' 'value2' 'value3' ), 2 => array( 'name' 'value1' 'value2' 'value3' ) 1 => array( ); foreach ($users as $user) { $docx = new CreateDocx(); $paramsTitle = array( 'val' => 1, 'u' => 'single', ); $docx-> $docx->
'Brian Sipe', '0.3', '0.3', '0.4', 'Julius Erving', '0.1', '0.2', '0.7',
'Hi, ',
$text[] = array( 'text' => $user['name'], 'b' => 'single', ); $text[] = array( 'text' => ' lorem ipsum dolor sit amet, consectetur' . 'adipiscing elit. Pellentesque egestas gravida tincidunt. ' . 'Nunc ante enim, auctor at elementum porttitor, pharetra a' . ' erat. Vivamus semper orci nec neque faucibus a varius ' . 'libero ultrices. Mauris viverra, nisl sed ullamcorper.', ); $docx-> $docx-> $docx-> addText($text); addBreak('line'); addText('Lorem ipsum dolor sit amet, consectetur: ');
3, 1, 2)
$valuesList = array( 'Donec tellus justo', array( 'faucibus nec commodo quis', 'dignissim ut ipsum', 'Aenean hendrerit interdum', array( 'Morbi malesuada luctus libero', 'sodales est placerat eget', 'Aenean eget nulla vel' ), ), 'enim viverra iaculis', 'aliquet aliquam nisl', ); $docx-> addList($valuesList, $paramsList); $docx-> addBreak('page');
$legends = array(
Page 74 of 382
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
'0' => array( 'sequence 1', 'sequence 2', 'sequence 3'), 'legend1' => array( $user['value1']), 'legend2' => array( $user['value2']), 'legend3' => array( $user['value3']) ); $args = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => $user['name'] . '\'s chart', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'left', 'showPercent' => 1, 'font' => 'Times New Roman' ); $docx-> addGraphic($args); $docx-> }
30,
createDocx('example_multidocument_' . $user['name']);
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 <?php /** * Create a DOCX file. Footer Paginator example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once('../../classes/CreateDocx.inc'); $docx = new CreateDocx(); $docx-> $docx-> $docx-> $docx-> $docx-> addText('Page 1 Content'); addBreak('page'); addText('Page 2 Content'); addBreak('page'); addText('Page 3 Content');
$paramsFooter = array( 'font' => 'Arial', 'pager' => 'true', 'pagerAlignment' => ); $docx-> $docx->
'right'
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 <?php /** * Create a DOCX file. Text cursive example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2
Page 75 of 382
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
*/ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut ' . 'enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut' . 'aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit ' . 'in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ' . 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui.'; $paramsText = array( 'i' => 'single', 'jc' => 'distribute', 'sz' => 14, 'color' => '76923C' ); $docx-> addText($text, $paramsText); $docx-> createDocx('example_text_cursive');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 <?php /** * Create a DOCX file. Footnotes in different objects * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua:'; $paramsText = array( 'font' => 'Arial' ); $docx-> addText($text, $paramsText);
$legends = array( 'legend1' => array( 24), 'legend2' => array( 45), 'legend3' => array( 31) ); $args = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => 'Title first chart', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'left', 'showPercent' => 1, 'font' => 'Times New Roman', 'border' => 1 ); $docx-> addGraphic($args); $docx-> addFootnote( array( 'textDocument' => 'textEndNote' => )
30,
'Lorem ipsum dolor sit amet', 'Curabitur id dui purus, sit amet blandit lacus. ' . 'Vivamus mollis magna et risus molestie blandit. ' . 'Phasellus vel tortor quis metus consectetur.'
Page 76 of 382
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
); $docx-> addBreak('line');
$text = 'Cras eget porttitor sapien. Aenean tristique, nibh quis egestas ' . 'varius, erat neque sodales neque, quis bibendum sem lorem accumsan ' . 'mauris. Aliquam justo justo, vulputate sed condimentum non, pharetra:'; $paramsText = array( 'font' => 'Arial' ); $docx-> addText($text, $paramsText);
$paramsImg = array( 'name' => '../files/img/image.png', 'scaling' => 75, 'textWrap' => 0, 'border' => 1, ); $docx-> addImage($paramsImg);
'Aenean non gravida sapien', 'Nunc pretium bibendum dui id laoreet. Nunc ' . 'venenatis. Duis quis lorem vel dui tincidunt ' . 'pellentesque quis sed diam.'
createDocx('example_chart_footnotes');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 <?php /** * Create a DOCX file. Text example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut ' . 'enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut' . 'aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit ' . 'in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ' . 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui ' . 'officia deserunt mollit anim id est laborum.'; $paramsText = array( 'b' => 'single', 'font' => 'Arial' ); $docx-> $docx-> addText($text, $paramsText); createDocx('example_text');
Function Parameters:
mixed $value Text string or array of texts to add Values array: 'b' (single), 'cell_color' (ffffff, ff0000...), 'color' (ffffff, ff0000...), 'font' (Arial, Times New Roman...), 'i' (single), 'jc' (both,
Page 77 of 382
center, distribute, left, right), 'pageBreakBefore' (on, off), 'sz' (1, 2, 3...), 'text' 'u' (dash, dotted, double, single, wave, words), 'widowControl' (on, off), 'wordWrap' (on, off) array $style Style of text Values: 'b' (single), 'color' (ffffff, ff0000...), 'font' (Arial, Times New Roman...), 'i' (single), 'jc' (both, center, distribute, left, right), 'pageBreakBefore' (on, off), 'sz' (1, 2, 3...), 'u' (dash, dotted, double, single, wave, words), 'widowControl' (on, off), 'wordWrap' (on, off), 'lineSpacing' 120, 240 (standard), 480...
Add a text
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 <?php /** * Create a DOCX file. TextBox example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $paramsText = array( 'b' => 'single', 'font' => 'Arial' ); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut ' . 'enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut' . 'aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit ' . 'in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ' . 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui ' . 'officia deserunt mollit anim id est laborum.'; $paramsTextBox = array( 'jc' => 'through' );
Page 78 of 382
37 38 39 40 41 42 43 44 45 46
$docx-> addTextBox( array( 'text' => $text, 'args' => $paramsText ), $paramsTextBox ); $docx-> createDocx('example_textbox');
Function Parameters:
mixed $text Text string to add using params or not array $style Style of text Values: 'align' (center, left, right), 'fillcolor' (black, red...), 'font' (Arial, Times New Roman...), 'height' (300, 400...), 'jc' (square, through), 'margin_bottom' (100, 110...), 'margin_left' (100, 110...), 'margin_right' (100, 110...), 'margin_top' (100, 110...)
Add a textbox
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 <?php /** * Create a DOCX file. Report example * * @category Phpdocx * @package examples * @subpackage advanced * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); // browser stats $statsFeb2009Feb2010 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>58</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>4</VALUE>
Page 79 of 382
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
</BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>3</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; $statsFeb2010Feb2011 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>50</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>11</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; // add text and date in header $header = 'Browsers stats'; $paramsHeader = array( 'jc' => 'right', 'textWrap' => 5, ); $date = getdate(); $docx-> addHeader($header . ' ' . $date['mon'] . '/' . $date['mday'] . '/' . $date['year'], $paramsHeader); // add footer with pager $footer = 'DOCX generated using PHPDOCX PRO.'; $paramsFooter = array( 'pager' => 'true', 'pagerAlignment' => ); $docx->
'center',
addFooter($footer, $paramsFooter);
// add chart title $title = 'Browsers stats chart'; $paramsTitle = array( 'val' => 1, 'b' => 'single', 'sz' => 22 ); $docx-> addTitle($title, $paramsTitle);
Page 80 of 382
114 $docx-> addBreak('line'); 115 $docx-> addBreak('line'); 116 $docx-> addBreak('line'); 117 118 // read XML Feb209Feb2010 119 $xmlFeb2009Feb2010 = new DOMDocument(); 120 $xmlFeb2009Feb2010-> loadXML($statsFeb2009Feb2010); 121 122 // read XML Feb2010Feb2011 123 $xmlFeb2010Feb2011 = new DOMDocument(); 124 $xmlFeb2010Feb2011-> loadXML($statsFeb2010Feb2011); 125 126 // read stats and create charts 127 $legendsAndValues = array(); 128 129 for ($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" $i++) { 130 $legendsAndValues[$xmlFeb2009Feb2010-> getElementsByTagName("NAME" > nodeValue] = array( 131 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> 132 ); 133 } 134 135 $chart = array( 136 'data' => $legendsAndValues, 137 'type' => 'pie3DChart', 138 'title' => 'Feb 2009 - Feb 2010', 139 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 140 'color' => 2, 141 'textWrap' => 0, 142 'sizeX' => 14, 'sizeY' => 8, 143 'jc' => 'center', 144 'showPercent' => 1, 145 ); 146 147 $docx-> addGraphic($chart); 148 149 // add line break 150 $docx-> addBreak('line'); 151 $docx-> addBreak('line'); 152 153 $legendsAndValues = array(); 154 155 for($i = 0; $i < $xmlFeb2010Feb2011-> getElementsByTagName("NAME" { 156 $legendsAndValues[$xmlFeb2010Feb2011-> getElementsByTagName("NAME" > nodeValue] = array( 157 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> 158 ); 159 } 160 161 $chart['data'] = $legendsAndValues; 162 $chart['title'] = 'Feb 2010 - Feb 2011'; 163 164 $docx-> addGraphic($chart); 165 166 // add page break 167 $docx-> addBreak('page'); 168 169 // add table title 170 $title = 'Browsers stats table'; 171 172 $paramsTitle = array( 173 'val' => 1, 174 'b' => 'single', 175 'sz' => 22 176 ); 177 178 $docx-> addTitle($title, $paramsTitle); 179 180 // add line break 181 $docx-> addBreak('line'); 182 $docx-> addBreak('line'); 183 $docx-> addBreak('line'); 184 185 // read stats and create table 186 $table = array(); 187 188 $table[] = array( 189 '',
length; item($i)nodeValue
Page 81 of 382
190 'Feb 2009 - Feb 2010', 191 'Feb 2010 - Feb 2011', 192 ); 193 194 195 for($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" )-> length; $i++) { 196 $paramsHeaderTextTable[0] = array( 197 'text' => $xmlFeb2009Feb2010-> getElementsByTagName("NAME" )-> item($i)> nodeValue, 198 'b' => 'single', 199 'sz' => 14 200 ); 201 202 $table[] = array( 203 $docx-> addElement('addText', $paramsHeaderTextTable), 204 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> item($i)-> nodeValue, 205 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> item($i)-> nodeValue 206 ); 207 } 208 209 $paramsTable = array( 210 'border' => 'single', 211 'border_sz' => 2, 212 'jc' => 'center', 213 'size_col' => 2800 214 ); 215 216 $docx-> addTable($table, $paramsTable); 217 218 // add page break 219 $docx-> addBreak('page'); 220 221 // add text 222 $textInfo = 'Stats are based on aggregate data collected by StatCounter on a' 223 . ' sample exceeding 15 billion pageviews per month collected from across' 224 . ' the StatCounter network of more than 3 million websites. Stats are ' 225 . ' updated and made available every 4 hours, however are subject to ' 226 . 'quality assurance testing and revision for 7 days from publication.'; 227 228 $paramsTextInfo = array( 229 'val' => 1, 230 'i' => 'single', 231 'sz' => 8 232 ); 233 234 $docx-> addText($textInfo, $paramsTextInfo); 235 236 // add link 237 $docx-> addLink('Source: StatCounter', 'http://gs.statcounter.com'); 238 239 // generate DOCX file 240 $docx-> createDocx('example_report');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 <?php /** * Create a DOCX file. User customized document * * @category Phpdocx * @package examples * @subpackage intermediate * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $users = array( 0 => array( 'name' 'value1' 'value2' 'value3' ), => => => => 'Don Mattingly', '0.2', '0.4', '0.6',
Page 82 of 382
1 => array(
'name' 'value1' 'value2' 'value3' ), 2 => array( 'name' 'value1' 'value2' 'value3' ) ); foreach ($users as $user) { $docx = new CreateDocx(); $paramsTitle = array( 'val' => 1, 'u' => 'single', ); $docx-> $docx->
'Brian Sipe', '0.3', '0.3', '0.4', 'Julius Erving', '0.1', '0.2', '0.7',
'Hi, ',
$text[] = array( 'text' => $user['name'], 'b' => 'single', ); $text[] = array( 'text' => ' lorem ipsum dolor sit amet, consectetur' . 'adipiscing elit. Pellentesque egestas gravida tincidunt. ' . 'Nunc ante enim, auctor at elementum porttitor, pharetra a' . ' erat. Vivamus semper orci nec neque faucibus a varius ' . 'libero ultrices. Mauris viverra, nisl sed ullamcorper.', ); $docx-> $docx-> $docx-> addText($text); addBreak('line'); addText('Lorem ipsum dolor sit amet, consectetur: ');
3, 1, 2)
$valuesList = array( 'Donec tellus justo', array( 'faucibus nec commodo quis', 'dignissim ut ipsum', 'Aenean hendrerit interdum', array( 'Morbi malesuada luctus libero', 'sodales est placerat eget', 'Aenean eget nulla vel' ), ), 'enim viverra iaculis', 'aliquet aliquam nisl', ); $docx-> addList($valuesList, $paramsList); $docx-> addBreak('page'); 'sequence 1', 'sequence 2', 'sequence 3'),
Page 83 of 382
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
); $args = array( 'data' => $legends, 'type' => 'pie3DChart', 'title' => $user['name'] . '\'s chart', 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 'color' => 2, 'textWrap' => 0, 'sizeX' => 10, 'sizeY' => 10, 'jc' => 'left', 'showPercent' => 1, 'font' => 'Times New Roman' ); $docx-> addGraphic($args); $docx-> }
30,
createDocx('example_multidocument_' . $user['name']);
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 <?php /** * Create a DOCX file. Title example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $paramsTitle = array( 'val' => 1, 'u' => 'single', 'font' => 'Blackadder ITC', 'sz' => 22 ); $docx-> $docx-> addTitle('Lorem ipsum dolor sit amet.', $paramsTitle); createDocx('example_title');
Function Parameters:
string $text Text to add array $style Style of title Values: 'b' (single), 'color' (ffffff, ff0000...), 'font' (Arial, Times New Roman...), 'i' (single), 'jc' (both, center, distribute, left, right), 'pageBreakBefore' (on, off), 'sz' (1, 2, 3...), 'u' (dash, dotted, double, single, wave, words), 'widowControl' (on, off), 'wordWrap' (on, off)
Add a title
Page 84 of 382
Access public
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 <?php /** * Create a DOCX file. Report example * * @category Phpdocx * @package examples * @subpackage advanced * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 2.2 * @link http://www.phpdocx.com * @since File available since Release 2.2 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); // browser stats $statsFeb2009Feb2010 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>58</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>3</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS>
Page 85 of 382
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
'; $statsFeb2010Feb2011 = ' <STATS> <BROWSER> <NAME>Internet Explorer</NAME> <VALUE>50</VALUE> </BROWSER> <BROWSER> <NAME>Firefox</NAME> <VALUE>31</VALUE> </BROWSER> <BROWSER> <NAME>Chrome</NAME> <VALUE>11</VALUE> </BROWSER> <BROWSER> <NAME>Safari</NAME> <VALUE>4</VALUE> </BROWSER> <BROWSER> <NAME>Opera</NAME> <VALUE>2</VALUE> </BROWSER> <BROWSER> <NAME>Other</NAME> <VALUE>2</VALUE> </BROWSER> </STATS> '; // add text and date in header $header = 'Browsers stats'; $paramsHeader = array( 'jc' => 'right', 'textWrap' => 5, ); $date = getdate(); $docx-> addHeader($header . ' ' . $date['mon'] . '/' . $date['mday'] . '/' . $date['year'], $paramsHeader); // add footer with pager $footer = 'DOCX generated using PHPDOCX PRO.'; $paramsFooter = array( 'pager' => 'true', 'pagerAlignment' => ); $docx->
'center',
addFooter($footer, $paramsFooter);
// add chart title $title = 'Browsers stats chart'; $paramsTitle = array( 'val' => 1, 'b' => 'single', 'sz' => 22 ); $docx-> addTitle($title, $paramsTitle);
// add line break $docx-> addBreak('line'); $docx-> addBreak('line'); $docx-> addBreak('line'); // read XML Feb209Feb2010 $xmlFeb2009Feb2010 = new DOMDocument(); $xmlFeb2009Feb2010-> loadXML($statsFeb2009Feb2010); // read XML Feb2010Feb2011 $xmlFeb2010Feb2011 = new DOMDocument(); $xmlFeb2010Feb2011-> loadXML($statsFeb2010Feb2011); // read stats and create charts $legendsAndValues = array();
Page 86 of 382
128 129 for ($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" $i++) { 130 $legendsAndValues[$xmlFeb2009Feb2010-> getElementsByTagName("NAME" > nodeValue] = array( 131 $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" )-> 132 ); 133 } 134 135 $chart = array( 136 'data' => $legendsAndValues, 137 'type' => 'pie3DChart', 138 'title' => 'Feb 2009 - Feb 2010', 139 'cornerX' => 20, 'cornerY' => 20, 'cornerP' => 30, 140 'color' => 2, 141 'textWrap' => 0, 142 'sizeX' => 14, 'sizeY' => 8, 143 'jc' => 'center', 144 'showPercent' => 1, 145 ); 146 147 $docx-> addGraphic($chart); 148 149 // add line break 150 $docx-> addBreak('line'); 151 $docx-> addBreak('line'); 152 153 $legendsAndValues = array(); 154 155 for($i = 0; $i < $xmlFeb2010Feb2011-> getElementsByTagName("NAME" { 156 $legendsAndValues[$xmlFeb2010Feb2011-> getElementsByTagName("NAME" > nodeValue] = array( 157 $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" )-> 158 ); 159 } 160 161 $chart['data'] = $legendsAndValues; 162 $chart['title'] = 'Feb 2010 - Feb 2011'; 163 164 $docx-> addGraphic($chart); 165 166 // add page break 167 $docx-> addBreak('page'); 168 169 // add table title 170 $title = 'Browsers stats table'; 171 172 $paramsTitle = array( 173 'val' => 1, 174 'b' => 'single', 175 'sz' => 22 176 ); 177 178 $docx-> addTitle($title, $paramsTitle); 179 180 // add line break 181 $docx-> addBreak('line'); 182 $docx-> addBreak('line'); 183 $docx-> addBreak('line'); 184 185 // read stats and create table 186 $table = array(); 187 188 $table[] = array( 189 '', 190 'Feb 2009 - Feb 2010', 191 'Feb 2010 - Feb 2011', 192 ); 193 194 195 for($i = 0; $i < $xmlFeb2009Feb2010-> getElementsByTagName("NAME" { 196 $paramsHeaderTextTable[0] = array( 197 'text' => $xmlFeb2009Feb2010-> getElementsByTagName("NAME" > nodeValue, 198 'b' => 'single', 199 'sz' => 14 200 ); 201
length; item($i)nodeValue
)-> )->
Page 87 of 382
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
$table[] = array( $docx-> addElement('addText', $paramsHeaderTextTable), $xmlFeb2009Feb2010-> getElementsByTagName("VALUE" $xmlFeb2010Feb2011-> getElementsByTagName("VALUE" ); } $paramsTable = array( 'border' => 'single', 'border_sz' => 2, 'jc' => 'center', 'size_col' => 2800 ); $docx-> addTable($table, $paramsTable);
)-> )->
item($i)-> item($i)->
nodeValue, nodeValue
// add page break $docx-> addBreak('page'); // add text $textInfo = 'Stats are based on aggregate data collected by StatCounter on a' . ' sample exceeding 15 billion pageviews per month collected from across' . ' the StatCounter network of more than 3 million websites. Stats are ' . ' updated and made available every 4 hours, however are subject to ' . 'quality assurance testing and revision for 7 days from publication.'; $paramsTextInfo = array( 'val' => 1, 'i' => 'single', 'sz' => 8 ); $docx-> addText($textInfo, $paramsTextInfo);
// add link $docx-> addLink('Source: StatCounter', 'http://gs.statcounter.com'); // generate DOCX file $docx-> createDocx('example_report');
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 <?php /** * Create a DOCX file. Text example * * @category Phpdocx * @package examples * @subpackage easy * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. * (http://www.2mdc.com) * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php * @version 1.8 * @link http://www.phpdocx.com * @since File available since Release 1.8 */ require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut ' . 'enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut' . 'aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit ' . 'in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ' . 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui ' . 'officia deserunt mollit anim id est laborum.'; $paramsText = array( 'b' => 'single', 'font' => 'Arial' ); $docx-> $docx-> addText($text, $paramsText); createDocx('example_text');
Function Parameters:
Page 88 of 382
string $args[0] File name string $args[1] Page style Values: 'bottom' (4000, 4001...), 'columns' (1, 2, 3), 'left' (4000, 4001...), 'orient' (landscape), 'right' (4000, 4001), 'titlePage' (1), 'top' (4000, 4001)
string $args[0] Name of file string $args[1] Page style Values: 'bottom' (4000, 4001...), 'left' (4000, 4001...), 'orient' (landscape), 'right' (4000, 4001), 'titlePage' (1), 'top' (4000, 4001)
Access public
Delete a block
Page 89 of 382
Access public
Access public
Getter
Access public
Page 90 of 382
Getter
Access public
Getter
Access public
Getter
Access public
Getter
Access public
Getter
Access public
Page 91 of 382
Getter
Access public
Getter
Access public
Getter
Access public
Getter
Access public
Getter
Page 92 of 382
Access public
Getter
Access public
Getter
Access public
Getter
Access public
Getter
Access public
Page 93 of 382
Getter
Access public
Setter
Access public
Merge WordML into a DOCX. WordML is added at the end of the document
Access public
Page 94 of 382
Access public
string $font The new font Values: 'Arial', 'Times New Roman'...
Access public
Access public
Access public
Page 95 of 382
Access public
Access public
$tempDir
Setter
Access public
Page 96 of 382
$xmlContentTypes
Setter
Access public
$xmlDocPropsApp
Setter
Access public
$xmlDocPropsCore
Setter
Access public
Page 97 of 382
$xmlDocPropsCustom
Setter
Access public
$xmlRelsRels
Setter
Access public
$xmlWordDocument
Setter
Access public
Page 98 of 382
Function Parameters:
$xmlWordDocumentStyles
Setter
Access public
$xmlWordEndnotes
Setter
Access public
$xmlWordFontTable
Setter
Access public
Page 99 of 382
$xmlWordFooter
Setter
Access public
$xmlWordHeader
Setter
Access public
$xmlWordRelsDocumentRels
Setter
Access public
$xmlWordSettings
Setter
Access public
$xmlWordStyles
Setter
Access public
$xmlWordThemeTheme
Setter
Access public
$xmlWordWebSettings
Setter
Access public
Destruct
Access public
Access public
Debug.inc
Debug generated XML
Package debug Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Class Debug
[line 29]
Package debug Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Deprecated Use log4php included within phpdocx pro Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
mixed $message
Access public
Enable debug
Disable debug
Access public
Access public
int $active
Access public
array $messages
Access public
Destruct
Access public
Access public
CreateChartRels.inc
Create relationships used by images, charts...
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateElement.inc
Create tag elements
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateEmbeddedElement.inc
Create embedded elements
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateEndnote.inc
Create endnotes
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateExcelSharedStrings.inc
Generate excel shared strings
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateExcelSheet.inc
Create excel sheet
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateExcelTable.inc
Create excel table
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateFontTable.inc
Create font table
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateFooter.inc
Create footer
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateFootnote.inc
Create footnote
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateGraphic.inc
Create graphics (charts)
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateHeader.inc
Create header
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateImage.inc
Create images
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateLink.inc
Create links using text strings
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateList.inc
Create lists
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateMacro.inc
Add a macro
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateMath.inc
Add a math eq
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreatePage.inc
Create pages
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateProperties.inc
Create properties
Package elements Version 2.2 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 2.2 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateSettings.inc
Create default settings
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateShape.inc
Create shape
Package elements Version 2.2 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 2.2 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateStyle.inc
Create styles
Package elements Version 2.1 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateStyleTable.inc
Create style table
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateTable.inc
Create tables
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateTableContents.inc
Create table of contents
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateTemplate.inc
Use DOCX as templates
Package elements Version 05.26.2011 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.7 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateText.inc
Create text
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateTextBox.inc
Create text box
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateTheme1.inc
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateWebSettings.inc
Create default websettings XML
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateXlsx.inc
Create XLSX
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
EmbedDocument.inc
Embed documents in DOCX.
Package elements Version 23.05.2011 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 2.3 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
EmbedDOCX.inc
Create DOCX from DOCX file
Package elements Version 05.24.2011 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 2.3 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
EmbedHTML.inc
Create DOCX from HTML
Package elements Version 05.24.2011 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 2.3 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
EmbedRTF.inc
Create DOCX from RTF file
Package elements Version 05.24.2011 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 2.3 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
TransformDoc.inc
Transform DOCX to PDF or XHTML
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Class CreateChartRels
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
int $idChart
Access public
void function CreateChartRels::generateRELATIONSHIP($idChart, [$id = 1], $id.) [line 109] Function Parameters:
Access protected
Access protected
Destruct
Access public
Access public
Class CreateElement
[line 28]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com
CreateElement::MATHNAMESPACEWORD = 'm' [line 30] CreateElement::NAMESPACEWORD = 'w' [line 31] CreateElement::$_xml string = [line 38]
Access protected
Construct
Access public
Access protected
Access protected
void function CreateElement::generateANCHOR([$behindDoc = 0], [$distT = '0'], [$distB = '0'], [$distL = '114300'], [$distR = '114300'], [$simplePos = 0], [$relativeHeight = '251658240'], [$locked = 0], [$layoutInCell = 1], [$allowOverlap = 1]) [line 105] Function Parameters:
string $behindDoc string $distT string $distB string $distL string $distR int $simplePos string $relativeHeight string $locked string $layoutInCell string $allowOverlap
Generate w:anchor
Access protected
Generate w:avlst
Access protected
string $val
Generate w:b
Access protected
Generate w:bcs
Access protected
string $cstate
Generate w:blip
Access protected
Generate w:blipfill
Access protected
Generate w:cnvgraphicframepr
Access protected
Generate w:cnvpicpr
Access protected
string $id
Generate w:cnvpr
Access protected
void function CreateElement::generateDOCPR([$id = "1"], [$name = "0 Imagen"]) [line 253] Function Parameters:
Generate w:docpr
Access protected
Generate w:drawing
Access protected
void function CreateElement::generateEFFECTEXTENT([$l = "19050"], [$t = "0"], [$r = "4307"], [$b = "0"]) [line 287] Function Parameters:
Generate w:effectextent
Access protected
void function CreateElement::generateEXT([$cx = '2997226'], [$cy = '2247918']) [line 305] Function Parameters:
Generate w:ext
Access protected
void function CreateElement::generateEXTENT([$cx = '2986543'], [$cy = '2239906']) [line 322] Function Parameters:
Generate w:extent
Access protected
Generate w:fillrect
Access protected
string $xmlns
Generate w:graphic
Access protected
string $uri
Generate w:graphicdata
Access protected
string $noChangeAspect
Generate w:graphicpframelocks
Access protected
void function CreateElement::generateINLINE([$distT = '0'], [$distB = '0'], [$distL = '0'], [$distR = '0']) [line 409] Function Parameters:
Generate w:inline
Access protected
string $val
Generate w:jc
Access protected
void function CreateElement::generateLINETO([$x = '-198'], [$y = '21342']) [line 443] Function Parameters:
string $x string $y
Generate w:lineto
Access protected
string $w
Generate w:ln
Access protected
Generate w:noproof
Access protected
Generate w:nvpicpr
Access protected
void function CreateElement::generateOFF([$x = '0'], [$y = '0']) [line 504] Function Parameters:
string $x string $y
Generate w:off
Access protected
Generate w:p
Access protected
string $pic
Generate w:pic
Access protected
Generate w:pict
Access protected
string $relativeFrom
Generate w:positionh
Access protected
string $relativeFrom
Generate w:positionv
Access protected
int $num
Generate w:posoffset
Access protected
Generate w:ppr
Access protected
Function Parameters:
string $val
Generate w:prstdash
Access protected
string $prst
Generate w:prstgeom
Access protected
string $val
Generate w:pstyle
Access protected
Generate w:r
Access protected
Generate w:r
Access protected
string $font
Generate w:rfonts
Access protected
Generate w:rpr
Access protected
string $val
Generate w:rstyle
Access protected
string $val
Generate w:schemeclr
Access protected
void function CreateElement::generateSIMPLEPOS([$x = '0'], [$y = '0']) [line 781] Function Parameters:
string $x string $y
Generate w:simplepos
Access protected
Generate w:solidfill
Access protected
Generate w:sppr
Access protected
void function CreateElement::generateSTART([$x = '-198'], [$y = '0']) [line 826] Function Parameters:
string $x string $y
Generate w:start
Access protected
Generate w:stretch
Access protected
string $dat
Generate w:t
Access protected
Generate w:wrapnone
Access protected
string $edited
Generate w:wrappolygon
Access protected
string $wrapText
Generate w:wrapsquare
Access protected
string $wrapText
Generate w:wrapthrough
Access protected
Generate w:wraptopandbottom
Access protected
Generate w:xfrm
Access protected
Destruct
Access public
Access public
Class CreateEmbeddedElement
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Access public
Access public
Class CreateEndnote
[line 30]
Create endnotes
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0
License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Access public
Create endnote
Access public
Access public
string $type
Generate w:endnote
Access protected
Generate w:endnoteref
Access protected
<type> $id
Generate w:endnotereference
Access protected
void function CreateEndnote::generateP([$rsidR = '005F02E5'], [$rsidRDefault = '005F02E5'], [$rsidP = '005F02E5']) [line 232] Function Parameters:
Generate w:p
Access protected
Generate w:ppr
Access protected
Generate w:r
Access protected
Generate w:separator
Access protected
void function CreateEndnote::generateSPACING([$after = '0'], [$line = '240'], [$lineRule = 'auto']) [line 293] Function Parameters:
Generate w:spacing
Access protected
Destruct
Access public
Access public
Class CreateExcelSharedStrings
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Access public
Generate si
Access protected
string $num
Generate sst
Access protected
Generate t
Access protected
Destruct
Access public
Access public
Class CreateExcelSheet
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Access public
void function CreateExcelSheet::generateC($r, $s, [$t = '']) [line 173] Function Parameters:
Generate c
Access protected
void function CreateExcelSheet::generateCOL([$min = '1'], [$max = '1'], [$width = '11.85546875'], [$customWidth = '1']) [line 195] Function Parameters:
Generate col
Access protected
Generate cols
Access protected
Generate dimension
Access protected
void function CreateExcelSheet::generatePAGEMARGINS([$left = '0.7'], [$rigth = '0.7'], [$bottom = '0.75'], [$top = '0.75'], [$header = '0.3'], [$footer = '0.3']) [line 245] Function Parameters:
string $left string $rigth string $bottom string $top string $header string $footer
Generate pagemargins
Access protected
void function CreateExcelSheet::generatePAGESETUP([$paperSize = '9'], [$orientation = 'portrait'], [$id = '1']) [line 265] Function Parameters:
Generate pagesetup
Access protected
Generate row
Access protected
string $num
Generate selection
Access protected
Generate sheetdata
Access protected
void function CreateExcelSheet::generateSHEETFORMATPR([$baseColWidth = '10'], [$defaultRowHeight = '15']) [line 324] Function Parameters:
Generate sheetformatpr
Access protected
void function CreateExcelSheet::generateSHEETVIEW([$tabSelected = '1'], [$workbookViewId = '0']) [line 341] Function Parameters:
Generate sheetview
Access protected
Generate sheetviews
Access protected
string $id
Generate tablepart
Access protected
string $count
Generate tableparts
Access protected
string $num
Generate v
Access protected
Generate worksheet
Access protected
Destruct
Access public
Access public
Class CreateExcelTable
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Access public
Generate table
Access protected
void function CreateExcelTable::generateTABLECOLUMN([$id = '2'], [$name = '']) [line 149] Function Parameters:
Generate tablecolumn
Access protected
string $count
Generate tablecolumns
Access protected
void function CreateExcelTable::generateTABLESTYLEINFO([$showFirstColumn = '0'], [$showLastColumn = "0"], [$showRowStripes = "1"], [$showColumnStripes = "0"]) [line 182] Function Parameters:
Generate tablestyleinfo
Access protected
Destruct
Access public
Access public
Class CreateFontTable
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
array 0 args[0]
Create font
Access public
string $val
Generate w:charset
Access protected
string $val
Generate w:family
Access protected
string $name
Generate w:font
Access protected
string $val
Generate w:panose1
Access protected
string $val
Generate w:pitch
Access protected
void function CreateFontTable::generateSIG([$usbA = 'A00002EF'], [$usbB = '4000207B'], [$usbC = '00000000'], [$usbD = '00000000'], [$csbA = '0000009F'], [$csbB = '00000000']) [line 214] Function Parameters:
string $usbA string $usbB string $usbC string $usbD string $csbA string $csbB
Generate w:sig
Access protected
Destruct
Access public
Access public
Class CreateFooter
[line 29]
Create footer
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Create footer
Access public
Generate w:fldsimple
Access protected
Access protected
Generate w:p
Access protected
void function CreateFooter::generatePTAB([$relativeTo = 'margin'], [$alignment = 'right'], [$leader = 'none']) [line 162] Function Parameters:
Generate w:ptab
Access protected
Generate w:r
Access protected
Destruct
Access public
Access public
Class CreateFootnote
[line 29]
Create footnote
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
array $args[0]
Access public
array $args[0]
Create footnote
Access public
array $args[0]
Access public
string $type
Generate w:footnote
Access protected
Generate w:footnoteref
Access protected
string $id
Generate w:footnotereference
Access protected
void function CreateFootnote::generateP([$rsidR = '005F02E5'], [$rsidRDefault = '005F02E5'], [$rsidP = '005F02E5']) [line 240] Function Parameters:
Generate w:p
Access protected
Generate w:ppr
Access protected
Generate w:r
Access protected
string $type
Generate w:separator
Access protected
void function CreateFootnote::generateSPACING([$after = '0'], [$line = '240'], [$lineRule = 'auto']) [line 298] Function Parameters:
Generate w:spacing
Access protected
Destruct
Access public
Access public
Class CreateGraphic
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
array $args[0]
Access protected
array $args[0]
Access protected
Access protected
Access public
Access public
Create graphic
Access public
string $val
Generate w:auto
Access protected
string $val
Generate w:autotitledeleted
Access protected
<type> $val
Generate w:axId
Access protected
Function Parameters:
string $val
Generate w:axid
Access protected
string $val
Generate w:axPos
Access protected
Generate w:bar3DChart
Access protected
Generate w:barChart
Access protected
string $val
Generate w:barDir
Access protected
Generate w:bodypr
Access protected
Generate w:cat
Access protected
Generate w:catAx
Access protected
Generate w:chart
Access protected
Access protected
string $val
Generate w:crossAx
Access protected
string $val
Generate w:crossBetween
Access protected
string $val
Generate w:crosses
Access protected
string $val
Generate w:date1904
Access protected
Generate w:defrpr
Access protected
Generate w:dLbls
Access protected
Generate w:chart
Access protected
string $val
Generate w:externalData
Access protected
string $val
Generate w:f
Access protected
string $val
Generate w:firstSliceAng
Access protected
string $val
Generate w:formatCode
Access protected
string $val
Generate w:grouping
Access protected
string $val
Generate w:idx
Access protected
string $val
Generate w:lang
Access protected
Generate w:layout
Access protected
string $val
Generate w:lblAlgn
Access protected
string $val
Generate w:lblOffset
Access protected
Generate w:legend
Access protected
string $font
Generate c:layout
Access protected
string $val
Generate w:legendPos
Access protected
Generate w:line3DChart
Access protected
Generate w:lineChart
Access protected
Generate w:ln
Access protected
Generate w:lststyle
Access protected
Generate w:majorGridlines
Access protected
Generate w:noFill
Access protected
Generate w:numcache
Access protected
void function CreateGraphic::generateNUMFMT([$formatCode = 'General'], [$sourceLinked = '1']) [line 1828] Function Parameters:
Generate w:numFmt
Access protected
Generate w:numRef
Access protected
string $val
Generate w:order
Access protected
string $val
Generate w:orientation
Access protected
string $val
Generate w:overlap
Access protected
string $val
Generate w:perspective
Access protected
Generate w:pie3DChart
Access protected
Generate w:piechart
Access protected
Generate w:plotarea
Access protected
string $val
Generate w:poltVisOnly
Access protected
string $idx
Generate w:pt
Access protected
string $val
Generate w:ptcount
Access protected
string $font
Generate w:latin
Access protected
Generate w:rich
Access protected
string $val
Generate w:rotx
Access protected
string $val
Generate w:roty
Access protected
Generate w:scaling
Access protected
Generate w:ser
Access protected
string $val
Generate w:shape
Access protected
string $val
Generate w:showPercent
Access protected
Generate w:spPr
Access protected
Generate w:strcache
Access protected
Generate w:strref
Access protected
string $val
Generate w:style
Access protected
string $val
Generate w:tickLblPos
Access protected
Generate w:title
Access protected
string $nombre
Generate w:titlelayout
Access protected
Generate w:titlep
Access protected
Generate w:titleppr
Access protected
Generate w:titler
Access protected
string $font
Generate w:titlerfonts
Access protected
$lang
Generate w:titlerpr
Access protected
string $nombre
Generate w:titlet
Access protected
Generate w:titletx
Access protected
Generate w:tx
Access protected
string $idx
Generate w:v
Access protected
Generate w:val
Access protected
Generate w:valAx
Access protected
string $val
Generate w:varyColors
Access protected
Generate w:view3D
Access protected
Getter. Name
Access public
Getter. Rid
Access public
Access public
array $args[0]
Init graphic
Access public
string $name
Setter. Name
Access public
Function Parameters:
string $rId
Setter. Rid
Access public
string $xmlChart
Access public
Destruct
Access public
Access public
Class CreateHeader
[line 29]
Create header
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Create header
Access public
Access protected
Generate w:p
Access protected
Destruct
Access public
Access public
Class CreateImage
[line 29]
Create images
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateImage::CONSTWORD = 360000 [line 34] CreateImage::NAMESPACEWORD = 'wp' [line 31] CreateImage::NAMESPACEWORD1 = 'a' [line 32] CreateImage::NAMESPACEWORD2 = 'pic' [line 33] CreateImage::TAMBORDER = 12700 [line 35] Constructor void function CreateImage::__construct() [line 127]
Construct
Access public
string $comeFrom
Access public
array $args[0]
Create image
Access public
Getter. Name
Access public
Getter. Rid
Access public
array $args[0]
Init image
Access public
string $name
Setter. Name
Access public
Function Parameters:
string $rId
Setter. Rid
Access public
Destruct
Access public
Access public
Class CreateLink
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L.
(http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Access public
string $arrArgs[0] Text to add string $arrArgs[1] URL to add string $arrArgs[2] RFONTS
Create a link
Access public
string $fldCharType
Generate w:fldChar
Access protected
string $type
Generate w:hyperlink
Access protected
Generate w:instrText
Access protected
string $type
Generate w:proofErr
Access protected
Generate w:r
Access protected
string $val
Generate w:rStyle
Access protected
Access public
Access public
Access public
string $arrArgs[0]['title'] Text to add string $arrArgs[0]['link'] URL to add string $arrArgs[0]['font'] RFONTS
Access public
Destruct
Access public
Access public
Class CreateList
[line 29]
Create lists
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access public
Access public
Access public
Access public
Construct
Access public
string $list
Add list
Access protected
Access public
Create list
Access public
Access public
int $val
Generate w:ilfo
Access protected
string $val
Generate w:ilvl
Access protected
$left
Generate w:ind
Access protected
Generate w:listpr
Access protected
$current
Generate w:lvl
Access protected
Generate w:lvlJc
Access protected
$bullet
Generate w:lvlText
Access protected
Generate w:numFmt
Access protected
int $val
Generate w:numid
Access protected
Generate w:numpr
Access protected
Generate w:ppr
Access protected
string $val
Generate w:pstyle
Access protected
string $font
Generate w:rfonts
Access protected
Generate w:rpr
Access protected
Generate w:start
Access protected
array $args[0]
Init list
Access public
void function CreateList::runArray($dat, $val, $depth, [$font = '']) [line 426] Function Parameters:
Access protected
Access protected
Destruct
Access public
Access public
Class CreateMacro
[line 30]
Add a macro
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Deprecated Don't use it, included in CreateDocx.inc Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Destruct
Access public
Access public
Class CreateMath
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0
License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Access public
Access public
string $mathML
Access public
Access protected
Destruct
Access public
Access public
Class CreatePage
[line 29]
Create pages
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
Create page
Access public
array 0 args[0]
Generate section
Access public
array 0 args[0]
Create sectpr
Access public
string $type
Generate w:br
Access protected
void function CreatePage::generateCOL([$w = ''], [$space = '708']) [line 180] Function Parameters:
Generate w:col
void function CreatePage::generateCOLS([$num = ''], [$sep = ''], [$space = '708'], [$equalWidth = '']) [line 194] Function Parameters:
Generate w:cols
Access protected
string $linepitch
Generate w:docgrid
Access protected
string $type
Gnerate pagebreak
Access public
array $args[0]
Generate w:pgmar
Access protected
void function CreatePage::generatePGSZ([$w = '11906'], [$h = '16838'], [$orient = '']) [line 258] Function Parameters:
Generate w:pgsz
Access protected
string $rId
Generate w:sectionsectpr
Access protected
string $rId
Generate w:sectpr
Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu
Access protected
Generate w:titlepg
Access protected
Destruct
Access public
Access public
Class CreateProperties
[line 29]
Create properties
Package elements Version 2.2 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 2.2 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateProperties::NAMESPACECP = 'cp' [line 32] CreateProperties::NAMESPACEDC = 'dc' [line 31] CreateProperties::NAMESPACEVT = 'vt' [line 33] CreateProperties::PROPERTYID = 'D5CDD505-2E9C-101B-9397-08002B2CF9AE' [line 34] Constructor void function CreateProperties::CreateProperties($args[0]) [line 101] Function Parameters:
mixed $args[0]
Create properties
Access public
Destruct
Access public
mixed $args[0]
Create properties
Access public
mixed $args[0]
Access public
$category
Generate cp:category
Access protected
$category
Generate Company
Access protected
$creator
Generate dc:creator
Access protected
$description
Generate cp:description
Access protected
$keywords
Generate cp:keywords
Access protected
$value
Generate vt:lpwstr
Access protected
$manager
Generate Manager
Access protected
$title $pid
Generate property
Access protected
$subject
Generate dc:subject
Access protected
$title
Generate dc:title
Access protected
Destruct
Access public
Access public
Class CreateSettings
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
Generate settings
Access public
Destruct
Access public
Access public
Class CreateShape
[line 29]
Create shape
Package elements Version 2.2 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com)
Link http://www.phpdocx.com Since Class available since Release 2.2 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateShape::NAMESPACEWORDSHAPES = 'v' [line 31] Constructor void function CreateShape::__construct() [line 45]
Destruct
Access public
Create shape
Access public
string $args[0]
Generate v:line
Access protected
Destruct
Access public
Access public
Class CreateStyle
[line 31]
Create styles
Package elements Version 2.1 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
array $args[0]
Add style
Access public
array $param
Access public
string $lang
Create style
Access public
Generate w:autoredefine
Access protected
Generate w:b
Access protected
string $val
Generate w:basedon
Access protected
Generate w:bcs
Access protected
Generate w:bottom
Access protected
void function CreateStyle::generateCOLOR($val, [$themeColor = ''], [$themeShade = '']) [line 2579] Function Parameters:
Generate w:color
Access protected
Generate w:contextualspacing
Access protected
string $val
Generate w:i
Access protected
string $val
Generate w:ics
Access protected
string $val
Generate w:ilvl
Access protected
string $left
Generate w:ind
Access protected
Generate w:keeplines
Access protected
Generate w:keepnext
Access protected
string $val
Generate w:kern
Access protected
Generate w:left
Access protected
string $val
Generate w:link
Access protected
string $val
Generate w:name
Access protected
string $val
Generate w:next
Access protected
Generate w:numpr
Access protected
string $val
Generate w:outlinelvl
Access protected
Generate w:pbdr
Access protected
void function CreateStyle::generatePBDR_BOTTOM($val, $sz, $space, $color, $themeColor) [line 1837] Function Parameters:
Generate w:pbdr
Access protected
Generate w:ppr
Access protected
Generate w:qformat
Access protected
void function CreateStyle::generateRFONTS($asciiTheme, $eastAsiaTheme, $hAnsiTheme, $cstheme) [line 2453] Function Parameters:
Generate w:rfonts
Access protected
Generate w:rfonts
Access protected
Generate w:right
Access protected
Generate w:rpr
Access protected
string $val
Generate w:spacing
Access protected
string $val
Generate w:rsid
Access protected
Generate w:semihidden
Access protected
void function CreateStyle::generateSHD($val, [$color = ''], [$fill = ''], [$themeFill = ''], [$themeFillTint = '']) [line 1981]
Function Parameters:
string $val string $color string $fill string $themeFill string $themeFillTint
Generate w:shd
Access protected
void function CreateStyle::generateSPACING($before, $after, $line, $lineRule) [line 1859] Function Parameters:
Generate w:spacing
Access protected
void function CreateStyle::generateSTYLE($type, $styleId, [$default = ''], [$customStyle = '']) [line 1544] Function Parameters:
Generate w:style
Access protected
string $val
Generate w:sz
Access protected
string $val
Generate w:szcs
Access protected
string $pos
Generate w:tabcenter
Access protected
string $pos
Generate w:tabright
Access protected
Generate w:tabs
Access protected
Generate w:tblborders
Access protected
string $val string $sz string $space string $color string $themeColor string $themeTint
Generate w:bottom
Access protected
void function CreateStyle::generateTBLBORDERS_INSIDEH($val, [$sz = ''], [$space = ''], [$color = ''], [$themeColor = ''], [$themeTint = '']) [line 2272] Function Parameters:
string $val string $sz string $space string $color string $themeColor string $themeTint
Generate w:insideh
Access protected
void function CreateStyle::generateTBLBORDERS_INSIDEV($val, [$sz = ''], [$space = ''], [$color = ''], [$themeColor = ''], [$themeTint = '']) [line 2317] Function Parameters:
string $val
string $sz string $space string $color string $themeColor string $themeTint
Generate w:insidev
Access protected
void function CreateStyle::generateTBLBORDERS_LEFT($val, [$sz = ''], [$space = ''], [$color = ''], [$themeColor = ''], [$themeTint = '']) [line 2134] Function Parameters:
string $val string $sz string $space string $color string $themeColor string $themeTint
Generate w:left
Access protected
void function CreateStyle::generateTBLBORDERS_RIGHT($val, [$sz = ''], [$space = ''], [$color = ''], [$themeColor = ''], [$themeTint = '']) [line 2228] Function Parameters:
string $val string $sz string $space string $color string $themeColor string $themeTint
Generate w:right
Access protected
void function CreateStyle::generateTBLBORDERS_TOP($val, [$sz = ''], [$space = ''], [$color = ''], [$themeColor = ''], [$themeTint = '']) [line 2088] Function Parameters:
string $val string $sz string $space string $color string $themeColor string $themeTint
Generate w:top
Access protected
Generate w:tblcellmar
Access protected
Generate w:tblind
Access protected
Generate w:tblpr
Access protected
string $val
Generate w:tblstylecolbandsize
Access protected
string $val
Generate w:tblstylerowbandsize
Access protected
Generate w:tcpr
Access protected
Generate w:top
Access protected
string $val
Generate w:u
Access protected
string $val
Generate w:uipriority
Access protected
Generate w:unhidewhenused
Access protected
string $val
Generate w:vertAlign
Access protected
Destruct
Access public
Access public
Class CreateStyleTable
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
array $args[0]
Access public
void function CreateStyleTable::generateSHD($val, [$color = ''], [$fill = ''], [$themeFill = ''], [$themeFillTint = '']) [line 518] Function Parameters:
string $val string $color string $fill string $themeFill string $themeFillTint
Generate w:shd
Access protected
Generate w:tblPr
Access protected
string $type
Generate w:tblStylePr
Access protected
Generate w:tcBorders
Access protected
Generate w:tcPr
Access protected
Destruct
Access public
Access public
Class CreateTable
[line 29]
Create tables
Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
string $list
Add list
Access protected
array 0 args[0]
Create table
Access public
string $w
Generate w:gridcols
Access protected
string $val
Generate w:hmerge
string $val
Generate w:jc
Access protected
Generate w:p
Access protected
void function CreateTable::generateSHD([$val = 'horz-cross'], [$color = 'ff0000'], [$fill = ''], [$bgcolor = ''], [$themeFill = '']) [line 271] Function Parameters:
string $val string $color string $fill string $bgcolor string $themeFill
Generate w:shd
Access protected
Generate w:tbl
Access protected
Generate w:tblborders
Access protected
void function CreateTable::generateTBLBOTTOM([$val = "single"], [$sz = "4"], [$space = '0'], [$color = 'auto']) [line 306] Function Parameters:
Generate w:tblbottom
Access protected
void function CreateTable::generateTBLCELLSPACING([$w = ''], [$type = '']) [line 353] Function Parameters:
Generate w:tblcellspacing
Access protected
Generate w:tblgrid
Access protected
void function CreateTable::generateTBLINSIDEH([$val = "single"], [$sz = "4"], [$space = '0'], [$color = 'auto']) [line 388] Function Parameters:
Generate w:tblinsideh
Access protected
void function CreateTable::generateTBLINSIDEV([$val = "single"], [$sz = "4"], [$space = '0'], [$color = 'auto']) [line 410] Function Parameters:
Generate w:tblinsidev
Access protected
void function CreateTable::generateTBLLEFT([$val = "single"], [$sz = "4"], [$space = '0'], [$color = 'auto']) [line 431] Function Parameters:
Generate w:tblleft
Access protected
string $val
Generate w:tbllook
Access protected
string $val
Generate w:tbloverlap
Access protected
Generate w:tblpr
Access protected
void function CreateTable::generateTBLRIGHT([$val = 'single'], [$sz = '4'], [$space = '0'], [$color = 'auto']) [line 496] Function Parameters:
Generate w:tblright
Access protected
string $strVal
Generate w:tblstyle
Access protected
void function CreateTable::generateTBLTOP([$val = 'single'], [$sz = '4'], [$space = '0'], [$color = 'auto']) [line 517] Function Parameters:
Generate w:tbltop
Access protected
void function CreateTable::generateTBLW([$type = 'auto'], [$w = '0']) [line 536] Function Parameters:
Generate w:tblw
Access protected
Generate w:tc
Access protected
Generate w:tcpr
Access protected
void function CreateTable::generateTCW([$w = ''], [$type = 'dxa']) [line 577] Function Parameters:
Generate w:tcw
Access protected
Generate w:tr
Access protected
string $val
Generate w:trheight
Access protected
Generate w:trpr
Access protected
<type> $val
Generate w:vmerge
Destruct
Access public
Access public
Class CreateTableContents
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
string $font
Access public
void function CreateTableContents::generateFLDSIMPLE([$instr = 'TOC \o "1-4" \h \z \u'], $instr.) [line 118] Function Parameters:
as default
Generate w:fldsimple
Access protected
Destruct
Access public
Access public
Class CreateTemplate
[line 28]
Package elements Version 05.26.2011 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.7 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
string $args[0]
string $args[0]
Add relationship
Access public
Access public
Static
Access public
Merge the content, the footer and the header from two files
Access public
string $args[0]
Prepare the placeholder. Clear the wordXML code between the characters of the placeholder.
Access public
string $args[0]
Access public
mixed $args[0]. Array or string mixed $args[1] array $args[2]. Optional. Settings template
Replace variables in template. Allows text strings and array of values as variables.
Access public
string $templateSymbol
Destruct
Access public
Class CreateText
[line 29]
Create text
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Access public
Create text
Access public
Create title
Access public
int $id
Generate w:bookmarkend
Access protected
Generate w:bookmarkstart
Access protected
string $val
Generate w:color
Access protected
string $val
Generate w:i
Access protected
string $val
Generate w:jc
Access protected
string $val
Generate w:pagebreakbefore
Access protected
Generate w:ppr
Access protected
string $val
Generate w:pstyle
Access protected
$line
Generate w:spacing
Access protected
string $val
Generate w:sz
Access protected
Generate w:t
Access protected
Generate w:abs
Access protected
string $val
Generate w:u
Access protected
string $val
Generate w:widowcontrol
Access protected
string $val
Generate w:wordwrap
Access protected
array $args[0]
Init text
Access public
Destruct
Access public
Access public
Class CreateTextBox
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
CreateTextBox::NAMESPACEWORD = 'v' [line 31] Constructor void function CreateTextBox::__construct() [line 165]
Construct
Access public
Access protected
Access public
Create textbox
Access public
void function CreateTextBox::generatePATH([$gradientshapeok = 't'], [$connecttype = 'rect']) [line 393] Function Parameters:
string $gradientshapeok
string $connecttype
Generate w:path
Access protected
array $args[0]
Generate w:shape
Access protected
void function CreateTextBox::generateSHAPETYPE([$id = '_x0000_t202'], [$coordsize = '21600,21600'], [$spt = '202'], [$path = 'm,l,21600r21600,l21600,xe']) [line 356] Function Parameters:
Generate w:shapetype
Access protected
string $joinstyle
Generate w:stroke
Access protected
string $style
Generate w:textbox
Access protected
Generate w:txbxcontent
Access protected
array $args[0]
Generate w:wrap
Access protected
array $args[0]
Access public
Destruct
Access public
Access public
Class CreateTheme1
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
string $font
Create theme
Access public
Generate a:accent1
Access protected
Generate a:accent2
Access protected
Generate a:accent3
Access protected
Generate a:accent4
Access protected
Generate a:accent5
Access protected
Generate a:accent6
Access protected
string $val
Generate a:alpha
Access protected
string $w string $h
Generate a:bevelt
Access protected
Generate a:bgfillstylelst
Access protected
string $prst
Generate a:camera
Access protected
string $name
Generate a:clrscheme
Access protected
string $typeface
Generate a:cs
Access protected
Generate a:dk1
Access protected
Generate a:dk2
Access protected
string $typeface
Generate a:ea
Access protected
Generate a:effectlst
Access protected
Generate a:effectlst2
Access protected
Generate a:effectstyle
Access protected
Generate a:effectstyle2
Access protected
Generate a:effectstylest
Access protected
Generate a:extraclrschemelst
Access protected
Generate a:fillstylelst
Access protected
void function CreateTheme1::generateFILLTORECT($l, $t, $r, $b) [line 1225] Function Parameters:
Generate a:filltorect
Access protected
string $name
Generate a:fmtscheme
Access protected
Generate a:folhlink
Access protected
void function CreateTheme1::generateFONT([$script = ''], [$typeface = '']) [line 626] Function Parameters:
Generate a:font
Access protected
void function CreateTheme1::generateFONT2([$script = ''], [$typeface = '']) [line 643] Function Parameters:
Generate a:font
Access protected
void function CreateTheme1::generateFONT3([$script = ''], [$typeface = '']) [line 661] Function Parameters:
Generate a:font
Access protected
string $name
Generate a:fontschema
Access protected
string $rotWithShape
Generate a:gradfill
Access protected
string $rotWithShape
Generate a:gradfill
Access protected
string $pos
Generate a:gs
Access protected
string $pos
Generate a:gs
Access protected
Generate a:gslst
Access protected
Generate a:hlink
Access protected
string $typeface
Generate a:latin
Access protected
Generate a:lightrig
Access protected
Generate a:lin
Access protected
void function CreateTheme1::generateLN($w, $cap, $cmpd, $algn) [line 907] Function Parameters:
Generate a:ln
Access protected
void function CreateTheme1::generateLN2($w, $cap, $cmpd, $algn) [line 925] Function Parameters:
Generate a:ln
Access protected
Generate a:lnstylelst
Access protected
Generate a:lt1
Access protected
Generate a:lt2
Access protected
Generate a:mayorfont
Access protected
Generate a:minorfont
Access protected
Generate a:objectdefaults
Access protected
void function CreateTheme1::generateOUTERSHDW($blurRad, $dist, $dir, $rotWithShape) [line 1031] Function Parameters:
Generate a:outershdw
Access protected
Generate a:path
Access protected
string $val
Generate a:prstdash
Access protected
Generate a:rot
Access protected
string $val
Generate a:satmod
Access protected
Access protected
string $val
Generate a:schemeclr
Access protected
string $val
Generate a:schemeclr
Access protected
Function Parameters:
string $val
Generate a:schemeclr3
Access protected
string $val
Generate a:shade
Access protected
Generate a:solidfill
Access protected
Generate a:sp3d
Access protected
string $val
Generate a:srgbclr
Access protected
string $val
Generate a:srgbclr2
Access protected
void function CreateTheme1::generateSYSCLR([$val = 'windowText'], [$lastClr = '000000']) [line 375] Function Parameters:
Generate a:sysclr
Access protected
Generate a:themeelements
Access protected
string $val
Generate a:tint
Access protected
string $val
Generate a:tint2
Access protected
Destruct
Access public
Access public
Class CreateWebSettings
[line 29]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
Access public
Destruct
Access public
Access public
Class CreateXlsx
[line 28]
Create XLSX
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Access protected
Add sheet
Access protected
Add table
Access protected
Create XLSX
Access public
Destruct
Access public
Access public
Class EmbedDocument
[line 30]
Package elements Version 23.05.2011 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Interface available since Release 2.3 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Abstract Element
Generate w:altChunk.
Abstract Element
Abstract Element
Class EmbedDOCX
[line 30]
Package elements Version 05.24.2011 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 2.3 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
Access public
Generate w:altChunk
Access public
Access public
Destruct
Access public
Access public
Class EmbedHTML
[line 30]
Package elements Version 05.24.2011 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 2.3 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
Access public
Generate w:altChunk
Access public
Access public
Destruct
Access public
Access public
Class EmbedRTF
[line 30]
Package elements Version 05.24.2011 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 2.3 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access protected
Construct
Access public
Access public
Generate w:altChunk
Access public
Access public
Destruct
Access public
Access public
Class TransformDoc
[line 33]
Package elements Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
$path
Access public
Clean HTML
Access public
Access public
Access public
Access public
Getter. File
Access public
Access public
Getter. XHTML
Access public
$file
Setter. File
Access public
string $outputFile
Access public
$strXHTML
Setter. XHTML
Access public
Access public
Destruct
Access public
CreateFactory.inc
Simple factory
Package factory Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Class CreateFactory
[line 28]
Package factory Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Create an object
GenerateDocx.inc
Check for a valid license
Package license Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Class GenerateDocx
[line 28]
Package license Version 1.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
AutoLoader.inc
Autoloader
Package loader Version 2.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 2.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Class AutoLoader
[line 28]
Autoloader
Package loader Version 2.0 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 2.0 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Parser.inc
Parse DOCX file
Package parser Version 2.3 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 2.3 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Class Parser
[line 28]
Package parser Version 2.3 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 2.3 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Access public
Getter. XHTML
Access public
Merge WordML into a DOCX. WordML is added at the end of the document
Access public
Destruct
Access public
Access public
HTML2DOCX.inc
Transform HTML to DOCX
Package transform Version 2.2 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since File available since Release 1.5 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Class HTML2DOCX
[line 35]
Package transform Version 2.2 Copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L. (http://www.2mdc.com) Link http://www.phpdocx.com Since Class available since Release 1.5 License http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
Construct
Access public
Create DOCX
Access public
Generate XML
Access public
Getter. CSS
Access public
Access public
Getter. HTML
Access public
Access public
string $css
Setter. CSS
Access public
string $fileName
Access public
string $html
Setter. HTML
Access public
Destruct
Access public
Appendices
CreateElement
CreateElement CreateChartRels CreateEmbeddedElement CreateEndnote CreateExcelSharedStrings CreateExcelSheet CreateExcelTable CreateFontTable CreateFooter CreateFootnote CreateGraphic CreateHeader CreateImage CreateLink CreateList CreateMacro CreateMath CreatePage CreateProperties CreateSettings CreateShape CreateStyle CreateStyleTable CreateTable CreateTableContents CreateText CreateTextBox CreateTheme1 CreateWebSettings EmbedDOCX EmbedHTML EmbedRTF
CreateTemplate
CreateTemplate
CreateXlsx
CreateXlsx
EmbedDocument
EmbedDocument
TransformDoc
TransformDoc
Package factory
CreateFactory
CreateFactory
Package license
GenerateDocx
GenerateDocx
Package debug
Debug
Debug
Package create
CreateDocument
CreateDocument CreateDocx
Package loader
AutoLoader
AutoLoader
Package parser
Parser
Parser
Package transform
HTML2DOCX
HTML2DOCX
Index
A
AutoLoader::loadPDF() AutoLoader::load() Main tags of relationships XML AutoLoader Autoloader AutoLoader.inc Autoloader 366 366 366 365
C
CreateStyle::generateCOLOR() Generate w:color CreateStyle::generateBOTTOM() Generate w:bottom CreateStyle::generateCONTEXTUALSPACING() Generate w:contextualspacing CreateStyle::generateI() Generate w:i CreateStyle::generateICS() Generate w:ics CreateStyle::generateBCS() Generate w:bcs CreateStyle::generateBASEDON() Generate w:basedon CreateStyle::addStyleTabla() Add table style CreateStyle::addStyle() Add style CreateStyle::createStyle() Create style CreateStyle::generateAUTOREDEFINE() Generate w:autoredefine CreateStyle::generateB() Generate w:b CreateStyle::generateILVL() Generate w:ilvl CreateStyle::generateIND() Generate w:ind CreateStyle::generateNUMPR() Generate w:numpr CreateStyle::generateNEXT() Generate w:next CreateStyle::generateOUTLINELVL() 266 265 266 266 266 265 265 263 263 264 264 264 267 267 270 269 270
Generate w:outlinelvl CreateStyle::generatePBDR() Generate w:pbdr CreateStyle::generatePBDR_BOTTOM() Generate w:pbdr CreateStyle::generateNAME() Generate w:name CreateStyle::generateLINK() Generate w:link CreateStyle::generateKEEPLINES() Generate w:keeplines CreateStyle::generateKEEPNEXT() Generate w:keepnext CreateStyle::generateKERN() Generate w:kern CreateStyle::generateLEFT() Generate w:left constructor CreateStyle::__construct() Construct CreateStyle::$_xml CreateProperties::__toString() Magic method, returns current XML CreateProperties::__destruct() Destruct CreateSettings Create default settings CreateSettings::$_xml constructor CreateSettings::__construct() Construct CreateProperties::getInstance() Singleton, return instance of class CreateProperties::generateTITLE() Generate dc:title CreateProperties::generateLPWSTR() Generate vt:lpwstr CreateProperties::generateMANAGER() Generate Manager CreateProperties::generatePROPERTY() Generate property CreateProperties::generateSUBJECT() Generate dc:subject CreateSettings::generateSettings() Generate settings CreateSettings::getInstance() Singleton, return instance of class CreateShape::getInstance() Singleton, return instance of class CreateShape::generateLINE() Generate v:line CreateShape::__destruct() Destruct CreateShape::__toString() Magic method, returns current XML
270 270 269 269 267 268 268 268 263 263 258 258 259 259 259 258 257 256 256 257 257 259 260 262 261 262 262
CreateStyle Create styles CreateShape::createShape() Create shape constructor CreateShape::__construct() Destruct CreateSettings::__destruct() Destruct CreateSettings::__toString() Magic method, returns current XML CreateShape Create shape CreateShape::NAMESPACEWORDSHAPES CreateStyle::generatePPR() Generate w:ppr CreateStyle::generateQFORMAT() Generate w:qformat CreateStyle::getInstance() CreateStyle::generateVERTALIGN() Generate w:vertAlign CreateStyle::__destruct() Destruct CreateStyle::__toString() CreateStyleTable Create style table CreateStyle::generateUNHIDEWHENUSED() Generate w:unhidewhenused CreateStyle::generateUIPRIORITY() Generate w:uipriority CreateStyle::generateTBLSTYLEROWBANDSIZE() Generate w:tblstylerowbandsize CreateStyle::generateTCPR() Generate w:tcpr CreateStyle::generateTOP() Generate w:top CreateStyle::generateU() Generate w:u CreateStyleTable::$_xml constructor CreateStyleTable::__construct() Construct CreateStyleTable::__destruct() Destruct CreateStyleTable::getInstance() CreateStyleTable::__toString() CreateTable Create tables constructor CreateTable::__construct() Construct CreateStyleTable::generateTCPR() Generate w:tcPr CreateStyleTable::generateTCBORDERS() Generate w:tcBorders CreateStyleTable::addStyleTable()
262 261 261 260 260 260 261 271 271 283 282 283 283 283 282 282 280 281 281 281 284 284 286 286 286 286 287 285 285 284
Add table style CreateStyleTable::generateSHD() Generate w:shd CreateStyleTable::generateTBLPR() Generate w:tblPr CreateStyleTable::generateTBLSTYLEPR() Generate w:tblStylePr CreateStyle::generateTBLSTYLECOLBANDSIZE() Generate w:tblstylecolbandsize CreateStyle::generateTBLPR() Generate w:tblpr CreateStyle::generateSHD() Generate w:shd CreateStyle::generateSEMIHIDDEN() Generate w:semihidden CreateStyle::generateSPACING() Generate w:spacing CreateStyle::generateSTYLE() Generate w:style CreateStyle::generateSZ() Generate w:sz CreateStyle::generateRSID() Generate w:rsid CreateStyle::generateRPR_SPACING() Generate w:spacing CreateStyle::generateRFONTS() Generate w:rfonts CreateStyle::generateRFONTS2() Generate w:rfonts CreateStyle::generateRIGHT() Generate w:right CreateStyle::generateRPR() Generate w:rpr CreateStyle::generateSZCS() Generate w:szcs CreateStyle::generateTABCENTER() Generate w:tabcenter CreateStyle::generateTBLBORDERS_RIGHT() Generate w:right CreateStyle::generateTBLBORDERS_LEFT() Generate w:left CreateStyle::generateTBLBORDERS_TOP() Generate w:top CreateStyle::generateTBLCELLMAR() Generate w:tblcellmar CreateStyle::generateTBLIND() Generate w:tblind CreateStyle::generateTBLBORDERS_INSIDEV() Generate w:insidev CreateStyle::generateTBLBORDERS_INSIDEH() Generate w:insideh CreateStyle::generateTABRIGHT() Generate w:tabright
284 285 285 280 280 273 273 274 274 275 273 273 271 272 272 272 275 275 278 278 279 279 279 277 277 276
CreateStyle::generateTABS() Generate w:tabs CreateStyle::generateTBLBORDERS() Generate w:tblborders CreateStyle::generateTBLBORDERS_BOTTOM() Generate w:bottom CreateProperties::generateKEYWORDS() Generate cp:keywords CreateProperties::generateDESCRIPTION() Generate cp:description CreateList::createEmbeddedList() Create embedded list CreateList::addList() Add list CreateList::createList() Create list CreateList::createListStyles() Recursive generation of lists styles CreateList::generateILFO() Generate w:ilfo constructor CreateList::__construct() Construct CreateList::$val CreateList::MAXDEPTH CreateList Create lists CreateList::$data CreateList::$font CreateList::$list CreateList::generateILVL() Generate w:ilvl CreateList::generateIND() Generate w:ind CreateList::generatePPRS() Generate w:ppr CreateList::generateNUMPR() Generate w:numpr CreateList::generatePSTYLE() Generate w:pstyle CreateList::generateRFONTSTYLE() Generate w:rfonts CreateList::generateRPRS() Generate w:rpr CreateList::generateNUMID() Generate w:numid CreateList::generateNUMFMT() Generate w:numFmt CreateList::generateLISTPR() Generate w:listpr CreateList::generateLVL() Generate w:lvl CreateList::generateLVLJC() Generate w:lvlJc
276 276 277 256 255 236 236 236 237 237 235 235 235 234 235 235 235 237 238 240 240 240 240 241 239 239 238 238 238
CreateList::generateLVLTEXT() Generate w:lvlText CreateLink::__toString() Magic method, returns current XML CreateLink::__destruct() Destruct CreateImage::__destruct() Destruct CreateImage::setRId() Setter. Rid CreateImage::__toString() CreateLink Create links using text strings constructor CreateLink::__construct() Construct CreateImage::setName() Setter. Name CreateImage::initImage() Init image CreateImage::createImage() Create image CreateImage::getInstance() CreateImage::getName() Getter. Name CreateImage::getRId() Getter. Rid CreateLink::createEmbeddedLink() Create an embedded link to add in others elements like lists, tables... CreateLink::createLink() Create a link CreateLink::getInstance() Singleton, return instance of class CreateLink::getFont() Getter. Access to font var CreateLink::getLink() Getter. Access to link var CreateLink::getTitle() Getter. Access to title var CreateLink::initLink() Init a link to assign values to variables CreateLink::generateRSTYLE() Generate w:rStyle CreateLink::generateR() Generate w:r CreateLink::generateFLDCHAR() Generate w:fldChar CreateLink::generateHYPERLINK() Generate w:hyperlink CreateLink::generateINSTRTEXT() Generate w:instrText CreateLink::generatePROOFERR() Generate w:proofErr CreateList::generateSTART()
239 234 234 229 228 229 229 230 228 228 227 227 227 228 230 230 233 232 233 233 233 232 232 230 231 231 232 241
Generate w:start CreateList::getInstance() CreatePage::generateSECTPR() Generate w:sectpr CreatePage::generateSECTIONSECTPR() Generate w:sectionsectpr CreatePage::generateTITLEPG() Generate w:titlepg CreatePage::getInstance() CreatePage::__destruct() Destruct CreatePage::generatePGSZ() Generate w:pgsz CreatePage::generatePGMAR() Generate w:pgmar CreatePage::generateCOL() Generate w:col CreatePage::generateCOLS() Generate w:cols CreatePage::generateDOCGRID() Generate w:docgrid CreatePage::generatePageBreak() Gnerate pagebreak CreatePage::__toString() CreateProperties Create properties CreateProperties::createPropertiesCustom() Create custom properties CreateProperties::createPropertiesApp() Create properties CreateProperties::generateCATEGORY() Generate cp:category CreateProperties::generateCOMPANY() Generate Company CreateProperties::generateCREATOR() Generate dc:creator constructor CreateProperties::__construct() Destruct constructor CreateProperties::CreateProperties() Create properties CreateProperties::NAMESPACECP CreateProperties::NAMESPACEDC CreateProperties::NAMESPACEVT CreateProperties::PROPERTYID CreatePage::generateBR() Generate w:br CreatePage::createSECTPR() Create sectpr CreateMacro::getInstance() Singleton, return instance of class constructor CreateMacro::__construct() Construct CreateMacro::__destruct()
241 251 251 252 252 252 251 250 249 249 250 250 252 253 254 254 254 255 255 253 253 253 253 253 253 248 248 243 243 244
Destruct CreateMacro::__toString() Magic method, returns current XML CreateMath Add a math eq. Using OOMML or MathML CreateMacro Add a macro CreateList::__toString() CreateList::initList() Init list CreateList::runArray() Recursive generation of lists CreateList::runArrayEmbedded() Recursive generation of embedded lists CreateList::__destruct() Destruct constructor CreateMath::__construct() Construct CreateMath::createMath() Generate a new MathML eq CreatePage::$_xml CreatePage Create pages constructor CreatePage::__construct() Construct CreatePage::createPage() Create page CreatePage::createSection() Generate section CreateMath::__toString() Magic method, returns current MathML CreateMath::__destruct() Destruct CreateMath::getInstance() Singleton, return instance of class CreateMath::getMathXML() Getter. Access to mathXML var CreateMath::setMathXML() Getter. Access to mathXML var CreateMath::transformMath() Transform a MathML eq using XSL CreateTable::addList() Add list CreateTable::createTable() Create table CreateTheme1::generateFILLTORECT() Generate a:filltorect CreateTheme1::generateFILLSTYLELST() Generate a:fillstylelst CreateTheme1::generateFMTSCHEME() Generate a:fmtscheme CreateTheme1::generateFOLHLINK() Generate a:folhlink
244 244 243 243 241 242 242 242 245 245 247 247 247 248 248 246 246 245 245 246 246 287 287 328 327 328 328
CreateTheme1::generateFONT() Generate a:font CreateTheme1::generateEXTRACLRSCHEMELST() Generate a:extraclrschemelst CreateTheme1::generateEFFECTSTYLELST() Generate a:effectstylest CreateTheme1::generateEFFECTLST() Generate a:effectlst CreateTheme1::generateEA() Generate a:ea CreateTheme1::generateEFFECTLST2() Generate a:effectlst2 CreateTheme1::generateEFFECTSTYLE() Generate a:effectstyle CreateTheme1::generateEFFECTSTYLE2() Generate a:effectstyle2 CreateTheme1::generateFONT2() Generate a:font CreateTheme1::generateFONT3() Generate a:font CreateTheme1::generateLATIN() Generate a:latin CreateTheme1::generateHLINK() Generate a:hlink CreateTheme1::generateLIGHTRIG() Generate a:lightrig CreateTheme1::generateLIN() Generate a:lin CreateTheme1::generateLN() Generate a:ln CreateTheme1::generateGSLST() Generate a:gslst CreateTheme1::generateGS2() Generate a:gs CreateTheme1::generateFONTSCHEMA() Generate a:fontschema CreateTheme1::generateGRADFILL() Generate a:gradfill CreateTheme1::generateGRADFILL2() Generate a:gradfill CreateTheme1::generateGS() Generate a:gs CreateTheme1::generateDK2() Generate a:dk2 CreateTheme1::generateDK1() Generate a:dk1 CreateTheme1 CreateTextBox::__toString() Magic method, returns current XML CreateTheme1::NAMESPACEWORD CreateTheme1::$_xml constructor CreateTheme1::__construct() Construct
328 327 327 326 326 326 326 327 329 329 332 331 332 332 333 331 331 330 330 330 331 325 325 321 321 321 321 321
CreateTextBox::__destruct() Destruct CreateTextBox::initTextBox() Init text box CreateTextBox::generateTEXTBOX() Generate w:textbox CreateTextBox::generateTXBXCONTENT() Generate w:txbxcontent CreateTextBox::generateWRAP() Generate w:wrap CreateTextBox::getInstance() Singleton, return instance of class CreateTheme1::createTheme() Create theme CreateTheme1::generateACCENT1() Generate a:accent1 CreateTheme1::generateBGFILLSTYLELST() Generate a:bgfillstylelst CreateTheme1::generateBEVELT() Generate a:bevelt CreateTheme1::generateCAMERA() Generate a:camera CreateTheme1::generateCLRSCHEME() Generate a:clrscheme CreateTheme1::generateCS() Generate a:cs CreateTheme1::generateALPHA() Generate a:alpha CreateTheme1::generateACCENT6() Generate a:accent6 CreateTheme1::generateACCENT2() Generate a:accent2 CreateTheme1::generateACCENT3() Generate a:accent3 CreateTheme1::generateACCENT4() Generate a:accent4 CreateTheme1::generateACCENT5() Generate a:accent5 CreateTheme1::generateLN2() Generate a:ln CreateTheme1::generateLNSTYLELST() Generate a:lnstylelst CreateXlsx Create XLSX CreateWebSettings::__toString() Magic method, returns current XML constructor CreateXlsx::__construct() Construct CreateXlsx::addSharedStrings() Add shared strings CreateXlsx::addSheet() Add sheet CreateWebSettings::__destruct()
320 320 319 319 319 320 322 322 324 324 324 325 325 323 323 322 322 323 323 333 334 343 343 343 344 344 342
Destruct CreateWebSettings::getInstance() Singleton, return instance of class CreateWebSettings Create default websettings XML CreateWebSettings::$_xml constructor CreateWebSettings::__construct() Construct CreateWebSettings::generateWebSettings() Main tags of websettings XML CreateXlsx::addTable() Add table CreateXlsx::createXlsx() Create XLSX CreateFactory.inc Simple factory constructor TransformDoc::__construct() Construct CreateFactory Simple factory, creates objects to add in other elements CreateFactory::createObject() Create an object constructor HTML2DOCX::__construct() Construct constructor EmbedRTF::__construct() Construct constructor EmbedHTML::__construct() Construct CreateXlsx::getInstance() CreateXlsx::__destruct() Destruct CreateXlsx::__toString() constructor EmbedDOCX::__construct() Construct CreateTheme1::__toString() CreateTheme1::__destruct() Destruct CreateTheme1::generatePRSTDASH() Generate a:prstdash CreateTheme1::generatePATH() Generate a:path CreateTheme1::generateROT() Generate a:rot CreateTheme1::generateSATMOD() Generate a:satmod CreateTheme1::generateSCENE3D() CreateTheme1::generateOUTERSHDW() Generate a:outershdw CreateTheme1::generateOBJECTDEFAULTS() Generate a:objectdefaults CreateTheme1::generateLT1() Generate a:lt1 CreateTheme1::generateLT2()
342 341 342 342 342 344 345 359 354 360 360 375 351 349 345 345 345 347 341 341 336 335 336 336 337 335 335 334 334
Generate a:lt2 CreateTheme1::generateMAYORFONT() Generate a:mayorfont CreateTheme1::generateMINORFONT() Generate a:minorfont CreateTheme1::generateSCHEMECLR() Generate a:schemeclr CreateTheme1::generateSCHEMECLR2() Generate a:schemeclr CreateTheme1::generateTHEMEELEMENTS() Generate a:themeelements CreateTheme1::generateSYSCLR() Generate a:sysclr CreateTheme1::generateTINT() Generate a:tint CreateTheme1::generateTINT2() Generate a:tint2 CreateTheme1::getInstance() CreateTheme1::generateSRGBCLR2() Generate a:srgbclr2 CreateTheme1::generateSRGBCLR() Generate a:srgbclr CreateTheme1::generateSCHEMECLR3() Generate a:schemeclr3 CreateTheme1::generateSHADE() Generate a:shade CreateTheme1::generateSOLIDFILL() Generate a:solidfill CreateTheme1::generateSP3D() Generate a:sp3d CreateTextBox::generateSTROKE() Generate w:stroke CreateTextBox::generateSHAPETYPE() Generate w:shapetype CreateTableContents::createTableContents() Create table of contents constructor CreateTableContents::__construct() Construct CreateTableContents::generateFLDSIMPLE() Generate w:fldsimple CreateTableContents::getInstance() CreateTableContents::__destruct() Destruct CreateTableContents::$_xml CreateTableContents Create table of contents CreateTable::generateVMERGE() Generate w:vmerge CreateTable::getInstance() CreateTable::__destruct() Destruct CreateTable::__toString() CreateTableContents::__toString()
334 334 337 337 340 339 340 340 341 339 339 337 338 338 338 319 318 298 297 298 298 299 297 297 296 296 296 297 299
Magic method, returns current XML CreateTemplate Use DOCX as templates CreateTemplate::addRelationship() Add relationship CreateTemplate::addContentTypes() Add content types CreateTemplate::deleteAllBlocks() clear all the placeholders which start with 'BLOCK_' CreateTemplate::deleteBlock() Clear a specific placeholder which starts with 'BLOCK_' CreateTemplate::getBlnTemplate() Check if DOCX is a template constructor CreateTemplate::__construct() Construct CreateTemplate::$totalTemplateCharts CreateTemplate::$embedFiles CreateTemplate::$path CreateTemplate::$placeholderImages CreateTemplate::$ridInitTemplateCharts CreateTable::generateTRPR() Generate w:trpr CreateTable::generateTRHEIGHT() Generate w:trheight CreateTable::generateTBLBOTTOM() Generate w:tblbottom CreateTable::generateTBLBORDERS() Generate w:tblborders CreateTable::generateTBLCELLSPACING() Generate w:tblcellspacing CreateTable::generateTBLGRID() Generate w:tblgrid CreateTable::generateTBLINSIDEH() Generate w:tblinsideh CreateTable::generateTBL() Generate w:tbl CreateTable::generateSHD() Generate w:shd CreateTable::generateGRIDCOLS() Generate w:gridcols CreateTable::generateHMERGE() Generate w:hmerge CreateTable::generateJC() Generate w:jc CreateTable::generateP() Generate w:p CreateTable::generateTBLINSIDEV() Generate w:tblinsidev CreateTable::generateTBLLEFT() Generate w:tblleft CreateTable::generateTC() Generate w:tc CreateTable::generateTBLW()
299 301 301 301 302 302 301 300 299 300 300 300 296 295 290 289 290 290 291 289 289 288 288 288 289 291 292 294 294
Generate w:tblw CreateTable::generateTCPR() Generate w:tcpr CreateTable::generateTCW() Generate w:tcw CreateTable::generateTR() Generate w:tr CreateTable::generateTBLTOP() Generate w:tbltop CreateTable::generateTBLSTYLE() Generate w:tblstyle CreateTable::generateTBLLOOK() Generate w:tbllook CreateTable::generateTBLOVERLAP() Generate w:tbloverlap CreateTable::generateTBLPR() Generate w:tblpr CreateTable::generateTBLRIGHT() Generate w:tblright CreateTemplate::getContentTypes() Return current content types CreateTemplate::getDocument() Return current document word CreateText::generateT() Generate w:t CreateText::generateSZ() Generate w:sz CreateText::generateTABS() Generate w:abs CreateText::generateU() Generate w:u CreateText::generateWIDOWCONTROL() Generate w:widowcontrol CreateText::generateSPACING() Generate w:spacing CreateText::generatePSTYLE() Generate w:pstyle CreateText::generateI() Generate w:i CreateText::generateJC() Generate w:jc CreateText::generatePAGEBREAKBEFORE() Generate w:pagebreakbefore CreateText::generatePPR() Generate w:ppr CreateText::generateWORDWRAP() Generate w:wordwrap CreateText::getInstance() Singleton, return instance of class CreateTextBox::createEmbeddedTextBox() Create embedded textbox CreateTextBox::addText() Create text in textbox
295 295 295 294 293 292 292 293 293 302 302 313 313 314 314 314 312 312 311 311 312 312 314 315 317 316
CreateTextBox::createTextBox() 317 Create textbox CreateTextBox::generatePATH() 317 Generate w:path CreateTextBox::generateSHAPE() 318 Generate w:shape constructor CreateTextBox::__construct() 316 Construct CreateTextBox::NAMESPACEWORD 316 CreateText::initText() 315 Init text CreateText::__destruct() 315 Destruct CreateText::__toString() 316 Magic method, returns current XML CreateTextBox 316 Create text box CreateText::generateCOLOR() 311 Generate w:color CreateText::generateBOOKMARKSTART() 310 Generate w:bookmarkstart CreateTemplate::parseBlock() 305 Prepare the placeholder. Clear the wordXML code between the characters of the placeholder. CreateTemplate::openTemplate() 304 Open current template CreateTemplate::replaceChart() 305 Replace chart in template CreateTemplate::replaceCheckbox() 305 Replace a placeholder with a checkbox CreateTemplate::replaceImage() 306 Replace image in template CreateTemplate::mergeFiles() 304 Merge the content, the footer and the header from two files CreateTemplate::getTemplateSymbol() 304 Getter. Return template symbol CreateTemplate::getFooter() 303 Return current document footer CreateTemplate::getHeader() 303 Return current document header CreateTemplate::getInstance() 303 CreateTemplate::getRelsDocumentXMLRels() 303 Return current rels document xml rels CreateTemplate::replaceImages() 306 Replace images in template CreateTemplate::replaceVariable() 306 Replace variables in template. CreateText::createEmbeddedText() 309 Create embedded text constructor CreateText::__construct() 309 Construct CreateText::createText() 309 Create text CreateText::createTitle() 309
Create title CreateText::generateBOOKMARKEND() Generate w:bookmarkend CreateText::IDTITLE CreateText Create text CreateTemplate::replaceVariableChart() Replace variable char in template CreateTemplate::returnVariables() Return template variables CreateTemplate::setTemplateSymbol() Setter. Set template symbol CreateTemplate::__destruct() Destruct CreateImage::createEmbeddedImage() Create embedded image constructor CreateImage::__construct() Construct CreateElement::NAMESPACEWORD CreateElement::MATHNAMESPACEWORD CreateElement::$_xml constructor CreateElement::__construct() Construct CreateElement::cleanTemplate() Delete pending tags CreateElement Main class, create tag elements CreateChartRels::__toString() Magic method, returns current XML CreateChartRels::generateRELATIONSHIP() New relationship, added to relationships XML CreateChartRels::createRelationship() Create relationship document to use in DOCX file CreateChartRels::generateRELATIONSHIPS() Main tags of relationships XML CreateChartRels::getInstance() Singleton, return instance of class CreateChartRels::__destruct() Destruct CreateElement::cleanTemplateFirstRPR() Delete first w:rpr CreateElement::generateANCHOR() Generate w:anchor CreateElement::generateCNVPR() Generate w:cnvpr CreateElement::generateCNVPICPR() Generate w:cnvpicpr CreateElement::generateDOCPR() Generate w:docpr CreateElement::generateDRAWING() Generate w:drawing CreateElement::generateEFFECTEXTENT() Generate w:effectextent
310 308 308 307 307 307 308 227 226 149 149 149 149 149 148 148 147 147 147 148 148 149 150 152 152 152 153 153
CreateElement::generateCNVGRAPHICFRAMEPR() Generate w:cnvgraphicframepr CreateElement::generateBLIPFILL() Generate w:blipfill CreateElement::generateAVLST() Generate w:avlst CreateElement::generateB() Generate w:b CreateElement::generateBCS() Generate w:bcs CreateElement::generateBLIP() Generate w:blip constructor CreateChartRels::__construct() Construct CreateChartRels::$_xml CreateMacro.inc Add a macro CreateList.inc Create lists CreateMath.inc Add a math eq CreatePage.inc Create pages CreateProperties.inc Create properties CreateLink.inc Create links using text strings CreateImage.inc Create images CreateFooter.inc Create footer CreateFootnote.inc Create footnote CreateGraphic.inc Create graphics (charts) CreateHeader.inc Create header CreateSettings.inc Create default settings CreateShape.inc Create shape CreateTheme1.inc CreateTextBox.inc Create text box CreateWebSettings.inc Create default websettings XML CreateXlsx.inc Create XLSX CreateChartRels Create relationships used by images, charts... CreateText.inc Create text CreateTemplate.inc
151 151 150 150 151 151 146 146 125 124 126 127 128 123 122 118 119 120 121 129 130 138 137 139 140 146 136 135
Use DOCX as templates CreateStyle.inc Create styles CreateStyleTable.inc Create style table CreateTable.inc Create tables CreateTableContents.inc Create table of contents CreateElement::generateEXT() Generate w:ext CreateElement::generateEXTENT() Generate w:extent CreateElement::generateWRAPNONE() Generate w:wrapnone CreateElement::generateT() Generate w:t CreateElement::generateWRAPPOLYGON() Generate w:wrappolygon CreateElement::generateWRAPSQUARE() Generate w:wrapsquare CreateElement::generateWRAPTHROUGH() Generate w:wrapthrough CreateElement::generateSTRETCH() Generate w:stretch CreateElement::generateSTART() Generate w:start CreateElement::generateSCHEMECLR() Generate w:schemeclr CreateElement::generateSIMPLEPOS() Generate w:simplepos CreateElement::generateSOLIDFILL() Generate w:solidfill CreateElement::generateSPPR() Generate w:sppr CreateElement::generateWRAPTOPANDBOTTOM() Generate w:wraptopandbottom CreateElement::generateXFRM() Generate w:xfrm CreateEndnote Create endnotes CreateEmbeddedElement::__toString() CreateEndnote::$init constructor CreateEndnote::__construct() Construct CreateEndnote::createDocumentEndnote() Create document endnote CreateEmbeddedElement::getInstance() constructor CreateEmbeddedElement::CreateEmbeddedElement() Create embedded element CreateElement::__destruct() Destruct CreateElement::__toString()
131 132 133 134 153 154 164 164 164 164 165 163 163 162 162 163 163 165 165 167 167 168 168 168 167 167 166 166
CreateEmbeddedElement Create embedded elements constructor CreateEmbeddedElement::__construct() Construct CreateElement::generateRSTYLE() Generate w:rstyle CreateElement::generateRPR() Generate w:rpr CreateElement::generateLN() Generate w:ln CreateElement::generateLINETO() Generate w:lineto CreateElement::generateNOPROOF() Generate w:noproof CreateElement::generateNVPICPR() Generate w:nvpicpr CreateElement::generateOFF() Generate w:off CreateElement::generateJC() Generate w:jc CreateElement::generateINLINE() Generate w:inline CreateElement::generateFILLRECT() Generate w:fillrect CreateElement::generateGRAPHIC() Generate w:graphic CreateElement::generateGRAPHICDATA() Generate w:graphicdata CreateElement::generateGRAPHICPRAMELOCKS() Generate w:graphicpframelocks CreateElement::generateP() Generate w:p CreateElement::generatePIC() Generate w:pic CreateElement::generatePSTYLE() Generate w:pstyle CreateElement::generatePRSTGEOM() Generate w:prstgeom CreateElement::generateQUITAR() Generate w:r CreateElement::generateR() Generate w:r CreateElement::generateRFONTS() Generate w:rfonts CreateElement::generatePRSTDASH() Generate w:prstdash CreateElement::generatePPR() Generate w:ppr CreateElement::generatePICT() Generate w:pict CreateElement::generatePOSITIONH() Generate w:positionh CreateElement::generatePOSITIONV()
166 166 162 161 156 156 157 157 157 156 155 154 154 155 155 157 158 160 160 161 161 161 159 159 158 158 159
Generate w:positionv CreateElement::generatePOSOFFSET() Generate w:posoffset CreateFontTable.inc Create font table CreateExcelTable.inc Create excel table CreateDocx::addSection() Add a section CreateDocx::addRTF() Add a RTF file. Keep content and styles. CreateDocx::addShape() Add a shape CreateDocx::addTable() Add a table. CreateDocx::addTableContents() Add a table of contents (TOC) CreateDocx::addRawWordML() Add a raw WordML CreateDocx::addProperties() Add properties to document CreateDocx::addMathDocx() Convert a math eq to DOCX CreateDocx::addMacroFromDoc() Add a macro from a DOC CreateDocx::addMathEq() Add an existing math eq to DOCX CreateDocx::addMathMML() Convert a math MML eq to DOCX CreateDocx::addObject() Add an existing object (XLS or PPTX) CreateDocx::addTemplate() Add a DOCX file as a template CreateDocx::addTemplateChart() Replace a variable with a chart. CreateDocx::createDocx() Generate a new DOCX file CreateDocx::clearBlocks() Clear all blocks CreateDocx::createDocxAndDownload() Generate and download a new DOCX file CreateDocx::deleteTemplateBlock() Delete a block CreateDocx::disableDebug() Disable debug mode CreateDocx::addTitle() Add a title CreateDocx::addTextBox() Add a textbox CreateDocx::addTemplateCheckBox() Replace a variable with a checkbox. CreateDocx::addTemplateImage() Replace a variable image template with a new image.
CreateDocx::addTemplateVariable() Replace a variable with a text, HTML, DOCX, RTF. CreateDocx::addText() Add a text CreateDocx::addList() Add a list CreateDocx::addLink() Add a link CreateDocx::$graphicTemplate CreateDocx::$fileGraphicTemplate CreateDocx::$intIdWord CreateDocx::$log constructor CreateDocx::__construct() Construct CreateDocx::SCHEMA_OFFICEDOCUMENT CreateDocx::SCHEMA_IMAGEDOCUMENT CreateDocx.inc Generate a DOCX file CreateDocument Abstract class used for creating documents CreateDocx Main class. Methods and vars to generate a DOCX file CreateDocx::NAMESPACEWORD CreateDocx::addBreak() Add a break CreateDocx::addDOCX() Merge DOCX. Keep content and styles. CreateDocx::addGraphicTemplate() Add a graphic template. Replace placeholder with a graphic CreateDocx::addGraphicImg() Add a graphic image CreateDocx::addHeader() Add a header. CreateDocx::addHTML() Add HTML to the document. Transform HTML to DOCX. CreateDocx::addImage() Add an image CreateDocx::addGraphic() Add a graphic CreateDocx::addFootnote() Add a footnote CreateDocx::addElement() Add an element to embedd in other elements CreateDocx::addEndnote() Add an endnote CreateDocx::addFont() Add a new font CreateDocx::addFooter() Add a footer CreateDocx::enableDebug() Enable debug mode CreateDocx::getTemplateVariables() Return template variables (placeholders)
69 70 48 44 5 5 5 6 6 5 5 3 4 4 5 6 13 35 34 35 40 42 26 24 14 17 18 19 90 90
CreateDocx::setXmlWordFontTable() Setter CreateDocx::setXmlWordEndnotes() Setter CreateDocx::setXmlWordFooter1() Setter CreateDocx::setXmlWordHeader1() Setter CreateDocx::setXmlWordRelsDocumentRels() Setter CreateDocx::setXmlWordDocumentStyles() Setter CreateDocx::setXmlWordDocument() Setter CreateDocx::setXmlDocPropsApp() Setter CreateDocx::setXmlDocPropsCore() Setter CreateDocx::setXmlDocPropsCustom() Setter CreateDocx::setXmlRelsRels() Setter CreateDocx::setXmlWordSettings() Setter CreateDocx::setXmlWordStyles() Setter CreateEmbeddedElement.inc Create embedded elements CreateElement.inc Create tag elements CreateEndnote.inc Create endnotes CreateExcelSharedStrings.inc Generate excel shared strings CreateExcelSheet.inc Create excel sheet CreateChartRels.inc Create relationships used by images, charts... constructor Debug::__construct() Construct CreateDocx::setXmlWordThemeTheme1() Setter CreateDocx::setXmlWordWebSettings() Setter CreateDocx::__destruct() Destruct CreateDocx::__toString() Magic method, returns current word XML CreateDocx::setXmlContentTypes() Setter CreateDocx::setTemporaryDirectory() Setter CreateDocx::getXmlWordDocumentStyles()
99 99 100 100 100 98 98 97 97 97 98 101 101 112 111 113 114 115 110 105 101 102 102 102 96 96 92
Getter CreateDocx::getXmlWordDocumentContent() Getter CreateDocx::getXmlWordEndnotes() Getter CreateDocx::getXmlWordFontTable() Getter CreateDocx::getXmlWordFooter1() Getter CreateDocx::getXmlRelsRels() Getter CreateDocx::getXmlDocPropsCustom() Getter CreateDocx::getTemporaryDirectory() Getter CreateDocx::getXmlContentTypes() Getter CreateDocx::getXmlDocPropsApp() Getter CreateDocx::getXmlDocPropsCore() Getter CreateDocx::getXmlWordHeader1() Getter CreateDocx::getXmlWordRelsDocumentRels() Getter CreateDocx::setEncodeUTF8() Transform to UTF-8 charset CreateDocx::setDefaultFont() Change the default font CreateDocx::setLanguage() Change default language. CreateDocx::setMarkAsFinal() Mark the document as final CreateDocx::setTemplateSymbol() Set the symbol surrounding varibles (placeholders) CreateDocx::readDOCX() Read DOCX file and extract WordML content CreateDocx::mergeDOCX() Merge WordML into a DOCX. WordML is added at the end of the document CreateDocx::getXmlWordSettings() Getter CreateDocx::getXmlWordStyles() Getter CreateDocx::getXmlWordThemeTheme1() Getter CreateDocx::getXml_Word_WebSettings() Setter CreateEndnote::createEndnote() Create endnote CreateEndnote::createInitEndnote() Create init endnote CreateGraphic::generateLN() Generate w:ln
CreateGraphic::generateLINECHART() Generate w:lineChart CreateGraphic::generateLSTSTYLE() Generate w:lststyle CreateGraphic::generateMAJORGRIDLINES() Generate w:majorGridlines CreateGraphic::generateNOFILL() Generate w:noFill CreateGraphic::generateLINE3DCHART() Generate w:line3DChart CreateGraphic::generateLEGENDPOS() Generate w:legendPos CreateGraphic::generateLBLALGN() Generate w:lblAlgn CreateGraphic::generateLAYOUT() Generate w:layout CreateGraphic::generateLBLOFFSET() Generate w:lblOffset CreateGraphic::generateLEGEND() Generate w:legend CreateGraphic::generateLEGENDFONT() Generate c:layout CreateGraphic::generateNUMCACHE() Generate w:numcache CreateGraphic::generateNUMFMT() Generate w:numFmt CreateGraphic::generatePLOTAREA() Generate w:plotarea CreateGraphic::generatePIECHART() Generate w:piechart CreateGraphic::generatePLOTVISONLY() Generate w:poltVisOnly CreateGraphic::generatePT() Generate w:pt CreateGraphic::generatePTCOUNT() Generate w:ptcount CreateGraphic::generatePIE3DCHART() Generate w:pie3DChart CreateGraphic::generatePERSPECTIVE() Generate w:perspective CreateGraphic::generateNUMREF() Generate w:numRef CreateGraphic::generateORDER() Generate w:order CreateGraphic::generateORIENTATION() Generate w:orientation CreateGraphic::generateOVERLAP() Generate w:overlap CreateGraphic::generateLANG() Generate w:lang CreateGraphic::generateIDX() Generate w:idx CreateGraphic::generateBODYPR()
208 209 209 209 208 208 207 206 207 207 208 210 210 212 212 212 213 213 212 211 210 210 211 211 206 206 201
Generate w:bodypr CreateGraphic::generateBARDIR() Generate w:barDir CreateGraphic::generateCAT() Generate w:cat CreateGraphic::generateCATAX() Generate w:catAx CreateGraphic::generateCHART() Generate w:chart CreateGraphic::generateBARCHART() Generate w:barChart CreateGraphic::generateBAR3DCHART() Generate w:bar3DChart CreateGraphic::generateAUTOTITLEDELETED() Generate w:autotitledeleted CreateGraphic::generateAXAXID() Generate w:axId CreateGraphic::generateAXID() Generate w:axid CreateGraphic::generateAXPOS() Generate w:axPos CreateGraphic::generateCHARTSPACE() Generate chartspace XML CreateGraphic::generateCROSSAX() Generate w:crossAx CreateGraphic::generateF() Generate w:f CreateGraphic::generateEXTERNALDATA() Generate w:externalData CreateGraphic::generateFIRSTSLICEANG() Generate w:firstSliceAng CreateGraphic::generateFORMATCODE() Generate w:formatCode CreateGraphic::generateGROUPING() Generate w:grouping CreateGraphic::generateDOCUMENTCHART() Generate w:chart CreateGraphic::generateDLBLS() Generate w:dLbls CreateGraphic::generateCROSSBETWEEN() Generate w:crossBetween CreateGraphic::generateCROSSES() Generate w:crosses CreateGraphic::generateDATE1904() Generate w:date1904 CreateGraphic::generateDEFRPR() Generate w:defrpr CreateGraphic::generateRFONTS() Generate w:latin CreateGraphic::generateRICH() Generate w:rich CreateGraphic::setXmlChart() Setter. Xml chart
201 201 201 202 200 200 199 199 199 200 202 202 204 204 205 205 205 204 204 202 203 203 203 213 214 223
CreateGraphic::setRId() Setter. Rid CreateGraphic::__destruct() Destruct CreateGraphic::__toString() CreateHeader Create header CreateGraphic::setName() Setter. Name CreateGraphic::initGraphic() Init graphic CreateGraphic::getInstance() CreateGraphic::getName() Getter. Name CreateGraphic::getRId() Getter. Rid CreateGraphic::getXmlChart() Getter. Xml chart constructor CreateHeader::__construct() Construct CreateHeader::createHeader() Create header CreateImage::NAMESPACEWORD CreateImage::CONSTWORD CreateImage::NAMESPACEWORD1 CreateImage::NAMESPACEWORD2 CreateImage::TAMBORDER CreateImage Create images CreateHeader::__toString() CreateHeader::generateHDR() Generate hdr token CreateHeader::generateP() Generate w:p CreateHeader::getInstance() CreateHeader::__destruct() Destruct CreateGraphic::generateVIEW3D() Generate w:view3D CreateGraphic::generateVARYCOLORS() Generate w:varyColors CreateGraphic::generateSTRCACHE() Generate w:strcache CreateGraphic::generateSPPR() Generate w:spPr CreateGraphic::generateSTRREF() Generate w:strref CreateGraphic::generateSTYLE() Generate w:style CreateGraphic::generateTICKLBLPOS() Generate w:tickLblPos CreateGraphic::generateSHOWPERCENT() Generate w:showPercent
222 223 223 224 222 222 221 221 221 222 224 224 226 226 226 226 226 226 225 225 225 225 225 221 220 216 216 216 216 217 215
CreateGraphic::generateSHAPE() Generate w:shape CreateGraphic::generateROTX() Generate w:rotx CreateGraphic::generateROTY() Generate w:roty CreateGraphic::generateSCALING() Generate w:scaling CreateGraphic::generateSER() Generate w:ser CreateGraphic::generateTITLE() Generate w:title CreateGraphic::generateTITLELAYOUT() Generate w:titlelayout CreateGraphic::generateTX() Generate w:tx CreateGraphic::generateTITLETX() Generate w:titletx CreateGraphic::generateV() Generate w:v CreateGraphic::generateVAL() Generate w:val CreateGraphic::generateVALAX() Generate w:valAx CreateGraphic::generateTITLET() Generate w:titlet CreateGraphic::generateTITLERPR() Generate w:titlerpr CreateGraphic::generateTITLEP() Generate w:titlep CreateGraphic::generateTITLEPPR() Generate w:titleppr CreateGraphic::generateTITLER() Generate w:titler CreateGraphic::generateTITLERFONTS() Generate w:titlerfonts CreateGraphic::generateAUTO() Generate w:auto CreateGraphic::createGraphic() Create graphic CreateExcelSheet::generateSHEETVIEW() Generate sheetview CreateExcelSheet::generateSHEETFORMATPR() Generate sheetformatpr CreateExcelSheet::generateSHEETVIEWS() Generate sheetviews CreateExcelSheet::generateTABLEPART() Generate tablepart CreateExcelSheet::generateTABLEPARTS() Generate tableparts CreateExcelSheet::generateSHEETDATA() Generate sheetdata CreateExcelSheet::generateSELECTION()
215 214 214 215 215 217 217 219 219 220 220 220 219 219 218 218 218 218 198 198 179 178 179 179 180 178 178
Generate selection CreateExcelSheet::generateDIMENSION() Generate dimension CreateExcelSheet::generatePAGEMARGINS() Generate pagemargins CreateExcelSheet::generatePAGESETUP() Generate pagesetup CreateExcelSheet::generateROW() Generate row CreateExcelSheet::generateV() Generate v CreateExcelSheet::generateWORKSHEET() Generate worksheet CreateExcelTable::generateTABLECOLUMN() Generate tablecolumn CreateExcelTable::generateTABLE() Generate table CreateExcelTable::generateTABLECOLUMNS() Generate tablecolumns CreateExcelTable::generateTABLESTYLEINFO() Generate tablestyleinfo CreateExcelTable::getInstance() CreateExcelTable::createExcelTable() Create excel table constructor CreateExcelTable::__construct() Construct CreateExcelSheet::getInstance() CreateExcelSheet::__destruct() Destruct CreateExcelSheet::__toString() CreateExcelTable Create excel table CreateExcelSheet::generateCOLS() Generate cols CreateExcelSheet::generateCOL() Generate col CreateEndnote::generateSPACING() Generate w:spacing CreateEndnote::generateSEPARATOR() Generate w:separator CreateEndnote::getInstance() CreateEndnote::__destruct() Destruct CreateEndnote::__toString() CreateEndnote::generateR() Generate w:r CreateEndnote::generatePPR() Generate w:ppr CreateEndnote::generateENDNOTE() Generate w:endnote CreateEndnote::generateENDNOTEREF() Generate w:endnoteref CreateEndnote::generateENDNOTEREFERENCE()
176 177 177 177 180 180 182 182 183 183 184 182 181 180 181 181 181 176 176 171 170 171 171 172 170 170 169 169 169
Generate w:endnotereference CreateEndnote::generateP() Generate w:p CreateExcelSharedStrings Generate excel shared strings constructor CreateExcelSharedStrings::__construct() Construct CreateExcelSheet Create excel sheet CreateExcelSharedStrings::__toString() constructor CreateExcelSheet::__construct() Construct CreateExcelSheet::createExcelSheet() Create excel sheet CreateExcelSheet::generateC() Generate c CreateExcelSharedStrings::__destruct() Destruct CreateExcelSharedStrings::getInstance() CreateExcelSharedStrings::createExcelSharedStrings() Create excel shared strings CreateExcelSharedStrings::generateSI() Generate si CreateExcelSharedStrings::generateSST() Generate sst CreateExcelSharedStrings::generateT() Generate t CreateExcelTable::__destruct() Destruct CreateExcelTable::__toString() CreateFootnote::generateP() Generate w:p CreateFootnote::generateFOOTNOTEREFERENCE() Generate w:footnotereference CreateFootnote::generatePPR() Generate w:ppr CreateFootnote::generateR() Generate w:r CreateFootnote::generateSEPARATOR() Generate w:separator CreateFootnote::generateFOOTNOTEREF() Generate w:footnoteref CreateFootnote::generateFOOTNOTE() Generate w:footnote constructor CreateFootnote::__construct() Construct CreateFootnote::createDocumentFootnote() Create document footnote CreateFootnote::createFootnote() Create footnote CreateFootnote::createInitFootnote() Create init footnote CreateFootnote::generateSPACING()
170 172 172 174 174 175 175 175 174 174 172 173 173 173 184 184 194 193 194 194 194 193 193 191 192 192 192 195
Generate w:spacing CreateFootnote::getInstance() CreateGraphic::createDOCUEMNTXML() Create document xml CreateGraphic::createCHARTXML() Create chart xml CreateGraphic::createEmbeddedDocumentXml() Create embedded document xml CreateGraphic::createEmbeddedGraphic() Create embedded graphic CreateGraphic::createEmbeddedXmlChart() Create embedded xml chart constructor CreateGraphic::__construct() Construct CreateGraphic::$_xmlChart CreateFootnote::__destruct() Destruct CreateFootnote::__toString() CreateGraphic Create graphics (charts) CreateGraphic::NAMESPACEWORD CreateFootnote::$init CreateFootnote Create footnote CreateFontTable::generatePANOSE1() Generate w:panose1 CreateFontTable::generateFONT() Generate w:font CreateFontTable::generatePITCH() Generate w:pitch CreateFontTable::generateSIG() Generate w:sig CreateFontTable::getInstance() CreateFontTable::generateFAMILY() Generate w:family CreateFontTable::generateCHARSET() Generate w:charset CreateFontTable Create font table CreateFontTable::$_xml constructor CreateFontTable::__construct() Construct CreateFontTable::createFont() Create font CreateFontTable::__destruct() Destruct CreateFontTable::__toString() CreateFooter::generateR() Generate w:r CreateFooter::generatePTAB() Generate w:ptab CreateFooter::getInstance() CreateFooter::__destruct()
195 197 197 197 198 198 196 196 195 196 196 196 191 191 186 186 187 187 187 186 185 184 185 185 185 188 188 190 190 190 190
Destruct CreateFooter::__toString() CreateFooter::generateP() Generate w:p CreateFooter::generateFTR() Generate ftr token CreateFooter Create footer constructor CreateFooter::__construct() Construct CreateFooter::createFooter() Create footer CreateFooter::generateFLDSIMPLE() Generate w:fldsimple CreateDocument.inc Abstract class used for creating documents
D
Debug::setActive() Setter. Enable debug Debug::getMessages() Getter. Access to messages var Debug::setMessages() Setter. Access to messages var Debug::__destruct() Destruct Debug::__toString() Magic method, returns error messages Debug::getInstance() Singleton, return instance of class Debug::getActive() Getter. Return debug status Debug::addMessage() Add a new mesagge to the pool of _messages Debug Debug generated XML Debug::enableDebug() Enable debug Debug::fDisableDebug() Disable debug Debug::generateTemplate() Assign template to use Debug.inc Debug generated XML 107 107 107 108 108 107 106 105 105 106 106 106 104
E
EmbedHTML::getInstance() Singleton, return instance of class EmbedHTML::__destruct() 350 350
Destruct EmbedHTML::__toString() Magic method, returns current XML EmbedHTML::getId() Getter. Return current HTML ID EmbedHTML::generateALTCHUNK() Generate w:altChunk EmbedHTML::$_xml EmbedHTML::embed() Embed HTML in DOCX EmbedRTF Create DOCX from RTF file EmbedRTF::$_xml EmbedRTF::__destruct() Destruct EmbedRTF::__toString() Magic method, returns current XML EmbedRTF::getInstance() Singleton, return instance of class EmbedRTF::getId() Getter. Return current HTML ID EmbedRTF::embed() Embed HTML in DOCX EmbedRTF::generateALTCHUNK() Generate w:altChunk EmbedHTML Create DOCX from HTML EmbedDOCX::__toString() Magic method, returns current XML EmbedDocument::embed() Embed content or file. EmbedDocument::generateALTCHUNK() Generate w:altChunk. EmbedDocument Embed documents in DOCX. EmbedRTF.inc Create DOCX from RTF file EmbedDOCX.inc Create DOCX from DOCX file EmbedHTML.inc Create DOCX from HTML EmbedDocument::getId() Return current Id. EmbedDOCX Create DOCX from DOCX file EmbedDOCX::getInstance() Singleton, return instance of class EmbedDOCX::__destruct() Destruct EmbedDOCX::getId() Getter. Return current HTML ID EmbedDOCX::generateALTCHUNK() Generate w:altChunk
351 350 350 349 349 351 351 353 353 352 352 352 352 349 348 346 346 345 144 142 143 346 347 348 348 348 348
G
GenerateDocx::beginDocx() Check for a valid license GenerateDocx Check for a valid license GenerateDocx.inc Check for a valid license 363 363 362
H
HTML2DOCX::setCSS() Setter. CSS HTML2DOCX::returnXML() Generate and return XML HTML2DOCX::setFileName() Setter. File name HTML2DOCX::setHTML() Setter. HTML HTML2DOCX::__destruct() Destruct HTML2DOCX::getHTML() Getter. HTML HTML2DOCX::getFileName() Getter. File name HTML2DOCX Create links using text strings HTML2DOCX::generateDOCX() Create DOCX HTML2DOCX::generateXML() Generate XML HTML2DOCX::getCSS() Getter. CSS HTML2DOCX.inc Transform HTML to DOCX 377 377 377 377 378 376 376 375 375 376 376 374
P
Parser::mergeFile() Merge WordML into a DOCX. WordML is added at the end of the document Parser::readFile() Read DOCX file and extract WordML content Parser::__destruct() Destruct 371 371 372
Parser::__toString() Magic method, returns current XML Parser::getXML() Getter. XHTML Parser::getInstance() Singleton, return instance of class Parser Parse DOCX file Parser::$_newFile Parser::getFilePath() Getter. File path Parser.inc Parse DOCX file
T
TransformDoc::setstrFile() Setter. File TransformDoc::getStrXHTML() Getter. XHTML TransformDoc::getStrOutputFile() Getter. Output file TransformDoc::setStrOutputFile() TransformDoc::setStrXHTML() Setter. XHTML TransformDoc::__destruct() Destruct TransformDoc::validatorXHTML() Validate HTML using tidy TransformDoc::getstrFile() Getter. File TransformDoc::getFileName() Return file name TransformDoc::SCHEMA_OFFICEDOCUMENT TransformDoc::SCHEMA_IMAGEDOCUMENT TransformDoc Transform DOCX to PDF or XHTML TransformDoc::absoluteZipPath() Return zip path TransformDoc::cleanXHTML() Clean HTML TransformDoc::generateXHTML() Convert DOCX to XHTML TransformDoc::generatePDF() Convert DOCX to PDF, using dompdf. DOCX->XHTML->PDF TransformDoc.inc Transform DOCX to PDF or XHTML 356 355 355 356 356 357 357 355 355 354 353 353 354 354 355 354 145