├── LICENSE ├── README.md ├── build.xml ├── build ├── built-jar.properties └── classes │ └── danfenfe │ ├── DanfeNfe.class │ └── Item.class ├── dist ├── README.TXT ├── README.TXT~ ├── danfe │ ├── brasao.png │ ├── danfe_nfce_58.jasper │ ├── danfe_nfce_58.jrxml │ ├── danfe_nfce_80.jasper │ ├── danfe_nfce_80.jrxml │ ├── danfe_nfce_A4.jasper │ ├── danfe_nfce_A4.jrxml │ ├── danfe_nfse.jasper │ └── ginfes_danfe_nfse.jrxml ├── danfeintegranfe.jar └── lib │ ├── barbecue-1.5-beta1.jar │ ├── barcode4j.jar │ ├── batik-all-1.8pre-r1084380.jar │ ├── commons-beanutils-1.9.0.jar │ ├── commons-collections-3.2.1.jar │ ├── commons-digester-2.1.jar │ ├── commons-logging-1.1.1.jar │ ├── iText-2.1.7.js2.jar │ ├── jasperreports-6.1.0.jar │ ├── jasperreports-fonts-6.1.0.jar │ ├── jasperreports-javaflow-6.1.0.jar │ ├── org.w3c.css.sac-1.3.0.jar │ ├── w3c.jar │ ├── xalan.jar │ └── zxing-2.1.jar ├── manifest.mf ├── nbproject ├── build-impl.xml ├── genfiles.properties ├── private │ ├── private.properties │ └── private.xml ├── project.properties └── project.xml └── src └── danfenfe ├── DanfeNfe.java └── Item.java /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Java-Danfe 2 | Projeto em java para gerar pdf de arquivos xml para NF-e/NFC-e/NFS-e 3 | 4 | Author: Junior Tada 5 | 6 | Email: juniortada@gmail.com 7 | -------------------------------------------------------------------------------- /build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project danfeintegranfe. 12 | 13 | 73 | 74 | -------------------------------------------------------------------------------- /build/built-jar.properties: -------------------------------------------------------------------------------- 1 | #Tue, 05 Jan 2016 15:33:35 -0200 2 | 3 | 4 | /home/junior/NetBeansProjects/danfeintegranfe= 5 | -------------------------------------------------------------------------------- /build/classes/danfenfe/DanfeNfe.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/build/classes/danfenfe/DanfeNfe.class -------------------------------------------------------------------------------- /build/classes/danfenfe/Item.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/build/classes/danfenfe/Item.class -------------------------------------------------------------------------------- /dist/README.TXT: -------------------------------------------------------------------------------- 1 | ======================== 2 | BUILD OUTPUT DESCRIPTION 3 | ======================== 4 | 5 | When you build an Java application project that has a main class, the IDE 6 | automatically copies all of the JAR 7 | files on the projects classpath to your projects dist/lib folder. The IDE 8 | also adds each of the JAR files to the Class-Path element in the application 9 | JAR files manifest file (MANIFEST.MF). 10 | 11 | To run the project from the command line, go to the dist folder and 12 | type the following: 13 | 14 | java -jar danfe/danfeintegranfe.jar nfse.xml p=nfse tomador='nome_fantasia_tomador' prestador='nome_fantasia_prestador' 15 | 16 | To distribute this project, zip up the dist folder (including the lib folder) 17 | and distribute the ZIP file. 18 | 19 | Notes: 20 | 21 | * If two JAR files on the project classpath have the same name, only the first 22 | JAR file is copied to the lib folder. 23 | * Only JAR files are copied to the lib folder. 24 | If the classpath contains other types of files or folders, these files (folders) 25 | are not copied. 26 | * If a library on the projects classpath also has a Class-Path element 27 | specified in the manifest,the content of the Class-Path element has to be on 28 | the projects runtime path. 29 | * To set a main class in a standard Java project, right-click the project node 30 | in the Projects window and choose Properties. Then click Run and enter the 31 | class name in the Main Class field. Alternatively, you can manually type the 32 | class name in the manifest Main-Class element. 33 | -------------------------------------------------------------------------------- /dist/README.TXT~: -------------------------------------------------------------------------------- 1 | ======================== 2 | BUILD OUTPUT DESCRIPTION 3 | ======================== 4 | 5 | When you build an Java application project that has a main class, the IDE 6 | automatically copies all of the JAR 7 | files on the projects classpath to your projects dist/lib folder. The IDE 8 | also adds each of the JAR files to the Class-Path element in the application 9 | JAR files manifest file (MANIFEST.MF). 10 | 11 | To run the project from the command line, go to the dist folder and 12 | type the following: 13 | 14 | java -jar "danfeintegranfe.jar" 15 | 16 | To distribute this project, zip up the dist folder (including the lib folder) 17 | and distribute the ZIP file. 18 | 19 | Notes: 20 | 21 | * If two JAR files on the project classpath have the same name, only the first 22 | JAR file is copied to the lib folder. 23 | * Only JAR files are copied to the lib folder. 24 | If the classpath contains other types of files or folders, these files (folders) 25 | are not copied. 26 | * If a library on the projects classpath also has a Class-Path element 27 | specified in the manifest,the content of the Class-Path element has to be on 28 | the projects runtime path. 29 | * To set a main class in a standard Java project, right-click the project node 30 | in the Projects window and choose Properties. Then click Run and enter the 31 | class name in the Main Class field. Alternatively, you can manually type the 32 | class name in the manifest Main-Class element. 33 | -------------------------------------------------------------------------------- /dist/danfe/brasao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/danfe/brasao.png -------------------------------------------------------------------------------- /dist/danfe/danfe_nfce_58.jasper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/danfe/danfe_nfce_58.jasper -------------------------------------------------------------------------------- /dist/danfe/danfe_nfce_58.jrxml: -------------------------------------------------------------------------------- 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 | <band height="70" splitType="Stretch"> 27 | <textField> 28 | <reportElement x="0" y="0" width="160" height="9" uuid="f2fa37a1-ea20-4fe8-9b5e-92343c502be7"> 29 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 30 | </reportElement> 31 | <textElement textAlignment="Center"> 32 | <font fontName="Ubuntu Mono" size="7"/> 33 | </textElement> 34 | <textFieldExpression><![CDATA[$P{emit}.get(0)]]></textFieldExpression> 35 | </textField> 36 | <staticText> 37 | <reportElement positionType="Float" x="5" y="9" width="21" height="9" uuid="d305dc5e-cf5b-4d4d-b3b2-2f08abf7e786"> 38 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 39 | </reportElement> 40 | <textElement> 41 | <font fontName="Ubuntu Mono" size="7"/> 42 | </textElement> 43 | <text><![CDATA[CNPJ:]]></text> 44 | </staticText> 45 | <textField> 46 | <reportElement positionType="Float" x="26" y="9" width="50" height="9" uuid="63d771d5-90df-430c-8186-7fa85a232014"/> 47 | <textElement> 48 | <font fontName="Ubuntu Mono" size="7"/> 49 | </textElement> 50 | <textFieldExpression><![CDATA[$P{emit}.get(1)]]></textFieldExpression> 51 | </textField> 52 | <staticText> 53 | <reportElement x="76" y="9" width="22" height="9" uuid="fa501c50-6177-4021-bed6-f9192c945a18"> 54 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 55 | </reportElement> 56 | <textElement> 57 | <font fontName="Ubuntu Mono" size="7"/> 58 | </textElement> 59 | <text><![CDATA[ / IE:]]></text> 60 | </staticText> 61 | <textField> 62 | <reportElement x="98" y="9" width="62" height="9" uuid="aa765433-fca1-4ec7-a080-29085569b404"/> 63 | <textElement> 64 | <font fontName="Ubuntu Mono" size="7"/> 65 | </textElement> 66 | <textFieldExpression><![CDATA[$P{emit}.get(2)]]></textFieldExpression> 67 | </textField> 68 | <textField> 69 | <reportElement x="0" y="18" width="58" height="9" uuid="f1aad760-1554-40ea-a313-594e80454413"> 70 | <property name="com.jaspersoft.studio.unit.y" value="pixel"/> 71 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 72 | </reportElement> 73 | <textElement> 74 | <font fontName="Ubuntu Mono" size="6"/> 75 | </textElement> 76 | <textFieldExpression><![CDATA[$P{emit}.get(3)]]></textFieldExpression> 77 | </textField> 78 | <textField> 79 | <reportElement x="58" y="18" width="16" height="9" uuid="e11a51eb-0f5b-4b9f-9b9b-01cafe09e18f"/> 80 | <textElement> 81 | <font fontName="Ubuntu Mono" size="6"/> 82 | </textElement> 83 | <textFieldExpression><![CDATA[$P{emit}.get(4)]]></textFieldExpression> 84 | </textField> 85 | <textField> 86 | <reportElement x="74" y="18" width="32" height="9" uuid="3817b5ab-5c58-42a4-94da-242071b178c1"/> 87 | <textElement textAlignment="Center"> 88 | <font fontName="Ubuntu Mono" size="6"/> 89 | </textElement> 90 | <textFieldExpression><![CDATA[$P{emit}.get(5)]]></textFieldExpression> 91 | </textField> 92 | <textField> 93 | <reportElement stretchType="RelativeToTallestObject" x="106" y="18" width="34" height="9" uuid="8f3bf29d-f6a8-42fb-893a-48118174f621"/> 94 | <textElement textAlignment="Right" markup="none"> 95 | <font fontName="Ubuntu Mono" size="6"/> 96 | </textElement> 97 | <textFieldExpression><![CDATA[$P{emit}.get(6)]]></textFieldExpression> 98 | </textField> 99 | <textField> 100 | <reportElement x="140" y="18" width="20" height="9" uuid="1ea82b4d-39f8-46fc-bee8-57f90ccd2a57"/> 101 | <textElement> 102 | <font fontName="Ubuntu Mono" size="6"/> 103 | </textElement> 104 | <textFieldExpression><![CDATA["-"+$P{emit}.get(7)]]></textFieldExpression> 105 | </textField> 106 | <staticText> 107 | <reportElement x="0" y="27" width="160" height="7" uuid="1798e7f0-2d47-45d9-b8b9-257e9b3f1720"/> 108 | <textElement textAlignment="Center"> 109 | <font fontName="Ubuntu Mono" size="7"/> 110 | </textElement> 111 | <text><![CDATA[-----------------------------------------------------]]></text> 112 | </staticText> 113 | <staticText> 114 | <reportElement x="0" y="55" width="160" height="7" uuid="596672c6-9286-4dfa-8679-744716b00ba8"/> 115 | <textElement textAlignment="Center"> 116 | <font fontName="Ubuntu Mono" size="7"/> 117 | </textElement> 118 | <text><![CDATA[-----------------------------------------------------]]></text> 119 | </staticText> 120 | <staticText> 121 | <reportElement x="0" y="34" width="160" height="7" uuid="6481e6a0-1f79-4a93-9d44-277124d6d6a5"/> 122 | <textElement textAlignment="Center"> 123 | <font fontName="Ubuntu Mono" size="7"/> 124 | </textElement> 125 | <text><![CDATA[DANFE NFC-e - Documento Auxiliar]]></text> 126 | </staticText> 127 | <staticText> 128 | <reportElement x="0" y="41" width="160" height="7" uuid="173e4bc8-e653-46fc-8096-a1febf3934c0"/> 129 | <textElement textAlignment="Center"> 130 | <font fontName="Ubuntu Mono" size="7"/> 131 | </textElement> 132 | <text><![CDATA[da Nota Fiscal Eletrônica para Consumidor Final]]></text> 133 | </staticText> 134 | <staticText> 135 | <reportElement x="0" y="48" width="160" height="7" uuid="dbfecfbb-532d-4121-9b3e-73788cf75807"/> 136 | <textElement textAlignment="Center"> 137 | <font fontName="Ubuntu Mono" size="7"/> 138 | </textElement> 139 | <text><![CDATA[Não permite aproveitamento de créditos de ICMS]]></text> 140 | </staticText> 141 | <staticText> 142 | <reportElement x="0" y="62" width="20" height="7" uuid="d411c9db-cc96-4b42-83f5-a1c40db8cd8e"/> 143 | <textElement textAlignment="Right"> 144 | <font fontName="Ubuntu Mono" size="7" isBold="true"/> 145 | </textElement> 146 | <text><![CDATA[Cód]]></text> 147 | </staticText> 148 | <staticText> 149 | <reportElement x="20" y="62" width="66" height="7" uuid="64a95282-a6ba-4003-8e76-0e4b4cc45f5e"> 150 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 151 | </reportElement> 152 | <textElement textAlignment="Center"> 153 | <font fontName="Ubuntu Mono" size="7" isBold="true"/> 154 | </textElement> 155 | <text><![CDATA[Descrição]]></text> 156 | </staticText> 157 | <staticText> 158 | <reportElement x="86" y="62" width="15" height="7" uuid="be718ba8-9c1c-4e83-958f-5bbc125e190e"/> 159 | <textElement textAlignment="Center"> 160 | <font fontName="Ubuntu Mono" size="7" isBold="true"/> 161 | </textElement> 162 | <text><![CDATA[Qtd]]></text> 163 | </staticText> 164 | <staticText> 165 | <reportElement x="101" y="62" width="25" height="7" uuid="946cde96-8db3-4285-8c71-4e6ef960090a"> 166 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 167 | </reportElement> 168 | <textElement textAlignment="Right"> 169 | <font fontName="Ubuntu Mono" size="7" isBold="true"/> 170 | </textElement> 171 | <text><![CDATA[V.Uni]]></text> 172 | </staticText> 173 | <staticText> 174 | <reportElement x="126" y="62" width="30" height="7" uuid="99e53f3d-8008-4fff-920b-faa6a5cecfb1"/> 175 | <textElement textAlignment="Center"> 176 | <font fontName="Ubuntu Mono" size="7" isBold="true"/> 177 | </textElement> 178 | <text><![CDATA[Total]]></text> 179 | </staticText> 180 | </band> 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 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 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 0) ? $P{dest}.get(0):" CONSUMIDOR NÃO IDENTIFICADO"]]> 460 | 461 | 462 | 463 | 464 | 465 | 466 | 10) ? "\n"+$P{nota}.get(10) : "")]]> 467 | 468 | 469 | 470 | 471 | -------------------------------------------------------------------------------- /dist/danfe/danfe_nfce_80.jasper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/danfe/danfe_nfce_80.jasper -------------------------------------------------------------------------------- /dist/danfe/danfe_nfce_80.jrxml: -------------------------------------------------------------------------------- 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 | <band height="73" splitType="Stretch"> 26 | <textField> 27 | <reportElement x="0" y="0" width="214" height="9" uuid="f2fa37a1-ea20-4fe8-9b5e-92343c502be7"> 28 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 29 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 30 | </reportElement> 31 | <textElement textAlignment="Center"> 32 | <font fontName="Ubuntu Mono" size="8"/> 33 | </textElement> 34 | <textFieldExpression><![CDATA[$P{emit}.get(0)]]></textFieldExpression> 35 | </textField> 36 | <staticText> 37 | <reportElement positionType="Float" x="26" y="9" width="25" height="9" uuid="d305dc5e-cf5b-4d4d-b3b2-2f08abf7e786"> 38 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 39 | </reportElement> 40 | <textElement textAlignment="Center"> 41 | <font fontName="Ubuntu Mono" size="8"/> 42 | </textElement> 43 | <text><![CDATA[CNPJ:]]></text> 44 | </staticText> 45 | <textField pattern=""> 46 | <reportElement positionType="Float" x="51" y="9" width="66" height="9" uuid="63d771d5-90df-430c-8186-7fa85a232014"> 47 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 48 | </reportElement> 49 | <textElement> 50 | <font fontName="Ubuntu Mono" size="7"/> 51 | </textElement> 52 | <textFieldExpression><![CDATA[$P{emit}.get(1)]]></textFieldExpression> 53 | </textField> 54 | <staticText> 55 | <reportElement x="117" y="9" width="24" height="9" uuid="fa501c50-6177-4021-bed6-f9192c945a18"> 56 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 57 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 58 | </reportElement> 59 | <textElement> 60 | <font fontName="Ubuntu Mono" size="8"/> 61 | </textElement> 62 | <text><![CDATA[ / IE:]]></text> 63 | </staticText> 64 | <textField> 65 | <reportElement x="141" y="9" width="50" height="9" uuid="aa765433-fca1-4ec7-a080-29085569b404"> 66 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 67 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 68 | </reportElement> 69 | <textElement> 70 | <font fontName="Ubuntu Mono" size="7"/> 71 | </textElement> 72 | <textFieldExpression><![CDATA[$P{emit}.get(2)]]></textFieldExpression> 73 | </textField> 74 | <textField> 75 | <reportElement x="3" y="18" width="61" height="9" uuid="f1aad760-1554-40ea-a313-594e80454413"> 76 | <property name="com.jaspersoft.studio.unit.y" value="pixel"/> 77 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 78 | </reportElement> 79 | <textElement> 80 | <font fontName="Ubuntu Mono" size="8"/> 81 | </textElement> 82 | <textFieldExpression><![CDATA[$P{emit}.get(3)]]></textFieldExpression> 83 | </textField> 84 | <textField> 85 | <reportElement x="64" y="18" width="30" height="9" uuid="e11a51eb-0f5b-4b9f-9b9b-01cafe09e18f"/> 86 | <textElement> 87 | <font fontName="Ubuntu Mono" size="8"/> 88 | </textElement> 89 | <textFieldExpression><![CDATA[$P{emit}.get(4)]]></textFieldExpression> 90 | </textField> 91 | <textField> 92 | <reportElement x="94" y="18" width="42" height="9" uuid="3817b5ab-5c58-42a4-94da-242071b178c1"/> 93 | <textElement textAlignment="Center"> 94 | <font fontName="Ubuntu Mono" size="8"/> 95 | </textElement> 96 | <textFieldExpression><![CDATA[$P{emit}.get(5)]]></textFieldExpression> 97 | </textField> 98 | <textField> 99 | <reportElement stretchType="RelativeToTallestObject" x="136" y="18" width="45" height="9" uuid="8f3bf29d-f6a8-42fb-893a-48118174f621"/> 100 | <textElement textAlignment="Right" markup="none"> 101 | <font fontName="Ubuntu Mono" size="8"/> 102 | </textElement> 103 | <textFieldExpression><![CDATA[$P{emit}.get(6)]]></textFieldExpression> 104 | </textField> 105 | <textField> 106 | <reportElement x="181" y="18" width="28" height="9" uuid="1ea82b4d-39f8-46fc-bee8-57f90ccd2a57"/> 107 | <textElement> 108 | <font fontName="Ubuntu Mono" size="8"/> 109 | </textElement> 110 | <textFieldExpression><![CDATA["-"+$P{emit}.get(7)]]></textFieldExpression> 111 | </textField> 112 | <staticText> 113 | <reportElement x="0" y="27" width="214" height="7" uuid="1798e7f0-2d47-45d9-b8b9-257e9b3f1720"> 114 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 115 | </reportElement> 116 | <textElement textAlignment="Center"> 117 | <font fontName="Ubuntu Mono" size="7"/> 118 | </textElement> 119 | <text><![CDATA[---------------------------------------------------------------]]></text> 120 | </staticText> 121 | <staticText> 122 | <reportElement x="0" y="58" width="214" height="7" uuid="596672c6-9286-4dfa-8679-744716b00ba8"/> 123 | <textElement textAlignment="Center"> 124 | <font fontName="Ubuntu Mono" size="7"/> 125 | </textElement> 126 | <text><![CDATA[----------------------------------------------------------------]]></text> 127 | </staticText> 128 | <staticText> 129 | <reportElement x="0" y="34" width="214" height="8" uuid="6481e6a0-1f79-4a93-9d44-277124d6d6a5"> 130 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 131 | </reportElement> 132 | <textElement textAlignment="Center"> 133 | <font fontName="Ubuntu Mono" size="8"/> 134 | </textElement> 135 | <text><![CDATA[DANFE NFC-e - Documento Auxiliar]]></text> 136 | </staticText> 137 | <staticText> 138 | <reportElement x="0" y="42" width="214" height="8" uuid="173e4bc8-e653-46fc-8096-a1febf3934c0"/> 139 | <textElement textAlignment="Center"> 140 | <font fontName="Ubuntu Mono" size="8"/> 141 | </textElement> 142 | <text><![CDATA[da Nota Fiscal Eletrônica para Consumidor Final]]></text> 143 | </staticText> 144 | <staticText> 145 | <reportElement x="0" y="50" width="214" height="8" uuid="dbfecfbb-532d-4121-9b3e-73788cf75807"/> 146 | <textElement textAlignment="Center"> 147 | <font fontName="Ubuntu Mono" size="8"/> 148 | </textElement> 149 | <text><![CDATA[Não permite aproveitamento de créditos de ICMS]]></text> 150 | </staticText> 151 | <staticText> 152 | <reportElement x="0" y="65" width="26" height="8" uuid="d411c9db-cc96-4b42-83f5-a1c40db8cd8e"> 153 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 154 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 155 | </reportElement> 156 | <textElement textAlignment="Center"> 157 | <font fontName="Ubuntu Mono" size="7" isBold="true"/> 158 | </textElement> 159 | <text><![CDATA[Código]]></text> 160 | </staticText> 161 | <staticText> 162 | <reportElement x="26" y="65" width="91" height="8" uuid="64a95282-a6ba-4003-8e76-0e4b4cc45f5e"> 163 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 164 | </reportElement> 165 | <textElement textAlignment="Center"> 166 | <font fontName="Ubuntu Mono" size="7" isBold="true"/> 167 | </textElement> 168 | <text><![CDATA[Descrição]]></text> 169 | </staticText> 170 | <staticText> 171 | <reportElement x="117" y="65" width="22" height="8" uuid="be718ba8-9c1c-4e83-958f-5bbc125e190e"> 172 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 173 | </reportElement> 174 | <textElement textAlignment="Center"> 175 | <font fontName="Ubuntu Mono" size="7" isBold="true"/> 176 | </textElement> 177 | <text><![CDATA[Qtd]]></text> 178 | </staticText> 179 | <staticText> 180 | <reportElement x="139" y="65" width="30" height="8" uuid="946cde96-8db3-4285-8c71-4e6ef960090a"/> 181 | <textElement textAlignment="Center"> 182 | <font fontName="Ubuntu Mono" size="7" isBold="true"/> 183 | </textElement> 184 | <text><![CDATA[V.Uni]]></text> 185 | </staticText> 186 | <staticText> 187 | <reportElement x="169" y="65" width="40" height="8" uuid="99e53f3d-8008-4fff-920b-faa6a5cecfb1"/> 188 | <textElement textAlignment="Center"> 189 | <font fontName="Ubuntu Mono" size="7" isBold="true"/> 190 | </textElement> 191 | <text><![CDATA[Total]]></text> 192 | </staticText> 193 | </band> 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 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 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 0) ? $P{dest}.get(0):" CONSUMIDOR NÃO IDENTIFICADO"]]> 468 | 469 | 470 | 471 | 472 | 473 | 474 | 10) ? "\n"+$P{nota}.get(10) : "")]]> 475 | 476 | 477 | 478 | 479 | -------------------------------------------------------------------------------- /dist/danfe/danfe_nfce_A4.jasper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/danfe/danfe_nfce_A4.jasper -------------------------------------------------------------------------------- /dist/danfe/danfe_nfce_A4.jrxml: -------------------------------------------------------------------------------- 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 | <band height="91" splitType="Stretch"> 33 | <textField> 34 | <reportElement x="80" y="0" width="430" height="10" uuid="f2fa37a1-ea20-4fe8-9b5e-92343c502be7"/> 35 | <textElement textAlignment="Center"> 36 | <font fontName="Ubuntu Mono" size="10"/> 37 | </textElement> 38 | <textFieldExpression><![CDATA[$P{emit}.get(0)]]></textFieldExpression> 39 | </textField> 40 | <textField> 41 | <reportElement positionType="Float" x="80" y="10" width="430" height="10" uuid="63d771d5-90df-430c-8186-7fa85a232014"> 42 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 43 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 44 | </reportElement> 45 | <textElement textAlignment="Center"> 46 | <font fontName="Ubuntu Mono" size="10"/> 47 | </textElement> 48 | <textFieldExpression><![CDATA["CNPJ: "+$P{emit}.get(1)+" / IE: "+$P{emit}.get(2)]]></textFieldExpression> 49 | </textField> 50 | <staticText> 51 | <reportElement x="80" y="30" width="430" height="10" uuid="1798e7f0-2d47-45d9-b8b9-257e9b3f1720"> 52 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 53 | </reportElement> 54 | <textElement textAlignment="Center"> 55 | <font fontName="Ubuntu Mono" size="10"/> 56 | </textElement> 57 | <text><![CDATA[---------------------------------------------------------------]]></text> 58 | </staticText> 59 | <staticText> 60 | <reportElement x="80" y="70" width="430" height="10" uuid="596672c6-9286-4dfa-8679-744716b00ba8"> 61 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 62 | </reportElement> 63 | <textElement textAlignment="Center"> 64 | <font fontName="Ubuntu Mono" size="10"/> 65 | </textElement> 66 | <text><![CDATA[----------------------------------------------------------------]]></text> 67 | </staticText> 68 | <staticText> 69 | <reportElement x="80" y="40" width="430" height="10" uuid="6481e6a0-1f79-4a93-9d44-277124d6d6a5"/> 70 | <textElement textAlignment="Center"> 71 | <font fontName="Ubuntu Mono" size="10"/> 72 | </textElement> 73 | <text><![CDATA[DANFE NFC-e - Documento Auxiliar]]></text> 74 | </staticText> 75 | <staticText> 76 | <reportElement x="80" y="50" width="430" height="10" uuid="173e4bc8-e653-46fc-8096-a1febf3934c0"> 77 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 78 | </reportElement> 79 | <textElement textAlignment="Center"> 80 | <font fontName="Ubuntu Mono" size="10"/> 81 | </textElement> 82 | <text><![CDATA[da Nota Fiscal Eletrônica para Consumidor Final]]></text> 83 | </staticText> 84 | <staticText> 85 | <reportElement x="80" y="60" width="430" height="10" uuid="dbfecfbb-532d-4121-9b3e-73788cf75807"> 86 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 87 | </reportElement> 88 | <textElement textAlignment="Center"> 89 | <font fontName="Ubuntu Mono" size="10"/> 90 | </textElement> 91 | <text><![CDATA[Não permite aproveitamento de créditos de ICMS]]></text> 92 | </staticText> 93 | <staticText> 94 | <reportElement x="80" y="80" width="60" height="10" uuid="d411c9db-cc96-4b42-83f5-a1c40db8cd8e"> 95 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 96 | </reportElement> 97 | <textElement textAlignment="Center"> 98 | <font fontName="Ubuntu Mono" size="10" isBold="true"/> 99 | </textElement> 100 | <text><![CDATA[Código]]></text> 101 | </staticText> 102 | <staticText> 103 | <reportElement x="140" y="80" width="150" height="10" uuid="64a95282-a6ba-4003-8e76-0e4b4cc45f5e"> 104 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 105 | </reportElement> 106 | <textElement textAlignment="Center"> 107 | <font fontName="Ubuntu Mono" size="10" isBold="true"/> 108 | </textElement> 109 | <text><![CDATA[Descrição]]></text> 110 | </staticText> 111 | <staticText> 112 | <reportElement x="290" y="80" width="60" height="10" uuid="be718ba8-9c1c-4e83-958f-5bbc125e190e"> 113 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 114 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 115 | </reportElement> 116 | <textElement textAlignment="Center"> 117 | <font fontName="Ubuntu Mono" size="10" isBold="true"/> 118 | </textElement> 119 | <text><![CDATA[Qtd]]></text> 120 | </staticText> 121 | <staticText> 122 | <reportElement x="350" y="80" width="80" height="10" uuid="946cde96-8db3-4285-8c71-4e6ef960090a"> 123 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 124 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 125 | </reportElement> 126 | <textElement textAlignment="Right"> 127 | <font fontName="Ubuntu Mono" size="10" isBold="true"/> 128 | </textElement> 129 | <text><![CDATA[V.Uni]]></text> 130 | </staticText> 131 | <staticText> 132 | <reportElement x="430" y="80" width="80" height="10" uuid="99e53f3d-8008-4fff-920b-faa6a5cecfb1"> 133 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 134 | </reportElement> 135 | <textElement textAlignment="Right"> 136 | <font fontName="Ubuntu Mono" size="10" isBold="true"/> 137 | </textElement> 138 | <text><![CDATA[Total]]></text> 139 | </staticText> 140 | <textField> 141 | <reportElement x="80" y="20" width="150" height="10" uuid="95670028-1605-4058-98ee-c15af91b19d5"> 142 | <property name="com.jaspersoft.studio.unit.y" value="pixel"/> 143 | </reportElement> 144 | <textElement textAlignment="Right"> 145 | <font fontName="Ubuntu Mono" size="10"/> 146 | </textElement> 147 | <textFieldExpression><![CDATA[$P{emit}.get(3)]]></textFieldExpression> 148 | </textField> 149 | <textField> 150 | <reportElement x="230" y="20" width="50" height="10" uuid="17bc2fd2-f7ec-4f1d-9e3b-807504e01455"/> 151 | <textElement> 152 | <font fontName="Ubuntu Mono" size="10"/> 153 | </textElement> 154 | <textFieldExpression><![CDATA[$P{emit}.get(4)]]></textFieldExpression> 155 | </textField> 156 | <textField> 157 | <reportElement x="280" y="20" width="79" height="10" uuid="24a9363e-573b-454b-a6d8-c4bb952f3eee"/> 158 | <textElement textAlignment="Center"> 159 | <font fontName="Ubuntu Mono" size="10"/> 160 | </textElement> 161 | <textFieldExpression><![CDATA[$P{emit}.get(5)]]></textFieldExpression> 162 | </textField> 163 | <textField> 164 | <reportElement stretchType="RelativeToTallestObject" x="360" y="20" width="89" height="10" uuid="24a93af2-fe6d-40c6-8723-f552a57b100d"/> 165 | <textElement textAlignment="Right" markup="none"> 166 | <font fontName="Ubuntu Mono" size="10"/> 167 | </textElement> 168 | <textFieldExpression><![CDATA[$P{emit}.get(6)]]></textFieldExpression> 169 | </textField> 170 | <textField> 171 | <reportElement x="449" y="20" width="42" height="10" uuid="b689ce10-606f-48af-b81e-7c40dd2998fb"/> 172 | <textElement> 173 | <font fontName="Ubuntu Mono" size="10"/> 174 | </textElement> 175 | <textFieldExpression><![CDATA["-"+$P{emit}.get(7)]]></textFieldExpression> 176 | </textField> 177 | </band> 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 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 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 0) ? $P{dest}.get(0):" CONSUMIDOR NÃO IDENTIFICADO"]]> 402 | 403 | 404 | 405 | 406 | 407 | 408 | 10) ? "\n"+$P{nota}.get(10) : "")]]> 409 | 410 | 411 | 412 | 413 | -------------------------------------------------------------------------------- /dist/danfe/danfe_nfse.jasper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/danfe/danfe_nfse.jasper -------------------------------------------------------------------------------- /dist/danfe/ginfes_danfe_nfse.jrxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | <band height="117" splitType="Stretch"> 21 | <property name="com.jaspersoft.studio.unit.height" value="mm"/> 22 | <rectangle> 23 | <reportElement mode="Transparent" x="0" y="0" width="555" height="70" uuid="8eab8e45-f886-4473-8211-ed58fb9201dc"> 24 | <property name="com.jaspersoft.studio.unit.height" value="pixel"/> 25 | <property name="com.jaspersoft.studio.unit.width" value="pixel"/> 26 | </reportElement> 27 | </rectangle> 28 | <staticText> 29 | <reportElement x="80" y="0" width="395" height="20" uuid="896c8c50-56bd-4f6a-bf19-06ed01abe524"/> 30 | <textElement textAlignment="Center"> 31 | <font size="12"/> 32 | </textElement> 33 | <text><![CDATA[PREFEITURA DO MUNICÍPIO DE JUNDIAÍ]]></text> 34 | </staticText> 35 | <staticText> 36 | <reportElement x="80" y="44" width="395" height="21" uuid="44ada45e-8d26-4f39-8093-5209294837ba"/> 37 | <textElement textAlignment="Center"> 38 | <font size="12"/> 39 | </textElement> 40 | <text><![CDATA[NOTA FISCAL ELETRÔNICA DE SERVIÇO - NFS-e]]></text> 41 | </staticText> 42 | <staticText> 43 | <reportElement x="80" y="20" width="395" height="24" uuid="b651d8f1-f8a5-42b1-a067-fbfab81cec42"/> 44 | <textElement textAlignment="Center"> 45 | <font size="12"/> 46 | </textElement> 47 | <text><![CDATA[SECRETARIA MUNICIPAL DE FINANÇAS]]></text> 48 | </staticText> 49 | <rectangle> 50 | <reportElement mode="Transparent" x="476" y="0" width="79" height="70" uuid="0aa19389-d625-4b8e-83a8-03b91d0d3e8e"> 51 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 52 | </reportElement> 53 | </rectangle> 54 | <staticText> 55 | <reportElement x="476" y="0" width="79" height="40" uuid="8abccdc0-ed91-489f-98b1-25d831c1cb4b"/> 56 | <textElement textAlignment="Center"> 57 | <font size="12"/> 58 | </textElement> 59 | <text><![CDATA[Número da 60 | NFS-e]]></text> 61 | </staticText> 62 | <rectangle> 63 | <reportElement mode="Transparent" x="0" y="0" width="79" height="70" uuid="a859ce77-3c13-4dc9-a8a2-93bd8f2d4ed4"> 64 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 65 | </reportElement> 66 | </rectangle> 67 | <rectangle> 68 | <reportElement mode="Transparent" x="0" y="70" width="79" height="22" uuid="d1ff118e-9ba3-42e3-a23f-eaf38d94c2e1"> 69 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 70 | <property name="com.jaspersoft.studio.unit.height" value="mm"/> 71 | </reportElement> 72 | </rectangle> 73 | <rectangle> 74 | <reportElement mode="Transparent" x="476" y="70" width="79" height="22" uuid="b66e96e4-3918-4b1f-94b4-d8d672571e9f"> 75 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 76 | <property name="com.jaspersoft.studio.unit.height" value="mm"/> 77 | </reportElement> 78 | </rectangle> 79 | <rectangle> 80 | <reportElement mode="Transparent" x="0" y="92" width="79" height="22" uuid="136f8109-04c4-4020-a898-d9161f5a625b"> 81 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 82 | <property name="com.jaspersoft.studio.unit.height" value="mm"/> 83 | </reportElement> 84 | </rectangle> 85 | <rectangle> 86 | <reportElement mode="Transparent" x="476" y="92" width="79" height="22" uuid="8bc918f9-db82-4779-8768-9bf34a369a62"> 87 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 88 | <property name="com.jaspersoft.studio.unit.height" value="mm"/> 89 | </reportElement> 90 | </rectangle> 91 | <rectangle> 92 | <reportElement mode="Transparent" x="181" y="70" width="97" height="22" uuid="2b8689df-29c8-40cb-9c77-bcd459cfd35a"> 93 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 94 | <property name="com.jaspersoft.studio.unit.height" value="mm"/> 95 | </reportElement> 96 | </rectangle> 97 | <rectangle> 98 | <reportElement mode="Transparent" x="181" y="92" width="97" height="22" uuid="4cc1eb63-bba7-47c4-9151-5ab6b739d654"> 99 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 100 | <property name="com.jaspersoft.studio.unit.height" value="mm"/> 101 | </reportElement> 102 | </rectangle> 103 | <rectangle> 104 | <reportElement mode="Transparent" x="278" y="70" width="101" height="22" uuid="34c15fd0-af8e-4964-bd5d-92dff7594705"> 105 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 106 | <property name="com.jaspersoft.studio.unit.height" value="mm"/> 107 | </reportElement> 108 | </rectangle> 109 | <rectangle> 110 | <reportElement mode="Transparent" x="278" y="92" width="101" height="22" uuid="bae82998-11d8-4389-abae-c19bdc52fad1"> 111 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 112 | <property name="com.jaspersoft.studio.unit.height" value="mm"/> 113 | </reportElement> 114 | </rectangle> 115 | <rectangle> 116 | <reportElement mode="Transparent" x="79" y="70" width="102" height="22" uuid="44a2cbf1-e19e-4a24-867d-937bdbbebaad"> 117 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 118 | <property name="com.jaspersoft.studio.unit.height" value="mm"/> 119 | </reportElement> 120 | </rectangle> 121 | <rectangle> 122 | <reportElement mode="Transparent" x="379" y="70" width="97" height="22" uuid="64fc6098-fc3c-4b12-a5a2-d68a980a71f2"> 123 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 124 | <property name="com.jaspersoft.studio.unit.height" value="mm"/> 125 | </reportElement> 126 | </rectangle> 127 | <staticText> 128 | <reportElement x="0" y="70" width="78" height="22" uuid="6d480953-a45a-481e-9f8e-c7f0d0e2f64d"/> 129 | <textElement textAlignment="Center"> 130 | <font size="8"/> 131 | </textElement> 132 | <text><![CDATA[Data e Hora da Emissão]]></text> 133 | </staticText> 134 | <staticText> 135 | <reportElement x="181" y="70" width="96" height="22" uuid="f2ee7e83-0681-4fb6-8337-6e9d727624b1"/> 136 | <textElement textAlignment="Center" verticalAlignment="Middle"> 137 | <font size="8"/> 138 | </textElement> 139 | <text><![CDATA[Competência]]></text> 140 | </staticText> 141 | <staticText> 142 | <reportElement x="379" y="70" width="95" height="22" uuid="465966d8-a8ba-4380-9c68-c845803800d0"/> 143 | <textElement textAlignment="Center" verticalAlignment="Middle"> 144 | <font size="8"/> 145 | </textElement> 146 | <text><![CDATA[Código de Verificação]]></text> 147 | </staticText> 148 | <staticText> 149 | <reportElement x="1" y="92" width="78" height="22" uuid="d88f288e-c124-47b0-8612-ad0e7b9b95f0"/> 150 | <textElement textAlignment="Center" verticalAlignment="Middle"> 151 | <font size="8"/> 152 | </textElement> 153 | <text><![CDATA[Número do RPS]]></text> 154 | </staticText> 155 | <staticText> 156 | <reportElement x="182" y="92" width="96" height="22" uuid="d0b3cf9c-42bc-4f60-8688-8dbb23b2c844"/> 157 | <textElement textAlignment="Center" verticalAlignment="Middle"> 158 | <font size="8"/> 159 | </textElement> 160 | <text><![CDATA[Nº da NFS-e substituída]]></text> 161 | </staticText> 162 | <staticText> 163 | <reportElement x="380" y="92" width="95" height="22" uuid="9d8cae08-2dbe-4f8d-b990-c3386fb99921"/> 164 | <textElement textAlignment="Center" verticalAlignment="Middle"> 165 | <font size="8"/> 166 | </textElement> 167 | <text><![CDATA[Local da Prestação]]></text> 168 | </staticText> 169 | <textField> 170 | <reportElement positionType="Float" x="476" y="40" width="79" height="29" uuid="f8aa8fc8-0733-4180-b731-5ef156533944"/> 171 | <textElement textAlignment="Center" verticalAlignment="Middle"> 172 | <font size="12"/> 173 | </textElement> 174 | <textFieldExpression><![CDATA[$P{nota}.get(0)]]></textFieldExpression> 175 | </textField> 176 | <textField> 177 | <reportElement x="476" y="70" width="78" height="22" uuid="f693cff2-0e21-4c01-b813-3d9ff11a0332"/> 178 | <textElement textAlignment="Center" verticalAlignment="Middle"> 179 | <font size="8"/> 180 | </textElement> 181 | <textFieldExpression><![CDATA[$P{nota}.get(1)]]></textFieldExpression> 182 | </textField> 183 | <textField> 184 | <reportElement x="80" y="70" width="99" height="22" uuid="7fcd79a7-2388-4b22-b7f7-6801d26a5ed7"/> 185 | <textElement textAlignment="Center" verticalAlignment="Middle"> 186 | <font size="8"/> 187 | </textElement> 188 | <textFieldExpression><![CDATA[$P{nota}.get(2)]]></textFieldExpression> 189 | </textField> 190 | <textField> 191 | <reportElement x="279" y="70" width="99" height="22" uuid="3991c0b4-430a-4982-aee8-a76de30c7e17"/> 192 | <textElement textAlignment="Center" verticalAlignment="Middle"> 193 | <font size="8"/> 194 | </textElement> 195 | <textFieldExpression><![CDATA[$P{nota}.get(7)]]></textFieldExpression> 196 | </textField> 197 | <textField> 198 | <reportElement x="477" y="92" width="78" height="22" uuid="f2c50ec3-25f7-4249-9d54-cb4ffb7b5e11"/> 199 | <textElement textAlignment="Center" verticalAlignment="Middle"> 200 | <font size="8"/> 201 | </textElement> 202 | <textFieldExpression><![CDATA[$P{emit}.get(6)+" - "+$P{emit}.get(7)]]></textFieldExpression> 203 | </textField> 204 | <textField isBlankWhenNull="true"> 205 | <reportElement x="81" y="92" width="99" height="22" uuid="a34971ca-56f6-4d59-bc71-0a64efb12474"/> 206 | <textElement textAlignment="Center" verticalAlignment="Middle"> 207 | <font size="8"/> 208 | </textElement> 209 | </textField> 210 | <textField isBlankWhenNull="true"> 211 | <reportElement x="280" y="92" width="99" height="22" uuid="9b16bbc9-dd05-4d88-857f-ee621148931e"/> 212 | <textElement textAlignment="Center" verticalAlignment="Middle"> 213 | <font size="8"/> 214 | </textElement> 215 | </textField> 216 | <image hAlign="Center"> 217 | <reportElement x="8" y="4" width="62" height="62" uuid="c4c73aa8-f2ec-4d53-ace7-1200ab4c6479"> 218 | <property name="com.jaspersoft.studio.unit.width" value="mm"/> 219 | <property name="com.jaspersoft.studio.unit.height" value="mm"/> 220 | </reportElement> 221 | <imageExpression><![CDATA[$P{brasao}]]></imageExpression> 222 | </image> 223 | </band> 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | 1053 | 1054 | 1055 | 1056 | 1057 | 1058 | 1059 | 1060 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | 1091 | 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | 1117 | 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | 1127 | 1128 | 1129 | 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 1138 | 1139 | 1140 | 1141 | 1142 | 1143 | 1144 | 1145 | 1146 | 1147 | 1148 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | 1160 | 1161 | 1162 | 1163 | 1164 | 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | 1172 | 1173 | 1174 | 1175 | 1176 | 1177 | 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 | 1185 | 1186 | 1187 | 1188 | 1189 | 1190 | 1191 | 1192 | 1193 | 1194 | 1195 | 1196 | 1197 | 1198 | 1199 | 1200 | 1201 | 1202 | 1203 | 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1211 | 1212 | 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | 1224 | 1225 | 1226 | 1227 | 1228 | 1229 | 1230 | 1231 | 1232 | 1233 | 1234 | 1235 | 1236 | 1237 | 1238 | 1239 | 1240 | 1241 | 1242 | 1243 | 1244 | 1245 | 1246 | 1247 | 1248 | 1249 | 1250 | 1251 | 1252 | 1253 | 1254 | 1255 | 1256 | 1257 | 1258 | 1259 | 1260 | 1261 | 1262 | 1263 | 1264 | 1265 | 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | 1272 | 1273 | 1274 | 1275 | 1276 | 1277 | 1278 | 1279 | 1280 | 1281 | 1282 | 1283 | 1284 | 1285 | 1286 | 1287 | 1288 | 1289 | 1290 | 1291 | 1292 | 1293 | 1294 | 1295 | 1296 | 1297 | 1298 | 1299 | 1300 | 1301 | 1302 | 1303 | 1304 | 1305 | 1306 | 1307 | 1308 | 1309 | 1310 | 1311 | 1312 | 1313 | 1314 | 1315 | 1316 | 1317 | 1318 | 1319 | 1320 | 1321 | 1322 | 1323 | 1324 | 1325 | 1326 | 1327 | 1328 | 1329 | 1330 | 1331 | 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | 1345 | 1346 | 1347 | 1348 | 1349 | 1350 | 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 | 1359 | 1360 | 1361 | 1362 | 1363 | 1364 | 1365 | 1366 | 1367 | 1368 | 1369 | 1370 | 1371 | 1372 | 1373 | 1374 | 1375 | 1376 | 1377 | 1378 | 1379 | 1380 | 1381 | 1382 | 1383 | 1384 | 1385 | 1386 | 1387 | 1388 | 1389 | 1390 | 1391 | 1392 | 1393 | 1394 | 1395 | 1396 | 1397 | 1398 | 1399 | 1400 | 1401 | -------------------------------------------------------------------------------- /dist/danfeintegranfe.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/danfeintegranfe.jar -------------------------------------------------------------------------------- /dist/lib/barbecue-1.5-beta1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/barbecue-1.5-beta1.jar -------------------------------------------------------------------------------- /dist/lib/barcode4j.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/barcode4j.jar -------------------------------------------------------------------------------- /dist/lib/batik-all-1.8pre-r1084380.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/batik-all-1.8pre-r1084380.jar -------------------------------------------------------------------------------- /dist/lib/commons-beanutils-1.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/commons-beanutils-1.9.0.jar -------------------------------------------------------------------------------- /dist/lib/commons-collections-3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/commons-collections-3.2.1.jar -------------------------------------------------------------------------------- /dist/lib/commons-digester-2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/commons-digester-2.1.jar -------------------------------------------------------------------------------- /dist/lib/commons-logging-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/commons-logging-1.1.1.jar -------------------------------------------------------------------------------- /dist/lib/iText-2.1.7.js2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/iText-2.1.7.js2.jar -------------------------------------------------------------------------------- /dist/lib/jasperreports-6.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/jasperreports-6.1.0.jar -------------------------------------------------------------------------------- /dist/lib/jasperreports-fonts-6.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/jasperreports-fonts-6.1.0.jar -------------------------------------------------------------------------------- /dist/lib/jasperreports-javaflow-6.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/jasperreports-javaflow-6.1.0.jar -------------------------------------------------------------------------------- /dist/lib/org.w3c.css.sac-1.3.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/org.w3c.css.sac-1.3.0.jar -------------------------------------------------------------------------------- /dist/lib/w3c.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/w3c.jar -------------------------------------------------------------------------------- /dist/lib/xalan.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/xalan.jar -------------------------------------------------------------------------------- /dist/lib/zxing-2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniortada/Java-Danfe/6622edee77ff2407e6d85aeb517138d63e3d5f6b/dist/lib/zxing-2.1.jar -------------------------------------------------------------------------------- /manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=2f176e96 2 | build.xml.script.CRC32=56bab9cf 3 | build.xml.stylesheet.CRC32=8064a381@1.75.2.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=2f176e96 7 | nbproject/build-impl.xml.script.CRC32=07197e27 8 | nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 9 | -------------------------------------------------------------------------------- /nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | user.properties.file=/home/junior/.netbeans/8.0/build.properties 3 | -------------------------------------------------------------------------------- /nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/home/junior/NetBeansProjects/danfeintegranfe/src/danfenfe/DanfeNfe.java 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processor.options= 4 | annotation.processing.processors.list= 5 | annotation.processing.run.all.processors=true 6 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 7 | build.classes.dir=${build.dir}/classes 8 | build.classes.excludes=**/*.java,**/*.form 9 | # This directory is removed when the project is cleaned: 10 | build.dir=build 11 | build.generated.dir=${build.dir}/generated 12 | build.generated.sources.dir=${build.dir}/generated-sources 13 | # Only compile against the classpath explicitly listed here: 14 | build.sysclasspath=ignore 15 | build.test.classes.dir=${build.dir}/test/classes 16 | build.test.results.dir=${build.dir}/test/results 17 | # Uncomment to specify the preferred debugger connection transport: 18 | #debug.transport=dt_socket 19 | debug.classpath=\ 20 | ${run.classpath} 21 | debug.test.classpath=\ 22 | ${run.test.classpath} 23 | # Os arquivos em build.classes.dir que devem ser exclu\u00eddos do jar de distribui\u00e7\u00e3o 24 | dist.archive.excludes= 25 | # This directory is removed when the project is cleaned: 26 | dist.dir=dist 27 | dist.jar=${dist.dir}/danfeintegranfe.jar 28 | dist.javadoc.dir=${dist.dir}/javadoc 29 | excludes= 30 | file.reference.barbecue-1.5-beta1.jar=../Bibliotecas e Jars/barbecue-1.5-beta1/barbecue-1.5-beta1.jar 31 | file.reference.barcode4j.jar=../Bibliotecas e Jars/barcode4j-2.1.0/build/barcode4j.jar 32 | file.reference.batik-all-1.8pre-r1084380.jar=../Bibliotecas e Jars/batik-all-1.8pre-r1084380.jar 33 | file.reference.commons-beanutils-1.9.0.jar=../relatorio/dist/lib/commons-beanutils-1.9.0.jar 34 | file.reference.commons-collections-3.2.1.jar=../relatorio/dist/lib/commons-collections-3.2.1.jar 35 | file.reference.commons-digester-2.1.jar=../relatorio/dist/lib/commons-digester-2.1.jar 36 | file.reference.commons-logging-1.1.1.jar=../relatorio/dist/lib/commons-logging-1.1.1.jar 37 | file.reference.iText-2.1.7.js2.jar=../relatorio/dist/lib/iText-2.1.7.js2.jar 38 | file.reference.jasperreports-6.1.0.jar=../Bibliotecas e Jars/iReports/jasperreporsts-6.1.0/jasperreports-6.1.0.jar 39 | file.reference.jasperreports-fonts-6.1.0.jar=../Bibliotecas e Jars/iReports/jasperreporsts-6.1.0/jasperreports-fonts-6.1.0.jar 40 | file.reference.jasperreports-javaflow-6.1.0.jar=../Bibliotecas e Jars/iReports/jasperreporsts-6.1.0/jasperreports-javaflow-6.1.0.jar 41 | file.reference.org.w3c.css.sac-1.3.0.jar=../Bibliotecas e Jars/org.w3c.css.sac-1.3.0.jar 42 | file.reference.w3c.jar=../Bibliotecas e Jars/w3c.jar 43 | file.reference.xalan.jar=/home/junior/NetBeansProjects/Bibliotecas e Jars/xalan-j_2_7_2/xalan.jar 44 | file.reference.zxing-2.1.jar=../Bibliotecas e Jars/zxing-2.1.jar 45 | includes=** 46 | jar.compress=false 47 | javac.classpath=\ 48 | ${file.reference.jasperreports-6.1.0.jar}:\ 49 | ${file.reference.jasperreports-fonts-6.1.0.jar}:\ 50 | ${file.reference.jasperreports-javaflow-6.1.0.jar}:\ 51 | ${file.reference.commons-beanutils-1.9.0.jar}:\ 52 | ${file.reference.commons-collections-3.2.1.jar}:\ 53 | ${file.reference.commons-digester-2.1.jar}:\ 54 | ${file.reference.commons-logging-1.1.1.jar}:\ 55 | ${file.reference.iText-2.1.7.js2.jar}:\ 56 | ${file.reference.barcode4j.jar}:\ 57 | ${file.reference.zxing-2.1.jar}:\ 58 | ${file.reference.batik-all-1.8pre-r1084380.jar}:\ 59 | ${file.reference.w3c.jar}:\ 60 | ${file.reference.org.w3c.css.sac-1.3.0.jar}:\ 61 | ${file.reference.barbecue-1.5-beta1.jar}:\ 62 | ${file.reference.xalan.jar} 63 | # Space-separated list of extra javac options 64 | javac.compilerargs= 65 | javac.deprecation=false 66 | javac.processorpath=\ 67 | ${javac.classpath} 68 | javac.source=1.8 69 | javac.target=1.8 70 | javac.test.classpath=\ 71 | ${javac.classpath}:\ 72 | ${build.classes.dir} 73 | javac.test.processorpath=\ 74 | ${javac.test.classpath} 75 | javadoc.additionalparam= 76 | javadoc.author=false 77 | javadoc.encoding=${source.encoding} 78 | javadoc.noindex=false 79 | javadoc.nonavbar=false 80 | javadoc.notree=false 81 | javadoc.private=false 82 | javadoc.splitindex=true 83 | javadoc.use=true 84 | javadoc.version=false 85 | javadoc.windowtitle= 86 | main.class=danfenfe.DanfeNfe 87 | manifest.file=manifest.mf 88 | meta.inf.dir=${src.dir}/META-INF 89 | mkdist.disabled=false 90 | platform.active=default_platform 91 | run.classpath=\ 92 | ${javac.classpath}:\ 93 | ${build.classes.dir} 94 | # Space-separated list of JVM arguments used when running the project. 95 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 96 | # To set system properties for unit tests define test-sys-prop.name=value: 97 | run.jvmargs= 98 | run.test.classpath=\ 99 | ${javac.test.classpath}:\ 100 | ${build.test.classes.dir} 101 | source.encoding=UTF-8 102 | src.dir=src 103 | test.src.dir=test 104 | -------------------------------------------------------------------------------- /nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | danfeintegranfe 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/danfenfe/DanfeNfe.java: -------------------------------------------------------------------------------- 1 | 2 | package danfenfe; 3 | 4 | import java.io.File; 5 | import java.io.IOException; 6 | import java.nio.file.Path; 7 | import java.nio.file.Paths; 8 | import java.text.ParseException; 9 | import java.text.SimpleDateFormat; 10 | import java.util.ArrayList; 11 | import java.util.Collection; 12 | import java.util.Date; 13 | import java.util.HashMap; 14 | import java.util.List; 15 | import javax.xml.parsers.DocumentBuilder; 16 | import javax.xml.parsers.DocumentBuilderFactory; 17 | import javax.xml.parsers.ParserConfigurationException; 18 | import net.sf.jasperreports.engine.JRDataSource; 19 | import net.sf.jasperreports.engine.JRException; 20 | import net.sf.jasperreports.engine.JasperCompileManager; 21 | import net.sf.jasperreports.engine.JasperExportManager; 22 | import net.sf.jasperreports.engine.JasperFillManager; 23 | import net.sf.jasperreports.engine.JasperPrint; 24 | import net.sf.jasperreports.engine.JasperReport; 25 | import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; 26 | import net.sf.jasperreports.engine.data.JRXmlDataSource; 27 | import net.sf.jasperreports.engine.util.JRLoader; 28 | import org.w3c.dom.Document; 29 | import org.w3c.dom.Element; 30 | import org.w3c.dom.Node; 31 | import org.w3c.dom.NodeList; 32 | import org.xml.sax.SAXException; 33 | 34 | /** 35 | * 36 | * @author Junior Tada 37 | * 38 | * Ex: java -jar danfenfe.jar nfce_autorizada.xml 39 | */ 40 | 41 | public class DanfeNfe { 42 | 43 | private static HashMap map = new HashMap(); 44 | 45 | /** 46 | * @param args the command line arguments 47 | */ 48 | 49 | public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException, ParseException{ 50 | String xml_nfe = null; 51 | String qrcode = null; 52 | String p = null; 53 | String logo = null; 54 | String prestador_fantasia = ""; 55 | String tomador_fantasia = ""; 56 | String path = System.getProperty("user.dir"); 57 | Path danfe_nfce_80 = Paths.get(path, "danfe","danfe_nfce_80.jasper"); 58 | String url = danfe_nfce_80.toAbsolutePath().toString(); 59 | 60 | // Default impressao em papel 80mm para quando for compilar 61 | // String jrxml = "/home/junior/JaspersoftWorkspace/MyReports/danfe_nfce_80.jrxml"; 62 | for(String arg: args){ 63 | if(arg.contains(".xml")){ 64 | xml_nfe = arg; 65 | } 66 | if(arg.contains("qrcode=")){ 67 | qrcode = arg.replace("qrcode=", ""); 68 | } 69 | if(arg.contains("url=")){ 70 | url = arg.replace("url=", ""); 71 | } 72 | if(arg.contains("logo=")){ 73 | logo = arg.replace("logo=", ""); 74 | } 75 | if(arg.contains("prestador=")){ 76 | prestador_fantasia = arg.replace("prestador=", ""); 77 | } 78 | if(arg.contains("tomador=")){ 79 | // nome fantasia do tomador/cliente 80 | tomador_fantasia = arg.replace("tomador=", ""); 81 | } 82 | if(arg.contains("p=")){ 83 | p = arg.replace("p=", ""); 84 | switch (p){ 85 | case "58mm": 86 | //jrxml = "/home/junior/JaspersoftWorkspace/MyReports/danfe_nfce_58.jrxml"; 87 | Path danfe_nfce_58 = Paths.get(path, "danfe","danfe_nfce_58.jasper"); 88 | url = danfe_nfce_58.toAbsolutePath().toString(); 89 | break; 90 | case "A4": 91 | //jrxml = "/home/junior/JaspersoftWorkspace/MyReports/danfe_nfce_A4.jrxml"; 92 | Path danfe_nfce_A4 = Paths.get(path, "danfe","danfe_nfce_A4.jasper"); 93 | url = danfe_nfce_A4.toAbsolutePath().toString(); 94 | break; 95 | case "nfe": 96 | //nfe A4 retrato 97 | Path nfe = Paths.get(path, "danfe","danfeR.jasper"); 98 | url = nfe.toAbsolutePath().toString(); 99 | // teste 100 | //url = "/home/junior/JaspersoftWorkspace/MyReports/danfeR.jasper"; 101 | break; 102 | case "nfse": 103 | //nfse A4 retrato 104 | Path nfse = Paths.get(path, "danfe","danfe_nfse.jasper"); 105 | url = nfse.toAbsolutePath().toString(); 106 | break; 107 | default: 108 | //jrxml = "/home/junior/JaspersoftWorkspace/MyReports/danfe_nfce_80.jrxml"; 109 | url = danfe_nfce_80.toAbsolutePath().toString(); 110 | break; 111 | } 112 | } 113 | } 114 | // Leitura de arquivo para xml de nfe 115 | if(!p.equals("nfse")){ 116 | File inputFile = new File(xml_nfe); 117 | DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); 118 | DocumentBuilder builder = factory.newDocumentBuilder(); 119 | Document xml = builder.parse(inputFile); 120 | xml.getDocumentElement().normalize(); 121 | // Dados do emitente 122 | NodeList emitList = xml.getElementsByTagName("emit"); 123 | Node emitNode = emitList.item(0); 124 | Element emitElement = (Element) emitNode; 125 | List emit = new ArrayList<>(); 126 | emit.add(emitElement.getElementsByTagName("xNome").item(0).getTextContent()); 127 | emit.add(emitElement.getElementsByTagName("CNPJ").item(0).getTextContent()); 128 | emit.add(emitElement.getElementsByTagName("IE").item(0).getTextContent()); 129 | emit.add(emitElement.getElementsByTagName("xLgr").item(0).getTextContent()); 130 | emit.add(emitElement.getElementsByTagName("nro").item(0).getTextContent()); 131 | emit.add(emitElement.getElementsByTagName("xBairro").item(0).getTextContent()); 132 | emit.add(emitElement.getElementsByTagName("xMun").item(0).getTextContent()); 133 | emit.add(emitElement.getElementsByTagName("UF").item(0).getTextContent()); 134 | emit.add(emitElement.getElementsByTagName("CEP").item(0).getTextContent()); 135 | //for(int i = 0; i < emit.size(); i++){ 136 | // System.out.println(emit.get(i)+" "+i); 137 | //} 138 | List dest = new ArrayList<>(); 139 | 140 | // Dados do Destinatário 141 | NodeList destList = xml.getElementsByTagName("dest"); 142 | if(destList.getLength() > 0){ 143 | Node destNode = destList.item(0); 144 | Element destElement = (Element) destNode; 145 | try { 146 | dest.add("CPF: "+destElement.getElementsByTagName("CPF").item(0).getTextContent()); 147 | } catch (Exception e) { 148 | dest.add("CNPJ: "+destElement.getElementsByTagName("CNPJ").item(0).getTextContent()); 149 | } 150 | if(p.equalsIgnoreCase("nfe")){ 151 | dest.add(destElement.getElementsByTagName("xNome").item(0).getTextContent()); 152 | dest.add(destElement.getElementsByTagName("xLgr").item(0).getTextContent()); 153 | dest.add(destElement.getElementsByTagName("nro").item(0).getTextContent()); 154 | dest.add(destElement.getElementsByTagName("xBairro").item(0).getTextContent()); 155 | dest.add(destElement.getElementsByTagName("xMun").item(0).getTextContent()); 156 | dest.add(destElement.getElementsByTagName("UF").item(0).getTextContent()); 157 | dest.add(destElement.getElementsByTagName("CEP").item(0).getTextContent()); 158 | } 159 | 160 | //for(int i = 0; i < dest.size(); i++){ 161 | // System.out.println(dest.get(i)+" "+i); 162 | //} 163 | } 164 | 165 | // Dados dos Itens 166 | Collection itens = new ArrayList(); 167 | NodeList itensList = xml.getElementsByTagName("det"); 168 | for(int i = 0; i < itensList.getLength(); i++){ 169 | Node itensNode = itensList.item(i); 170 | Element itensElement = (Element) itensNode; 171 | Item item = new Item(); 172 | item.setCodigo(itensElement.getElementsByTagName("cProd").item(0).getTextContent()); 173 | item.setDescricao(itensElement.getElementsByTagName("xProd").item(0).getTextContent()); 174 | item.setNcm(itensElement.getElementsByTagName("NCM").item(0).getTextContent()); 175 | item.setCfop(itensElement.getElementsByTagName("CFOP").item(0).getTextContent()); 176 | item.setQuantidade(itensElement.getElementsByTagName("qCom").item(0).getTextContent()); 177 | item.setUnidade(itensElement.getElementsByTagName("uCom").item(0).getTextContent()); 178 | item.setTotal(itensElement.getElementsByTagName("vUnCom").item(0).getTextContent()); 179 | item.setValor(itensElement.getElementsByTagName("vProd").item(0).getTextContent()); 180 | // csosn 181 | item.setCsosn(itensElement.getElementsByTagName("CSOSN").item(0).getTextContent()); 182 | itens.add(item); 183 | } 184 | JRDataSource jr = new JRBeanCollectionDataSource(itens); 185 | // Dados da nota 186 | List nota = new ArrayList<>(); 187 | // Total 188 | NodeList totList = xml.getElementsByTagName("ICMSTot"); 189 | Node totNode = totList.item(0); 190 | Element totElement = (Element) totNode; 191 | nota.add(totElement.getElementsByTagName("vNF").item(0).getTextContent()); 192 | // Numero, Serie, Emissao 193 | NodeList ideList = xml.getElementsByTagName("ide"); 194 | Node ideNode = ideList.item(0); 195 | Element ideElement = (Element) ideNode; 196 | nota.add(ideElement.getElementsByTagName("nNF").item(0).getTextContent()); // Numero 197 | nota.add(ideElement.getElementsByTagName("serie").item(0).getTextContent()); // serie 198 | String data = ideElement.getElementsByTagName("dhEmi").item(0).getTextContent(); 199 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); 200 | SimpleDateFormat f = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); 201 | Date date = sdf.parse(data); 202 | nota.add(f.format(date)); // Data/hora 203 | // Chave, Protocolo, Data/Hora Autorização 204 | NodeList protList = xml.getElementsByTagName("infProt"); 205 | Node protNode = protList.item(0); 206 | Element protElement = (Element) protNode; 207 | nota.add(protElement.getElementsByTagName("chNFe").item(0).getTextContent()); // Chave 208 | nota.add(protElement.getElementsByTagName("nProt").item(0).getTextContent()); // Protocolo 209 | String dhRecbto = protElement.getElementsByTagName("dhRecbto").item(0).getTextContent(); 210 | Date data_recibo = sdf.parse(dhRecbto); 211 | nota.add(f.format(data_recibo)); // Data/Hora recibo 212 | // Pagamento 213 | NodeList pagList = xml.getElementsByTagName("pag"); 214 | Node pagNode = pagList.item(0); 215 | Element pagElement = (Element) pagNode; 216 | // Grupo obrigatório para a NFC-e, a critério da UF. Não informar para a NF-e. 217 | String tPag = ""; 218 | try { 219 | tPag = pagElement.getElementsByTagName("tPag").item(0).getTextContent(); 220 | switch (tPag){ 221 | case "01": 222 | tPag = "Dinheiro"; 223 | break; 224 | case "02": 225 | tPag = "Cheque"; 226 | break; 227 | case "03": 228 | tPag = "Cartão de Crédito"; 229 | break; 230 | case "04": 231 | tPag = "Cartão de Débito"; 232 | break; 233 | case "05": 234 | tPag = "Crédito Loja"; 235 | break; 236 | case "10": 237 | tPag = "Vale Alimentação"; 238 | break; 239 | case "11": 240 | tPag = "Vale Refeição"; 241 | break; 242 | case "12": 243 | tPag = "Vale Presente"; 244 | break; 245 | case "13": 246 | tPag = "Vale Combustível"; 247 | break; 248 | case "99": 249 | tPag = "Outros"; 250 | break; 251 | default: 252 | tPag = "Outros"; 253 | 254 | } 255 | } catch (Exception e) { 256 | System.out.println("Grupo obrigatório para a NFC-e, a critério da UF. Não informar para a NF-e: " + e); 257 | } 258 | nota.add(tPag); 259 | nota.add(itens.size()+""); 260 | 261 | // Tributos aprox 262 | try { 263 | nota.add(totElement.getElementsByTagName("vTotTrib").item(0).getTextContent()); 264 | } catch (Exception e) { 265 | System.out.println("Valor total de tributos: " + e); 266 | } 267 | // Informação adicional 268 | try { 269 | NodeList infoList = xml.getElementsByTagName("infAdic"); 270 | Node infoNode = infoList.item(0); 271 | Element infoElement = (Element) infoNode; 272 | nota.add(infoElement.getElementsByTagName("infAdFisco").item(0).getTextContent()); 273 | } catch (Exception e) { 274 | nota.add(""); 275 | System.out.println("Informação adicional: " + e); 276 | } 277 | 278 | 279 | //for(int z = 0; z < nota.size(); z++){ 280 | // System.out.println(nota.get(z)+" "+z); 281 | //} 282 | // Dante NF-e 283 | // java -jar nota_autorizada.xml p=nfe 284 | if(p.equalsIgnoreCase("nfe")){ 285 | gerarDanfeNFe(url, emit, dest, nota, jr); 286 | } 287 | // Danfe NFC-e 288 | else{ 289 | gerarDanfe(url, emit, dest, nota, jr, qrcode); 290 | } 291 | } 292 | // Leitura de arquivo xml para nfse 293 | else{ 294 | File inputFile = new File(xml_nfe); 295 | DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); 296 | DocumentBuilder builder = factory.newDocumentBuilder(); 297 | Document xml = builder.parse(inputFile); 298 | xml.getDocumentElement().normalize(); 299 | 300 | // Dados do prestador 301 | NodeList emitList = xml.getElementsByTagName("PrestadorServico"); 302 | Node emitNode = emitList.item(0); 303 | Element emitElement = (Element) emitNode; 304 | List emit = new ArrayList<>(); 305 | emit.add(emitElement.getElementsByTagName("Cnpj").item(0).getTextContent()); 306 | emit.add(emitElement.getElementsByTagName("InscricaoMunicipal").item(0).getTextContent()); 307 | emit.add(emitElement.getElementsByTagName("RazaoSocial").item(0).getTextContent()); 308 | emit.add(emitElement.getElementsByTagName("Endereco").item(1).getTextContent()); 309 | emit.add(emitElement.getElementsByTagName("Numero").item(0).getTextContent()); 310 | emit.add(emitElement.getElementsByTagName("Bairro").item(0).getTextContent()); 311 | if(emitElement.getElementsByTagName("CodigoMunicipio").item(0).getTextContent().equals("3525904")){ 312 | emit.add("Jundiaí"); 313 | } 314 | else{ 315 | emit.add(emitElement.getElementsByTagName("CodigoMunicipio").item(0).getTextContent()); 316 | } 317 | emit.add(emitElement.getElementsByTagName("Uf").item(0).getTextContent()); 318 | emit.add(emitElement.getElementsByTagName("Cep").item(0).getTextContent()); 319 | emit.add(emitElement.getElementsByTagName("Telefone").item(0).getTextContent()); 320 | emit.add(emitElement.getElementsByTagName("Email").item(0).getTextContent()); 321 | // Nome Fantasia Prestador 322 | emit.add(prestador_fantasia); 323 | // Debug 324 | // System.out.println("Prestador"); 325 | // for(int i = 0; i < emit.size(); i++){ 326 | // System.out.println(emit.get(i)+" "+i); 327 | // } 328 | 329 | // Dados do tomador 330 | NodeList destList = xml.getElementsByTagName("TomadorServico"); 331 | Node destNode = destList.item(0); 332 | Element destElement = (Element) destNode; 333 | List dest = new ArrayList<>(); 334 | dest.add(destElement.getElementsByTagName("Cnpj").item(0).getTextContent()); 335 | dest.add(destElement.getElementsByTagName("InscricaoMunicipal").item(0).getTextContent()); 336 | dest.add(destElement.getElementsByTagName("RazaoSocial").item(0).getTextContent()); 337 | dest.add(destElement.getElementsByTagName("Endereco").item(1).getTextContent()); 338 | dest.add(destElement.getElementsByTagName("Numero").item(0).getTextContent()); 339 | dest.add(destElement.getElementsByTagName("Bairro").item(0).getTextContent()); 340 | if(destElement.getElementsByTagName("CodigoMunicipio").item(0).getTextContent().equals("3525904")){ 341 | dest.add("Jundiaí"); 342 | } 343 | else{ 344 | dest.add(destElement.getElementsByTagName("CodigoMunicipio").item(0).getTextContent()); 345 | } 346 | dest.add(destElement.getElementsByTagName("Uf").item(0).getTextContent()); 347 | dest.add(destElement.getElementsByTagName("Cep").item(0).getTextContent()); 348 | dest.add(destElement.getElementsByTagName("Telefone").item(0).getTextContent()); 349 | dest.add(destElement.getElementsByTagName("Email").item(0).getTextContent()); 350 | // Nome fantasia tomador 351 | dest.add(tomador_fantasia); 352 | // Debug 353 | // System.out.println("Tomador"); 354 | // for(int i = 0; i < dest.size(); i++){ 355 | // System.out.println(dest.get(i)+" "+i); 356 | // } 357 | 358 | // Dados do serviço 359 | NodeList serList = xml.getElementsByTagName("Servico"); 360 | Node serNode = serList.item(0); 361 | Element serElement = (Element) serNode; 362 | List ser = new ArrayList<>(); 363 | ser.add(serElement.getElementsByTagName("ValorServicos").item(0).getTextContent()); 364 | ser.add(serElement.getElementsByTagName("IssRetido").item(0).getTextContent()); 365 | ser.add(serElement.getElementsByTagName("ValorIss").item(0).getTextContent()); 366 | ser.add(serElement.getElementsByTagName("ValorIssRetido").item(0).getTextContent()); 367 | ser.add(serElement.getElementsByTagName("BaseCalculo").item(0).getTextContent()); 368 | ser.add(serElement.getElementsByTagName("Aliquota").item(0).getTextContent()); 369 | ser.add(serElement.getElementsByTagName("ValorLiquidoNfse").item(0).getTextContent()); 370 | ser.add(serElement.getElementsByTagName("ItemListaServico").item(0).getTextContent()); 371 | ser.add(serElement.getElementsByTagName("CodigoTributacaoMunicipio").item(0).getTextContent()); 372 | ser.add(serElement.getElementsByTagName("Discriminacao").item(0).getTextContent()); 373 | ser.add(serElement.getElementsByTagName("CodigoMunicipio").item(0).getTextContent()); 374 | // Debug 375 | //System.out.println("Serviço"); 376 | //for(int i = 0; i < ser.size(); i++){ 377 | // System.out.println(ser.get(i)+" "+i); 378 | //} 379 | 380 | // Dados da nota 381 | NodeList notaList = xml.getElementsByTagName("InfNfse"); 382 | Node notaNode = notaList.item(0); 383 | Element notaElement = (Element) notaNode; 384 | List nota = new ArrayList<>(); 385 | nota.add(notaElement.getElementsByTagName("Numero").item(0).getTextContent()); 386 | nota.add(notaElement.getElementsByTagName("CodigoVerificacao").item(0).getTextContent()); 387 | // Ajusta data/hora emissão 388 | String data_xml = notaElement.getElementsByTagName("DataEmissao").item(0).getTextContent(); 389 | SimpleDateFormat data_entrada = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); 390 | SimpleDateFormat data_saida = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); 391 | Date date = data_entrada.parse(data_xml); 392 | nota.add(data_saida.format(date)); 393 | nota.add(notaElement.getElementsByTagName("NaturezaOperacao").item(0).getTextContent()); 394 | nota.add(notaElement.getElementsByTagName("RegimeEspecialTributacao").item(0).getTextContent()); 395 | nota.add(notaElement.getElementsByTagName("OptanteSimplesNacional").item(0).getTextContent()); 396 | nota.add(notaElement.getElementsByTagName("IncentivadorCultural").item(0).getTextContent()); 397 | // Ajusta data Competência 398 | String data_c = notaElement.getElementsByTagName("Competencia").item(0).getTextContent(); 399 | SimpleDateFormat data_c_entrada = new SimpleDateFormat("yyyy-MM-dd"); 400 | SimpleDateFormat data_c_saida = new SimpleDateFormat("dd/MM/yyyy"); 401 | Date data_competencia = data_c_entrada.parse(data_c); 402 | nota.add(data_c_saida.format(data_competencia)); 403 | // Debug 404 | // System.out.println("Nota"); 405 | // for(int i = 0; i < nota.size(); i++){ 406 | // System.out.println(nota.get(i)+" "+i); 407 | // } 408 | 409 | // Gera o danfe com jasper 410 | gerarDanfeNfse(url, emit, dest, ser, nota, xml_nfe, logo); 411 | } 412 | } 413 | 414 | // Cria o Danfe com os dados do xml 415 | private static void gerarDanfe(String url, List emit, List dest, List nota, JRDataSource itens, String qrcode){ 416 | try { 417 | // Teste 418 | //String compilado = System.getProperty("user.dir") + "/danfe_nfce_80.jasper";; 419 | String output = "danfe.pdf"; 420 | map.put("emit", emit); 421 | map.put("dest", dest); 422 | map.put("nota", nota); 423 | map.put("qrcode", qrcode); 424 | // Relatório compilado 425 | JasperReport report = (JasperReport) JRLoader.loadObjectFromFile(url); 426 | //InputStream jasperStream = getClass().getResourceAsStream("/Foo.jasper"); 427 | //JasperReport report = (JasperReport) JRLoader.loadObject(jasperStream); 428 | // Relatório nao compilado 429 | //JasperReport report = JasperCompileManager.compileReport(jrxml); 430 | JasperPrint print = JasperFillManager.fillReport(report, map, itens); 431 | JasperExportManager.exportReportToPdfFile(print, output); 432 | } catch (JRException e) { 433 | System.out.println("erro: "+e.getMessage()); 434 | } 435 | } 436 | 437 | private static void gerarDanfeNFe(String url, List emit, List dest, List nota, JRDataSource itens) { 438 | try { 439 | // Teste 440 | //String compilado = System.getProperty("user.dir") + "/danfe_nfce_80.jasper";; 441 | String output = "danfe.pdf"; 442 | map.put("emit", emit); 443 | map.put("dest", dest); 444 | map.put("nota", nota); 445 | // Relatório compilado 446 | JasperReport report = (JasperReport) JRLoader.loadObjectFromFile(url); 447 | JasperPrint print = JasperFillManager.fillReport(report, map, itens); 448 | JasperExportManager.exportReportToPdfFile(print, output); 449 | } catch (JRException e) { 450 | System.out.println("erro: "+e.getMessage()); 451 | } 452 | } 453 | 454 | private static void gerarDanfeNfse(String url, List emit, List dest, List ser, List nota, String xml, String logo) { 455 | try { 456 | // Teste 457 | //String compilado = System.getProperty("user.dir") + "/danfe_nfce_80.jasper";; 458 | String output = "danfe.pdf"; 459 | map.put("emit", emit); 460 | map.put("dest", dest); 461 | map.put("ser", ser); 462 | map.put("nota", nota); 463 | map.put("logo", logo); 464 | // brasao 465 | String brasao = Paths.get(System.getProperty("user.dir"), "danfe","brasao.png").toAbsolutePath().toString(); 466 | map.put("brasao", brasao); 467 | // JrDataSource 468 | JRDataSource jr = new JRXmlDataSource(xml); 469 | // Relatório compilado 470 | JasperReport report = (JasperReport) JRLoader.loadObjectFromFile(url); 471 | JasperPrint print = JasperFillManager.fillReport(report, map, jr); 472 | JasperExportManager.exportReportToPdfFile(print, output); 473 | } catch (JRException e) { 474 | System.out.println("erro: "+e.getMessage()); 475 | } 476 | } 477 | 478 | } 479 | -------------------------------------------------------------------------------- /src/danfenfe/Item.java: -------------------------------------------------------------------------------- 1 | 2 | package danfenfe; 3 | 4 | /** 5 | * 6 | * @author Junior Tada 7 | */ 8 | 9 | public class Item { 10 | 11 | private String codigo; 12 | private String descricao; 13 | private String quantidade; 14 | private String ncm; 15 | private String cfop; 16 | private String csosn; 17 | private String unidade; 18 | private String valor; 19 | private String total; 20 | 21 | public String getCodigo() { 22 | return codigo; 23 | } 24 | 25 | public void setCodigo(String codigo) { 26 | this.codigo = codigo; 27 | } 28 | 29 | public String getDescricao() { 30 | return descricao; 31 | } 32 | 33 | public void setDescricao(String descricao) { 34 | this.descricao = descricao; 35 | } 36 | 37 | public String getQuantidade() { 38 | return quantidade; 39 | } 40 | 41 | public void setQuantidade(String quantidade) { 42 | this.quantidade = quantidade; 43 | } 44 | 45 | public String getNcm() { 46 | return ncm; 47 | } 48 | 49 | public void setNcm(String ncm) { 50 | this.ncm = ncm; 51 | } 52 | 53 | public String getCfop() { 54 | return cfop; 55 | } 56 | 57 | public void setCfop(String cfop) { 58 | this.cfop = cfop; 59 | } 60 | 61 | public String getCsosn() { 62 | return csosn; 63 | } 64 | 65 | public void setCsosn(String csosn) { 66 | this.csosn = csosn; 67 | } 68 | 69 | public String getUnidade() { 70 | return unidade; 71 | } 72 | 73 | public void setUnidade(String unidade) { 74 | this.unidade = unidade; 75 | } 76 | 77 | public String getValor() { 78 | return valor; 79 | } 80 | 81 | public void setValor(String valor) { 82 | this.valor = valor; 83 | } 84 | 85 | public String getTotal() { 86 | return total; 87 | } 88 | 89 | public void setTotal(String total) { 90 | this.total = total; 91 | } 92 | 93 | 94 | 95 | } 96 | --------------------------------------------------------------------------------