Import Tag
5 min
the import tag is generally only used for workaround purposes if you have an image that is smaller than the width of the page, you may need to use the import tag to include the image in your generated document when you use an import tag for this purpose, set the source to file to view more examples and tutorials, see import tag tutorial docid\ ay58k0qmwsxmz4ogzuqyr limitations there are several limitations when you import an rtf or wordml file, because there can only be one final document (your resulting report) all header information in the imported file is ignored, including the default language, font, style, page size, margins, headers and footers however, section breaks and their settings are imported into the final document all styles will map over by name identical style names are not checked for, and if they occur, there is no check to see if they have identical settings the settings used will be those of the parent template, which is the template you are importing files into fonts and colors map to the resulting document using existing entries from the parent document, if they exist, and adding new entries if they don't exist all list entries in the imported document become new list entries in the parent document — no attempt is made to map identical list entries together attributes one of these two attributes must be set select required break before page places a section page break before the import after page places a section page break after the import both page places a section page break both before and after the import before inline places the section page break before the import after inline places the section page break after the import both inline places the section page break both before and after the import credentials the credentials for opening the imported file in the form username\ password or ${var} source – optional (java engine only) the url will ordinarily be read in this order to force the url to be read as one specified source, set the source attribute to one of these values these protocols are only used if explicitly set thread thread currentthread() getcontextclassloader() app class processreport class getclassloader() system class classloader getsystemresource(propfile) url as a url (using url openstream()) file as a file via filename, local path or unc path rest read using the rest protocol for http requests and responses assembly ( net only) read from the application's assembly sharepoint ( net only) read using the sharepoint forms based authentication api you must set credentials to use this mode type – optional the file type to import if this attribute is set, the file’s extension is ignored valid file types are template, bitmap, pdf and txt if using pdf, type=’pdf’/filename pdf how this functions will depend on what report type you output to if you output your report to pdf format, the pdf file(s) are separate pages inserted at the beginning of your report autotag starts a new page, adds the imported file as the next n pages, then resumes the report at the top of a new page following the imported pdf if there are two pff imports in a row, the second starts on a new page after the first in other words, the imported pdf pages are not modified or combined with any autotag commands; they are inserted at the start of your report other formats that are page based (docx, xlsx, wordml) will have a single blank page for each imported pdf file other formats that are not page based (html) will skip the pdf file default – optional if the node in the select attribute does not exist or is empty, it will use the url of this attribute note that this is used as a url or filename, not as the contents of a file wrap – optional for bitmaps only, set this attribute to control how the image is placed inline (default) this is the way word normally places an image into a document, with text before and after it continuing to flow, but with only one line of text matched up with the image front – the image is placed above the text the text is not moved around the image behind – the image is placed below the text the text is not moved around the image square – the text is placed on both sides of the image – if it fits – but will have multiple lines of text to the sides, depending on how tall the image is display – optional this tag, under the conditions below, will not display a line if the line is composed of just these tag(s) and all tags have a display value of false the default value for display is “always” (unless overwritten/set in display default in properties or configuration file) values for display are display notempty display only if string is not empty notnull display if the data node exists, even if it is an empty string always display even if the node does not exist a boolean expression for example you could use \<wr\ out select=’\root\company\address2’ display=’expression’/> where true is displayed and false isn’t