./PaxHeaders/cups-pdf-3.0.20000644000000000000000000000013214770021657012404 xustar0030 mtime=1742742447.700086581 30 atime=1742742398.064944166 30 ctime=1742742454.019977396 cups-pdf-3.0.2/0000755000215500007650000000000014770021657013730 5ustar00vrbehrstaff00000000000000cups-pdf-3.0.2/PaxHeaders/COPYING0000644000000000000000000000007411723732545013364 xustar0030 atime=1742740149.571900656 30 ctime=1742740114.120510103 cups-pdf-3.0.2/COPYING0000644000215500007650000003542311723732545014772 0ustar00vrbehrstaff00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS cups-pdf-3.0.2/PaxHeaders/extra0000644000000000000000000000013214770021650013363 xustar0030 mtime=1742742440.588209456 30 atime=1742742432.312352439 30 ctime=1742742440.588209456 cups-pdf-3.0.2/extra/0000755000215500007650000000000014770021650015044 5ustar00vrbehrstaff00000000000000cups-pdf-3.0.2/extra/PaxHeaders/CUPS-PDF_opt.ppd0000644000000000000000000000013212141426746016215 xustar0030 mtime=1367748070.742029028 30 atime=1742740204.330959397 30 ctime=1742740114.120510103 cups-pdf-3.0.2/extra/CUPS-PDF_opt.ppd0000644000215500007650000005334312141426746017631 0ustar00vrbehrstaff00000000000000*PPD-Adobe: "4.3" *% *% "$Id: postscript.ppd,v 1.1.1.1 2000/08/24 19:23:13 goffioul Exp $" *% *% Sample Postscript driver PPD file for the Common UNIX Printing *% System (CUPS). *% *% Michael Goffioul *% *% Changes to the original file by Volker Behr, Martin-Eric Racine, *% Nickolay Kondrashov, Louis Lagendijk and other contributors: *% added option setting from PPD - 2011-08-05 *% added IEEE-1284 device id - 2008-03-24 *% added custom page size - 2006-05-18 *% replaced page descriptions - 2006-05-18 *% InputSlot constraints removed - 2006-05-11 *% maxed out imageable regions - 2006-05-11 *% added pstitleiconv filter - 2006-05-11 *% added ledger paper size - 2006-01-29 *% match Adobe specifications - 2005-12-23 *% additional paper formats - 2005-02-03 and 2005-02-07 *% made A4 default paper size - 2005-02-03 *% Color enabled - 2003-12-02 *% *FormatVersion: "4.3" *FileVersion: "1.1" *LanguageVersion: English *LanguageEncoding: ISOLatin1 *PCFileName: "CUPS-PDF.PPD" *Manufacturer: "Generic" *Product: "(CUPS v1.1)" *ModelName: "Generic CUPS-PDF Printer" *ShortNickName: "Generic CUPS-PDF Printer" *NickName: "Generic CUPS-PDF Printer (w/ options)" *1284DeviceID: "MFG:Generic;MDL:CUPS-PDF Printer;DES:Generic CUPS-PDF Printer;CLS:PRINTER;CMD:POSTSCRIPT;" *% cupsFilter: "application/vnd.cups-postscript 0 pstitleiconv" *PSVersion: "(2017.000) 0" *LanguageLevel: "2" *ColorDevice: True *DefaultColorSpace: RGB *FileSystem: False *Throughput: "8" *LandscapeOrientation: Plus90 *TTRasterizer: Type42 *HWMargins: 0 0 0 0 *VariablePaperSize: True *MaxMediaWidth: 100000 *MaxMediaHeight: 100000 *NonUIOrderDependency: 100 AnySetup *CustomPageSize *CustomPageSize True: "pop pop pop <>setpagedevice" *End *ParamCustomPageSize Width: 1 points 36 100000 *ParamCustomPageSize Height: 2 points 36 100000 *ParamCustomPageSize Orientation: 3 int 0 3 *ParamCustomPageSize WidthOffset: 4 points 0 0 *ParamCustomPageSize HeightOffset: 5 points 0 0 *OpenGroup: General/General *OpenUI *PageSize/Page Size: PickOne *OrderDependency: 100 AnySetup *PageSize *DefaultPageSize: A4 *PageSize 11x14/11x14: "<>setpagedevice" *PageSize 11x17/11x17: "<>setpagedevice" *PageSize 13x19/13x19: "<>setpagedevice" *PageSize 16x20/16x20: "<>setpagedevice" *PageSize 16x24/16x24: "<>setpagedevice" *PageSize 2A/2A: "<>setpagedevice" *PageSize 4A/4A: "<>setpagedevice" *PageSize 8x10/8x10: "<>setpagedevice" *PageSize 8x12/8x12: "<>setpagedevice" *PageSize A0/A0: "<>setpagedevice" *PageSize A1/A1: "<>setpagedevice" *PageSize A2/A2: "<>setpagedevice" *PageSize A3/A3: "<>setpagedevice" *PageSize A4/A4: "<>setpagedevice" *PageSize A5/A5: "<>setpagedevice" *PageSize AnsiA/ANSI A: "<>setpagedevice" *PageSize AnsiB/ANSI B: "<>setpagedevice" *PageSize AnsiC/ANSI C: "<>setpagedevice" *PageSize AnsiD/ANSI D: "<>setpagedevice" *PageSize AnsiE/ANSI E: "<>setpagedevice" *PageSize ArchA/Arch A: "<>setpagedevice" *PageSize ArchB/Arch B: "<>setpagedevice" *PageSize ArchC/Arch C: "<>setpagedevice" *PageSize ArchD/Arch D: "<>setpagedevice" *PageSize ArchE/Arch E: "<>setpagedevice" *PageSize C0/C0: "<>setpagedevice" *PageSize C1/C1: "<>setpagedevice" *PageSize C2/C2: "<>setpagedevice" *PageSize C3/C3: "<>setpagedevice" *PageSize C4/C4: "<>setpagedevice" *PageSize C5/C5: "<>setpagedevice" *PageSize Env10/Envelope #10: "<>setpagedevice" *PageSize EnvC5/Envelope C5: "<>setpagedevice" *PageSize EnvDL/Envelope DL: "<>setpagedevice" *PageSize EnvMonarch/Envelope Monarch: "<>setpagedevice" *PageSize Executive/Executive: "<>setpagedevice" *PageSize ISOB0/B0 (ISO): "<>setpagedevice" *PageSize ISOB1/B1 (ISO): "<>setpagedevice" *PageSize ISOB2/B2 (ISO): "<>setpagedevice" *PageSize ISOB3/B3 (ISO): "<>setpagedevice" *PageSize ISOB4/B4 (ISO): "<>setpagedevice" *PageSize ISOB5/B5 (ISO): "<>setpagedevice" *PageSize JISB0/B0 (JIS): "<>setpagedevice" *PageSize JISB1/B1 (JIS): "<>setpagedevice" *PageSize JISB2/B2 (JIS): "<>setpagedevice" *PageSize JISB3/B3 (JIS): "<>setpagedevice" *PageSize JISB4/B4 (JIS): "<>setpagedevice" *PageSize JISB5/B5 (JIS): "<>setpagedevice" *PageSize Ledger/Ledger: "<>setpagedevice" *PageSize Legal/US Legal: "<>setpagedevice" *PageSize Letter/US Letter: "<>setpagedevice" *PageSize RA0/RA0: "<>setpagedevice" *PageSize RA1/RA1: "<>setpagedevice" *PageSize RA2/RA2: "<>setpagedevice" *PageSize RA3/RA3: "<>setpagedevice" *PageSize RA4/RA4: "<>setpagedevice" *PageSize SRA0/SRA0: "<>setpagedevice" *PageSize SRA1/SRA1: "<>setpagedevice" *PageSize SRA2/SRA2: "<>setpagedevice" *PageSize SRA3/SRA3: "<>setpagedevice" *PageSize SRA4/SRA4: "<>setpagedevice" *PageSize SuperA/Super A: "<>setpagedevice" *PageSize SuperB/Super B: "<>setpagedevice" *PageSize TabloidExtra/Tabloid Extra: "<>setpagedevice" *PageSize Tabloid/Tabloid: "<>setpagedevice" *CloseUI: *PageSize *OpenUI *PageRegion: PickOne *OrderDependency: 100 AnySetup *PageRegion *DefaultPageRegion: A4 *PageRegion 11x14/11x14: "<>setpagedevice" *PageRegion 11x17/11x17: "<>setpagedevice" *PageRegion 13x19/13x19: "<>setpagedevice" *PageRegion 16x20/16x20: "<>setpagedevice" *PageRegion 16x24/16x24: "<>setpagedevice" *PageRegion 2A/2A: "<>setpagedevice" *PageRegion 4A/4A: "<>setpagedevice" *PageRegion 8x10/8x10: "<>setpagedevice" *PageRegion 8x12/8x12: "<>setpagedevice" *PageRegion A0/A0: "<>setpagedevice" *PageRegion A1/A1: "<>setpagedevice" *PageRegion A2/A2: "<>setpagedevice" *PageRegion A3/A3: "<>setpagedevice" *PageRegion A4/A4: "<>setpagedevice" *PageRegion A5/A5: "<>setpagedevice" *PageRegion AnsiA/ANSI A: "<>setpagedevice" *PageRegion AnsiB/ANSI B: "<>setpagedevice" *PageRegion AnsiC/ANSI C: "<>setpagedevice" *PageRegion AnsiD/ANSI D: "<>setpagedevice" *PageRegion AnsiE/ANSI E: "<>setpagedevice" *PageRegion ArchA/Arch A: "<>setpagedevice" *PageRegion ArchB/Arch B: "<>setpagedevice" *PageRegion ArchC/Arch C: "<>setpagedevice" *PageRegion ArchD/Arch D: "<>setpagedevice" *PageRegion ArchE/Arch E: "<>setpagedevice" *PageRegion C0/C0: "<>setpagedevice" *PageRegion C1/C1: "<>setpagedevice" *PageRegion C2/C2: "<>setpagedevice" *PageRegion C3/C3: "<>setpagedevice" *PageRegion C4/C4: "<>setpagedevice" *PageRegion C5/C5: "<>setpagedevice" *PageRegion Env10/Envelope #10: "<>setpagedevice" *PageRegion EnvC5/Envelope C5: "<>setpagedevice" *PageRegion EnvDL/Envelope DL: "<>setpagedevice" *PageRegion EnvMonarch/Envelope Monarch: "<>setpagedevice" *PageRegion Executive/Executive: "<>setpagedevice" *PageRegion ISOB0/B0 (ISO): "<>setpagedevice" *PageRegion ISOB1/B1 (ISO): "<>setpagedevice" *PageRegion ISOB2/B2 (ISO): "<>setpagedevice" *PageRegion ISOB3/B3 (ISO): "<>setpagedevice" *PageRegion ISOB4/B4 (ISO): "<>setpagedevice" *PageRegion ISOB5/B5 (ISO): "<>setpagedevice" *PageRegion JISB0/B0 (JIS): "<>setpagedevice" *PageRegion JISB1/B1 (JIS): "<>setpagedevice" *PageRegion JISB2/B2 (JIS): "<>setpagedevice" *PageRegion JISB3/B3 (JIS): "<>setpagedevice" *PageRegion JISB4/B4 (JIS): "<>setpagedevice" *PageRegion JISB5/B5 (JIS): "<>setpagedevice" *PageRegion Ledger/Ledger: "<>setpagedevice" *PageRegion Legal/US Legal: "<>setpagedevice" *PageRegion Letter/US Letter: "<>setpagedevice" *PageRegion RA0/RA0: "<>setpagedevice" *PageRegion RA1/RA1: "<>setpagedevice" *PageRegion RA2/RA2: "<>setpagedevice" *PageRegion RA3/RA3: "<>setpagedevice" *PageRegion RA4/RA4: "<>setpagedevice" *PageRegion SRA0/SRA0: "<>setpagedevice" *PageRegion SRA1/SRA1: "<>setpagedevice" *PageRegion SRA2/SRA2: "<>setpagedevice" *PageRegion SRA3/SRA3: "<>setpagedevice" *PageRegion SRA4/SRA4: "<>setpagedevice" *PageRegion SuperA/Super A: "<>setpagedevice" *PageRegion SuperB/Super B: "<>setpagedevice" *PageRegion TabloidExtra/Tabloid Extra: "<>setpagedevice" *PageRegion Tabloid/Tabloid: "<>setpagedevice" *CloseUI: *PageRegion *DefaultImageableArea: A4 *ImageableArea 11x14/11x14: "0 0 792 1008" *ImageableArea 11x17/11x17: "0 0 792 1224" *ImageableArea 13x19/13x19: "0 0 936 1368" *ImageableArea 16x20/16x20: "0 0 1152 1440" *ImageableArea 16x24/16x24: "0 0 1152 1728" *ImageableArea 2A/2A: "0 0 3370 4768" *ImageableArea 4A/4A: "0 0 4768 6749" *ImageableArea 8x10/8x10: "0 0 576 720" *ImageableArea 8x12/8x12: "0 0 576 864" *ImageableArea A0/A0: "0 0 2384 3370" *ImageableArea A1/A1: "0 0 1684 2384" *ImageableArea A2/A2: "0 0 1191 1684" *ImageableArea A3/A3: "0 0 842 1191" *ImageableArea A4/A4: "0 0 595 842" *ImageableArea A5/A5: "0 0 421 595" *ImageableArea AnsiA/ANSI A: "0 0 612 792" *ImageableArea AnsiB/ANSI B: "0 0 792 1224" *ImageableArea AnsiC/ANSI C: "0 0 1224 1584" *ImageableArea AnsiD/ANSI D: "0 0 1584 2448" *ImageableArea AnsiE/ANSI E: "0 0 2448 3168" *ImageableArea ArchA/Arch A: "0 0 648 864" *ImageableArea ArchB/Arch B: "0 0 864 1296" *ImageableArea ArchC/Arch C: "0 0 1296 1728" *ImageableArea ArchD/Arch D: "0 0 1728 2592" *ImageableArea ArchE/Arch E: "0 0 2592 3456" *ImageableArea C0/C0: "0 0 2599 3676" *ImageableArea C1/C1: "0 0 1836 2599" *ImageableArea C2/C2: "0 0 1298 1836" *ImageableArea C3/C3: "0 0 918 1298" *ImageableArea C4/C4: "0 0 649 918" *ImageableArea C5/C5: "0 0 459 649" *ImageableArea Env10/Envelope #10: "0 0 297 684" *ImageableArea EnvC5/Envelope C5: "0 0 459 649" *ImageableArea EnvDL/Envelope DL: "0 0 312 624" *ImageableArea EnvMonarch/Envelope Monarch: "0 0 279 540" *ImageableArea Executive/Executive: "0 0 522 756" *ImageableArea ISOB0/B0 (ISO): "0 0 2834 4008" *ImageableArea ISOB1/B1 (ISO): "0 0 2004 2834" *ImageableArea ISOB2/B2 (ISO): "0 0 1417 2004" *ImageableArea ISOB3/B3 (ISO): "0 0 1000 1417" *ImageableArea ISOB4/B4 (ISO): "0 0 708 1000" *ImageableArea ISOB5/B5 (ISO): "0 0 498 708" *ImageableArea JISB0/B0 (JIS): "0 0 2919 4127" *ImageableArea JISB1/B1 (JIS): "0 0 2063 2919" *ImageableArea JISB2/B2 (JIS): "0 0 1459 2063" *ImageableArea JISB3/B3 (JIS): "0 0 1029 1459" *ImageableArea JISB4/B4 (JIS): "0 0 727 1029" *ImageableArea JISB5/B5 (JIS): "0 0 518 727" *ImageableArea Ledger/Ledger: "0 0 1224 792" *ImageableArea Legal/US Legal: "0 0 612 1008" *ImageableArea Letter/US Letter: "0 0 612 792" *ImageableArea RA0/RA0: "0 0 2437 3458" *ImageableArea RA1/RA1: "0 0 1729 2437" *ImageableArea RA2/RA2: "0 0 1218 1729" *ImageableArea RA3/RA3: "0 0 864 1218" *ImageableArea RA4/RA4: "0 0 609 864" *ImageableArea SRA0/SRA0: "0 0 2551 3628" *ImageableArea SRA1/SRA1: "0 0 1814 2551" *ImageableArea SRA2/SRA2: "0 0 1275 1814" *ImageableArea SRA3/SRA3: "0 0 907 1275" *ImageableArea SRA4/SRA4: "0 0 637 907" *ImageableArea SuperA/Super A: "0 0 644 1008" *ImageableArea SuperB/Super B: "0 0 936 1368" *ImageableArea TabloidExtra/Tabloid Extra: "0 0 864 1296" *ImageableArea Tabloid/Tabloid: "0 0 792 1224" *DefaultPaperDimension: A4 *PaperDimension 11x14/11x14: "792 1008" *PaperDimension 11x17/11x17: "792 1224" *PaperDimension 13x19/13x19: "936 1368" *PaperDimension 16x20/16x20: "1152 1440" *PaperDimension 16x24/16x24: "1152 1728" *PaperDimension 2A/2A: "3370 4768" *PaperDimension 4A/4A: "4768 6749" *PaperDimension 8x10/8x10: "576 720" *PaperDimension 8x12/8x12: "576 864" *PaperDimension A0/A0: "2384 3370" *PaperDimension A1/A1: "1684 2384" *PaperDimension A2/A2: "1191 1684" *PaperDimension A3/A3: "842 1191" *PaperDimension A4/A4: "595 842" *PaperDimension A5/A5: "421 595" *PaperDimension AnsiA/ANSI A: "612 792" *PaperDimension AnsiB/ANSI B: "792 1224" *PaperDimension AnsiC/ANSI C: "1224 1584" *PaperDimension AnsiD/ANSI D: "1584 2448" *PaperDimension AnsiE/ANSI E: "2448 3168" *PaperDimension ArchA/Arch A: "648 864" *PaperDimension ArchB/Arch B: "864 1296" *PaperDimension ArchC/Arch C: "1296 1728" *PaperDimension ArchD/Arch D: "1728 2592" *PaperDimension ArchE/Arch E: "2592 3456" *PaperDimension C0/C0: "2599 3676" *PaperDimension C1/C1: "1836 2599" *PaperDimension C2/C2: "1298 1836" *PaperDimension C3/C3: "918 1298" *PaperDimension C4/C4: "649 918" *PaperDimension C5/C5: "459 649" *PaperDimension Env10/Envelope #10: "297 684" *PaperDimension EnvC5/Envelope C5: "459 649" *PaperDimension EnvDL/Envelope DL: "312 624" *PaperDimension EnvMonarch/Envelope Monarch: "279 540" *PaperDimension Executive/Executive: "522 756" *PaperDimension ISOB0/B0 (ISO): "2834 4008" *PaperDimension ISOB1/B1 (ISO): "2004 2834" *PaperDimension ISOB2/B2 (ISO): "1417 2004" *PaperDimension ISOB3/B3 (ISO): "1000 1417" *PaperDimension ISOB4/B4 (ISO): "708 1000" *PaperDimension ISOB5/B5 (ISO): "498 708" *PaperDimension JISB0/B0 (JIS): "2919 4127" *PaperDimension JISB1/B1 (JIS): "2063 2919" *PaperDimension JISB2/B2 (JIS): "1459 2063" *PaperDimension JISB3/B3 (JIS): "1029 1459" *PaperDimension JISB4/B4 (JIS): "727 1029" *PaperDimension JISB5/B5 (JIS): "518 727" *PaperDimension Ledger/Ledger: "1224 792" *PaperDimension Legal/US Legal: "612 1008" *PaperDimension Letter/US Letter: "612 792" *PaperDimension RA0/RA0: "2437 3458" *PaperDimension RA1/RA1: "1729 2437" *PaperDimension RA2/RA2: "1218 1729" *PaperDimension RA3/RA3: "864 1218" *PaperDimension RA4/RA4: "609 864" *PaperDimension SRA0/SRA0: "2551 3628" *PaperDimension SRA1/SRA1: "1814 2551" *PaperDimension SRA2/SRA2: "1275 1814" *PaperDimension SRA3/SRA3: "907 1275" *PaperDimension SRA4/SRA4: "637 907" *PaperDimension SuperA/Super A: "644 1008" *PaperDimension SuperB/Super B: "936 1368" *PaperDimension TabloidExtra/Tabloid Extra: "864 1296" *PaperDimension Tabloid/Tabloid: "792 1224" *OpenUI *Resolution/Output Resolution: PickOne *OrderDependency: 100 AnySetup *Resolution *DefaultResolution: 300dpi *Resolution 150dpi/150 DPI: "<>setpagedevice" *Resolution 300dpi/300 DPI: "<>setpagedevice" *Resolution 600dpi/600 DPI: "<>setpagedevice" *Resolution 1200dpi/1200 DPI: "<>setpagedevice" *Resolution 2400dpi/2400 DPI: "<>setpagedevice" *CloseUI: *Resolution *OpenUI *PDFVer/PDF version: PickOne *OrderDependency: 100 AnySetup *PDFVer *OPOptionHints PDFVer: "dropdown" *DefaultPDFVer: 1.2 *PDFVer 1.1/1.1: "" *PDFVer 1.2/1.2: "" *PDFVer 1.3/1.3: "" *PDFVer 1.4/1.4: "" *PDFVer 1.5/1.5: "" *CloseUI: *PDFVer *OpenUI *Truncate/Truncate output filename to: PickOne *OrderDependency: 100 AnySetup *Truncate *OPOptionHints Truncate: "dropdown" *DefaultTruncate: 64 *Truncate 8/8 Characters: aap *Truncate 16/16 Characters: noot *Truncate 32/32 Characters: mies *Truncate 64/64 Characters: wim *CloseUI: *Truncate *OpenUI *Label/Label outputfiles:PickOne *OrdeDependency: 100 AnySetup *Label *DefaultLabel: 2 *Label 0/Label only untitled documents with job-id: "" *Label 1/Prefix all documents with job-id: "" *Label 2/Suffix all documents with job-id: "" *CloseUI: *Label *OpenUI *TitlePref/Prefer title from:PickOne *OrdeDependency: 100 AnySetup *TitlePref *DefaultTitlePref: 0 *TitlePref 0/Title in postscript document: "" *TitlePref 1/Title passed via command-line1: "" *CloseUI: *TitlePref *OpenUI *LogType/Log level: PickOne *DefaultLogType: 7 *LogType 1/Only errors: "" *LogType 3/Error and status messages: "" *LogType 7/Debug, error and status messages: "" *CloseUI: *Logtype *CloseGroup: General *DefaultFont: Courier *Font AvantGarde-Book: Standard "(001.006S)" Standard ROM *Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM *Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM *Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM *Font Bookman-Demi: Standard "(001.004S)" Standard ROM *Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM *Font Bookman-Light: Standard "(001.004S)" Standard ROM *Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM *Font Courier: Standard "(002.004S)" Standard ROM *Font Courier-Bold: Standard "(002.004S)" Standard ROM *Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM *Font Courier-Oblique: Standard "(002.004S)" Standard ROM *Font Helvetica: Standard "(001.006S)" Standard ROM *Font Helvetica-Bold: Standard "(001.007S)" Standard ROM *Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM *Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM *Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM *Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM *Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM *Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM *Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM *Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM *Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM *Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM *Font Palatino-Bold: Standard "(001.005S)" Standard ROM *Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM *Font Palatino-Italic: Standard "(001.005S)" Standard ROM *Font Palatino-Roman: Standard "(001.005S)" Standard ROM *Font Symbol: Special "(001.007S)" Special ROM *Font Times-Bold: Standard "(001.007S)" Standard ROM *Font Times-BoldItalic: Standard "(001.009S)" Standard ROM *Font Times-Italic: Standard "(001.007S)" Standard ROM *Font Times-Roman: Standard "(001.007S)" Standard ROM *Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM *Font ZapfDingbats: Special "(001.004S)" Standard ROM *% *% End of "$Id: postscript.ppd,v 1.1.1.1 2000/08/24 19:23:13 goffioul Exp $". *% cups-pdf-3.0.2/extra/PaxHeaders/CUPS-PDF_noopt.ppd0000644000000000000000000000013212141430032016531 xustar0030 mtime=1367748634.876600773 30 atime=1742740114.120510103 30 ctime=1742740114.120510103 cups-pdf-3.0.2/extra/CUPS-PDF_noopt.ppd0000644000215500007650000005073112141430032020143 0ustar00vrbehrstaff00000000000000*PPD-Adobe: "4.3" *% *% "$Id: postscript.ppd,v 1.1.1.1 2000/08/24 19:23:13 goffioul Exp $" *% *% Sample Postscript driver PPD file for the Common UNIX Printing *% System (CUPS). *% *% Michael Goffioul *% *% Changes to the original file by Volker Behr, Martin-Eric Racine, *% Nickolay Kondrashov and other contributors: *% added IEEE-1284 device id - 2008-03-24 *% added custom page size - 2006-05-18 *% replaced page descriptions - 2006-05-18 *% InputSlot constraints removed - 2006-05-11 *% maxed out imageable regions - 2006-05-11 *% added pstitleiconv filter - 2006-05-11 *% added ledger paper size - 2006-01-29 *% match Adobe specifications - 2005-12-23 *% additional paper formats - 2005-02-03 and 2005-02-07 *% made A4 default paper size - 2005-02-03 *% Color enabled - 2003-12-02 *% *FormatVersion: "4.3" *FileVersion: "1.1" *LanguageVersion: English *LanguageEncoding: ISOLatin1 *PCFileName: "CUPS-PDF.PPD" *Manufacturer: "Generic" *Product: "(CUPS v1.1)" *ModelName: "Generic CUPS-PDF Printer" *ShortNickName: "Generic CUPS-PDF Printer" *NickName: "Generic CUPS-PDF Printer (no options)" *1284DeviceID: "MFG:Generic;MDL:CUPS-PDF Printer;DES:Generic CUPS-PDF Printer;CLS:PRINTER;CMD:POSTSCRIPT;" *% cupsFilter: "application/vnd.cups-postscript 0 pstitleiconv" *PSVersion: "(2017.000) 0" *LanguageLevel: "2" *ColorDevice: True *DefaultColorSpace: RGB *FileSystem: False *Throughput: "8" *LandscapeOrientation: Plus90 *TTRasterizer: Type42 *HWMargins: 0 0 0 0 *VariablePaperSize: True *MaxMediaWidth: 100000 *MaxMediaHeight: 100000 *NonUIOrderDependency: 100 AnySetup *CustomPageSize *CustomPageSize True: "pop pop pop <>setpagedevice" *End *ParamCustomPageSize Width: 1 points 36 100000 *ParamCustomPageSize Height: 2 points 36 100000 *ParamCustomPageSize Orientation: 3 int 0 3 *ParamCustomPageSize WidthOffset: 4 points 0 0 *ParamCustomPageSize HeightOffset: 5 points 0 0 *OpenGroup: General/General *OpenUI *PageSize/Page Size: PickOne *OrderDependency: 100 AnySetup *PageSize *DefaultPageSize: A4 *PageSize 11x14/11x14: "<>setpagedevice" *PageSize 11x17/11x17: "<>setpagedevice" *PageSize 13x19/13x19: "<>setpagedevice" *PageSize 16x20/16x20: "<>setpagedevice" *PageSize 16x24/16x24: "<>setpagedevice" *PageSize 2A/2A: "<>setpagedevice" *PageSize 4A/4A: "<>setpagedevice" *PageSize 8x10/8x10: "<>setpagedevice" *PageSize 8x12/8x12: "<>setpagedevice" *PageSize A0/A0: "<>setpagedevice" *PageSize A1/A1: "<>setpagedevice" *PageSize A2/A2: "<>setpagedevice" *PageSize A3/A3: "<>setpagedevice" *PageSize A4/A4: "<>setpagedevice" *PageSize A5/A5: "<>setpagedevice" *PageSize AnsiA/ANSI A: "<>setpagedevice" *PageSize AnsiB/ANSI B: "<>setpagedevice" *PageSize AnsiC/ANSI C: "<>setpagedevice" *PageSize AnsiD/ANSI D: "<>setpagedevice" *PageSize AnsiE/ANSI E: "<>setpagedevice" *PageSize ArchA/Arch A: "<>setpagedevice" *PageSize ArchB/Arch B: "<>setpagedevice" *PageSize ArchC/Arch C: "<>setpagedevice" *PageSize ArchD/Arch D: "<>setpagedevice" *PageSize ArchE/Arch E: "<>setpagedevice" *PageSize C0/C0: "<>setpagedevice" *PageSize C1/C1: "<>setpagedevice" *PageSize C2/C2: "<>setpagedevice" *PageSize C3/C3: "<>setpagedevice" *PageSize C4/C4: "<>setpagedevice" *PageSize C5/C5: "<>setpagedevice" *PageSize Env10/Envelope #10: "<>setpagedevice" *PageSize EnvC5/Envelope C5: "<>setpagedevice" *PageSize EnvDL/Envelope DL: "<>setpagedevice" *PageSize EnvMonarch/Envelope Monarch: "<>setpagedevice" *PageSize Executive/Executive: "<>setpagedevice" *PageSize ISOB0/B0 (ISO): "<>setpagedevice" *PageSize ISOB1/B1 (ISO): "<>setpagedevice" *PageSize ISOB2/B2 (ISO): "<>setpagedevice" *PageSize ISOB3/B3 (ISO): "<>setpagedevice" *PageSize ISOB4/B4 (ISO): "<>setpagedevice" *PageSize ISOB5/B5 (ISO): "<>setpagedevice" *PageSize JISB0/B0 (JIS): "<>setpagedevice" *PageSize JISB1/B1 (JIS): "<>setpagedevice" *PageSize JISB2/B2 (JIS): "<>setpagedevice" *PageSize JISB3/B3 (JIS): "<>setpagedevice" *PageSize JISB4/B4 (JIS): "<>setpagedevice" *PageSize JISB5/B5 (JIS): "<>setpagedevice" *PageSize Ledger/Ledger: "<>setpagedevice" *PageSize Legal/US Legal: "<>setpagedevice" *PageSize Letter/US Letter: "<>setpagedevice" *PageSize RA0/RA0: "<>setpagedevice" *PageSize RA1/RA1: "<>setpagedevice" *PageSize RA2/RA2: "<>setpagedevice" *PageSize RA3/RA3: "<>setpagedevice" *PageSize RA4/RA4: "<>setpagedevice" *PageSize SRA0/SRA0: "<>setpagedevice" *PageSize SRA1/SRA1: "<>setpagedevice" *PageSize SRA2/SRA2: "<>setpagedevice" *PageSize SRA3/SRA3: "<>setpagedevice" *PageSize SRA4/SRA4: "<>setpagedevice" *PageSize SuperA/Super A: "<>setpagedevice" *PageSize SuperB/Super B: "<>setpagedevice" *PageSize TabloidExtra/Tabloid Extra: "<>setpagedevice" *PageSize Tabloid/Tabloid: "<>setpagedevice" *CloseUI: *PageSize *OpenUI *PageRegion: PickOne *OrderDependency: 100 AnySetup *PageRegion *DefaultPageRegion: A4 *PageRegion 11x14/11x14: "<>setpagedevice" *PageRegion 11x17/11x17: "<>setpagedevice" *PageRegion 13x19/13x19: "<>setpagedevice" *PageRegion 16x20/16x20: "<>setpagedevice" *PageRegion 16x24/16x24: "<>setpagedevice" *PageRegion 2A/2A: "<>setpagedevice" *PageRegion 4A/4A: "<>setpagedevice" *PageRegion 8x10/8x10: "<>setpagedevice" *PageRegion 8x12/8x12: "<>setpagedevice" *PageRegion A0/A0: "<>setpagedevice" *PageRegion A1/A1: "<>setpagedevice" *PageRegion A2/A2: "<>setpagedevice" *PageRegion A3/A3: "<>setpagedevice" *PageRegion A4/A4: "<>setpagedevice" *PageRegion A5/A5: "<>setpagedevice" *PageRegion AnsiA/ANSI A: "<>setpagedevice" *PageRegion AnsiB/ANSI B: "<>setpagedevice" *PageRegion AnsiC/ANSI C: "<>setpagedevice" *PageRegion AnsiD/ANSI D: "<>setpagedevice" *PageRegion AnsiE/ANSI E: "<>setpagedevice" *PageRegion ArchA/Arch A: "<>setpagedevice" *PageRegion ArchB/Arch B: "<>setpagedevice" *PageRegion ArchC/Arch C: "<>setpagedevice" *PageRegion ArchD/Arch D: "<>setpagedevice" *PageRegion ArchE/Arch E: "<>setpagedevice" *PageRegion C0/C0: "<>setpagedevice" *PageRegion C1/C1: "<>setpagedevice" *PageRegion C2/C2: "<>setpagedevice" *PageRegion C3/C3: "<>setpagedevice" *PageRegion C4/C4: "<>setpagedevice" *PageRegion C5/C5: "<>setpagedevice" *PageRegion Env10/Envelope #10: "<>setpagedevice" *PageRegion EnvC5/Envelope C5: "<>setpagedevice" *PageRegion EnvDL/Envelope DL: "<>setpagedevice" *PageRegion EnvMonarch/Envelope Monarch: "<>setpagedevice" *PageRegion Executive/Executive: "<>setpagedevice" *PageRegion ISOB0/B0 (ISO): "<>setpagedevice" *PageRegion ISOB1/B1 (ISO): "<>setpagedevice" *PageRegion ISOB2/B2 (ISO): "<>setpagedevice" *PageRegion ISOB3/B3 (ISO): "<>setpagedevice" *PageRegion ISOB4/B4 (ISO): "<>setpagedevice" *PageRegion ISOB5/B5 (ISO): "<>setpagedevice" *PageRegion JISB0/B0 (JIS): "<>setpagedevice" *PageRegion JISB1/B1 (JIS): "<>setpagedevice" *PageRegion JISB2/B2 (JIS): "<>setpagedevice" *PageRegion JISB3/B3 (JIS): "<>setpagedevice" *PageRegion JISB4/B4 (JIS): "<>setpagedevice" *PageRegion JISB5/B5 (JIS): "<>setpagedevice" *PageRegion Ledger/Ledger: "<>setpagedevice" *PageRegion Legal/US Legal: "<>setpagedevice" *PageRegion Letter/US Letter: "<>setpagedevice" *PageRegion RA0/RA0: "<>setpagedevice" *PageRegion RA1/RA1: "<>setpagedevice" *PageRegion RA2/RA2: "<>setpagedevice" *PageRegion RA3/RA3: "<>setpagedevice" *PageRegion RA4/RA4: "<>setpagedevice" *PageRegion SRA0/SRA0: "<>setpagedevice" *PageRegion SRA1/SRA1: "<>setpagedevice" *PageRegion SRA2/SRA2: "<>setpagedevice" *PageRegion SRA3/SRA3: "<>setpagedevice" *PageRegion SRA4/SRA4: "<>setpagedevice" *PageRegion SuperA/Super A: "<>setpagedevice" *PageRegion SuperB/Super B: "<>setpagedevice" *PageRegion TabloidExtra/Tabloid Extra: "<>setpagedevice" *PageRegion Tabloid/Tabloid: "<>setpagedevice" *CloseUI: *PageRegion *DefaultImageableArea: A4 *ImageableArea 11x14/11x14: "0 0 792 1008" *ImageableArea 11x17/11x17: "0 0 792 1224" *ImageableArea 13x19/13x19: "0 0 936 1368" *ImageableArea 16x20/16x20: "0 0 1152 1440" *ImageableArea 16x24/16x24: "0 0 1152 1728" *ImageableArea 2A/2A: "0 0 3370 4768" *ImageableArea 4A/4A: "0 0 4768 6749" *ImageableArea 8x10/8x10: "0 0 576 720" *ImageableArea 8x12/8x12: "0 0 576 864" *ImageableArea A0/A0: "0 0 2384 3370" *ImageableArea A1/A1: "0 0 1684 2384" *ImageableArea A2/A2: "0 0 1191 1684" *ImageableArea A3/A3: "0 0 842 1191" *ImageableArea A4/A4: "0 0 595 842" *ImageableArea A5/A5: "0 0 421 595" *ImageableArea AnsiA/ANSI A: "0 0 612 792" *ImageableArea AnsiB/ANSI B: "0 0 792 1224" *ImageableArea AnsiC/ANSI C: "0 0 1224 1584" *ImageableArea AnsiD/ANSI D: "0 0 1584 2448" *ImageableArea AnsiE/ANSI E: "0 0 2448 3168" *ImageableArea ArchA/Arch A: "0 0 648 864" *ImageableArea ArchB/Arch B: "0 0 864 1296" *ImageableArea ArchC/Arch C: "0 0 1296 1728" *ImageableArea ArchD/Arch D: "0 0 1728 2592" *ImageableArea ArchE/Arch E: "0 0 2592 3456" *ImageableArea C0/C0: "0 0 2599 3676" *ImageableArea C1/C1: "0 0 1836 2599" *ImageableArea C2/C2: "0 0 1298 1836" *ImageableArea C3/C3: "0 0 918 1298" *ImageableArea C4/C4: "0 0 649 918" *ImageableArea C5/C5: "0 0 459 649" *ImageableArea Env10/Envelope #10: "0 0 297 684" *ImageableArea EnvC5/Envelope C5: "0 0 459 649" *ImageableArea EnvDL/Envelope DL: "0 0 312 624" *ImageableArea EnvMonarch/Envelope Monarch: "0 0 279 540" *ImageableArea Executive/Executive: "0 0 522 756" *ImageableArea ISOB0/B0 (ISO): "0 0 2834 4008" *ImageableArea ISOB1/B1 (ISO): "0 0 2004 2834" *ImageableArea ISOB2/B2 (ISO): "0 0 1417 2004" *ImageableArea ISOB3/B3 (ISO): "0 0 1000 1417" *ImageableArea ISOB4/B4 (ISO): "0 0 708 1000" *ImageableArea ISOB5/B5 (ISO): "0 0 498 708" *ImageableArea JISB0/B0 (JIS): "0 0 2919 4127" *ImageableArea JISB1/B1 (JIS): "0 0 2063 2919" *ImageableArea JISB2/B2 (JIS): "0 0 1459 2063" *ImageableArea JISB3/B3 (JIS): "0 0 1029 1459" *ImageableArea JISB4/B4 (JIS): "0 0 727 1029" *ImageableArea JISB5/B5 (JIS): "0 0 518 727" *ImageableArea Ledger/Ledger: "0 0 1224 792" *ImageableArea Legal/US Legal: "0 0 612 1008" *ImageableArea Letter/US Letter: "0 0 612 792" *ImageableArea RA0/RA0: "0 0 2437 3458" *ImageableArea RA1/RA1: "0 0 1729 2437" *ImageableArea RA2/RA2: "0 0 1218 1729" *ImageableArea RA3/RA3: "0 0 864 1218" *ImageableArea RA4/RA4: "0 0 609 864" *ImageableArea SRA0/SRA0: "0 0 2551 3628" *ImageableArea SRA1/SRA1: "0 0 1814 2551" *ImageableArea SRA2/SRA2: "0 0 1275 1814" *ImageableArea SRA3/SRA3: "0 0 907 1275" *ImageableArea SRA4/SRA4: "0 0 637 907" *ImageableArea SuperA/Super A: "0 0 644 1008" *ImageableArea SuperB/Super B: "0 0 936 1368" *ImageableArea TabloidExtra/Tabloid Extra: "0 0 864 1296" *ImageableArea Tabloid/Tabloid: "0 0 792 1224" *DefaultPaperDimension: A4 *PaperDimension 11x14/11x14: "792 1008" *PaperDimension 11x17/11x17: "792 1224" *PaperDimension 13x19/13x19: "936 1368" *PaperDimension 16x20/16x20: "1152 1440" *PaperDimension 16x24/16x24: "1152 1728" *PaperDimension 2A/2A: "3370 4768" *PaperDimension 4A/4A: "4768 6749" *PaperDimension 8x10/8x10: "576 720" *PaperDimension 8x12/8x12: "576 864" *PaperDimension A0/A0: "2384 3370" *PaperDimension A1/A1: "1684 2384" *PaperDimension A2/A2: "1191 1684" *PaperDimension A3/A3: "842 1191" *PaperDimension A4/A4: "595 842" *PaperDimension A5/A5: "421 595" *PaperDimension AnsiA/ANSI A: "612 792" *PaperDimension AnsiB/ANSI B: "792 1224" *PaperDimension AnsiC/ANSI C: "1224 1584" *PaperDimension AnsiD/ANSI D: "1584 2448" *PaperDimension AnsiE/ANSI E: "2448 3168" *PaperDimension ArchA/Arch A: "648 864" *PaperDimension ArchB/Arch B: "864 1296" *PaperDimension ArchC/Arch C: "1296 1728" *PaperDimension ArchD/Arch D: "1728 2592" *PaperDimension ArchE/Arch E: "2592 3456" *PaperDimension C0/C0: "2599 3676" *PaperDimension C1/C1: "1836 2599" *PaperDimension C2/C2: "1298 1836" *PaperDimension C3/C3: "918 1298" *PaperDimension C4/C4: "649 918" *PaperDimension C5/C5: "459 649" *PaperDimension Env10/Envelope #10: "297 684" *PaperDimension EnvC5/Envelope C5: "459 649" *PaperDimension EnvDL/Envelope DL: "312 624" *PaperDimension EnvMonarch/Envelope Monarch: "279 540" *PaperDimension Executive/Executive: "522 756" *PaperDimension ISOB0/B0 (ISO): "2834 4008" *PaperDimension ISOB1/B1 (ISO): "2004 2834" *PaperDimension ISOB2/B2 (ISO): "1417 2004" *PaperDimension ISOB3/B3 (ISO): "1000 1417" *PaperDimension ISOB4/B4 (ISO): "708 1000" *PaperDimension ISOB5/B5 (ISO): "498 708" *PaperDimension JISB0/B0 (JIS): "2919 4127" *PaperDimension JISB1/B1 (JIS): "2063 2919" *PaperDimension JISB2/B2 (JIS): "1459 2063" *PaperDimension JISB3/B3 (JIS): "1029 1459" *PaperDimension JISB4/B4 (JIS): "727 1029" *PaperDimension JISB5/B5 (JIS): "518 727" *PaperDimension Ledger/Ledger: "1224 792" *PaperDimension Legal/US Legal: "612 1008" *PaperDimension Letter/US Letter: "612 792" *PaperDimension RA0/RA0: "2437 3458" *PaperDimension RA1/RA1: "1729 2437" *PaperDimension RA2/RA2: "1218 1729" *PaperDimension RA3/RA3: "864 1218" *PaperDimension RA4/RA4: "609 864" *PaperDimension SRA0/SRA0: "2551 3628" *PaperDimension SRA1/SRA1: "1814 2551" *PaperDimension SRA2/SRA2: "1275 1814" *PaperDimension SRA3/SRA3: "907 1275" *PaperDimension SRA4/SRA4: "637 907" *PaperDimension SuperA/Super A: "644 1008" *PaperDimension SuperB/Super B: "936 1368" *PaperDimension TabloidExtra/Tabloid Extra: "864 1296" *PaperDimension Tabloid/Tabloid: "792 1224" *OpenUI *Resolution/Output Resolution: PickOne *OrderDependency: 100 AnySetup *Resolution *DefaultResolution: 300dpi *Resolution 150dpi/150 DPI: "<>setpagedevice" *Resolution 300dpi/300 DPI: "<>setpagedevice" *Resolution 600dpi/600 DPI: "<>setpagedevice" *Resolution 1200dpi/1200 DPI: "<>setpagedevice" *Resolution 2400dpi/2400 DPI: "<>setpagedevice" *CloseUI: *Resolution *CloseGroup: General *DefaultFont: Courier *Font AvantGarde-Book: Standard "(001.006S)" Standard ROM *Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM *Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM *Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM *Font Bookman-Demi: Standard "(001.004S)" Standard ROM *Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM *Font Bookman-Light: Standard "(001.004S)" Standard ROM *Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM *Font Courier: Standard "(002.004S)" Standard ROM *Font Courier-Bold: Standard "(002.004S)" Standard ROM *Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM *Font Courier-Oblique: Standard "(002.004S)" Standard ROM *Font Helvetica: Standard "(001.006S)" Standard ROM *Font Helvetica-Bold: Standard "(001.007S)" Standard ROM *Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM *Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM *Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM *Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM *Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM *Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM *Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM *Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM *Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM *Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM *Font Palatino-Bold: Standard "(001.005S)" Standard ROM *Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM *Font Palatino-Italic: Standard "(001.005S)" Standard ROM *Font Palatino-Roman: Standard "(001.005S)" Standard ROM *Font Symbol: Special "(001.007S)" Special ROM *Font Times-Bold: Standard "(001.007S)" Standard ROM *Font Times-BoldItalic: Standard "(001.009S)" Standard ROM *Font Times-Italic: Standard "(001.007S)" Standard ROM *Font Times-Roman: Standard "(001.007S)" Standard ROM *Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM *Font ZapfDingbats: Special "(001.004S)" Standard ROM *% *% End of "$Id: postscript.ppd,v 1.1.1.1 2000/08/24 19:23:13 goffioul Exp $". *% cups-pdf-3.0.2/extra/PaxHeaders/cups-pdf.conf0000644000000000000000000000013214770021254016030 xustar0030 mtime=1742742188.552564822 30 atime=1742742193.156485252 30 ctime=1742742188.552564822 cups-pdf-3.0.2/extra/cups-pdf.conf0000644000215500007650000002475714770021254017453 0ustar00vrbehrstaff00000000000000# cups-pdf.conf -- CUPS Backend Configuration (version 3.0.2, 2025-03-23) # 18.09.2005, Volker C. Behr # volker@cups-pdf.de # http://www.cups-pdf.de # # # This code may be freely distributed as long as this header # is preserved. Changes to the code should be clearly indicated. # # This code is distributed under the GPL. # (http://www.gnu.org/copyleft/gpl.html) # # For more detailed licensing information see cups-pdf.c in the # corresponding version number. ########################################################################### # # # This is the configuration file for CUPS-PDF. Values that are not set in # # here will use the defaults. Changes take effect immediately without the # # need for restarting any services. # # # # Take care not to add whitespaces at the end of a line! # # # # Options are marked where they can be set (setting via PPD requires the # # PPD file that comes with CUPS-PDF to be used!). # # Options passed via lpoptions that are not named for lpoptions here are # # ignored. # # Options precedence is as follows: # # 1st: lpoptions # # 2nd: PPD settings # # 3rd: config file (this file) # # 4th: default values # ########################################################################### ########################################################################### # # # Path Settings # # # ########################################################################### ### Key: Out (config) ## CUPS-PDF output directory ## special qualifiers: ## ${HOME} will be expanded to the user's home directory ## ${USER} will be expanded to the user name ## in case it is an NFS export make sure it is exported without ## root_squash! ### Default: /var/spool/cups-pdf/${USER} #Out /var/spool/cups-pdf/${USER} ### Key: AnonDirName (config) ## ABSOLUTE path for anonymously created PDF files ## if anonymous access is disabled this setting has no effect ### Default: /var/spool/cups-pdf/ANONYMOUS #AnonDirName /var/spool/cups-pdf/ANONYMOUS ### Key: Spool (config) ## CUPS-PDF spool directory - make sure there is no user 'SPOOL' on your ## system or change the path ### Default: /var/spool/cups-pdf/SPOOL #Spool /var/spool/cups-pdf/SPOOL ########################################################################### # # # Filename Settings # # # ########################################################################### ### Key: Truncate (config, ppd, lpoptions) ## truncate long filenames to a maximum of characters ## this does not consider the full path to the output but only the filename ## without the .pdf-extension or a job-id prefix (see 'Label') ## the minimal value is 8 ### Default: 64 #Truncate 64 ### Key: Cut (config, lpoptions) ## removing file name extensions before appending .pdf to output ## extensions will only be removed if _both_ the following criteria are met: ## - the extension (w/o the dot) is not longer than characters ## - the remaining filename has a minimal length of 1 character ## set Cut to -1 in order to disable cutting ## recommended values: pure UNIX environment : -1 ## mixed environments : 3 ### Default: 3 #Cut 3 ### Key: Label (config, ppd, lpoptions) ## label all jobs with a unique job-id in order to avoid overwriting old ## files in case new ones with identical names are created; always true for ## untitled documents ## 0: label untitled documents only ## 1: label all documents with a preceeding "job_#-" ## 2: label all documents with a tailing "-job_#" ### Default: 0 #Label 0 ### Key: TitlePref (config, ppd, lpoptions) ## where to look first for a title when creating the output filename ## (title in PS file or title on commandline): ## 0: prefer title from %Title statement in the PS file ## 1: prefer title passed via commandline ### Default: 0 #TitlePref 0 ########################################################################### # # # User Settings # # # ########################################################################### ### Key: AnonUser (config) ## uid for anonymous PDF creation (this might be a security issue) ## this setting has no influence on AnonDirName (see there) ## set this to an empty value to disable anonymous ### Default: nobody #AnonUser nobody ### Key: LowerCase (config) ## This options allows to check user names given to CUPS-PDF additionally ## against their lower case variants. This is necessary since in some ## Windows environments only upper case user names are passed. Usually UNIX ## user names are all lower case and it is save to use this option ## but be aware that it can lead to mis-identifications in case ## you have user names that differ only in upper/lower case. ## check only against user name as passed to CUPS : 0 ## check additionally against lower case user name : 1 ### Default: 1 #LowerCase 1 ### Key: UserPrefix (config) ## some installations require a domain prefix added to the user name ## leave empty for no prefix ### Default: #UserPrefix ### Key: DirPrefix (config) ## if a prefix was defined above this switch toggels whether to include ## the prefix in the output directory's name (if not $HOME) or not ## 0: do not include, 1: include ### Default: 0 #DirPrefix 0 ### Key: RemovePrefix (config) ## some installation pass usernames with a prefix (usually a domain name) ## if you do not want this prefix to be used by the ${USER} variable for ## output directories put the part which is to be cut here ### Default: #RemovePrefix ########################################################################### # # # Security Settings # # # ########################################################################### ### Key: AnonUMask (config) ## umask for anonymous output ## these are the _inverse_ permissions to be granted ### Default: 0000 #AnonUMask 0000 ### Key: UserUMask (config, lptoptions) ## umask for user output of known users ## changing this can introduce security leaks if confidential ## information is processed! ### Default: 0077 #UserUMask 0077 ### Key: Grp (config) ## group cups-pdf is supposed to run as - this will also be the gid for all ## created directories and log files ### Default: lp #Grp lp ### Key: AllowUnsafeOptions (config) ## DON'T CHANGE THIS SETTING UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING ## set to 1 in order to allow users to override any option - including ## those that pose SEVERE SECURITY RISKS, set to 0 for full security ### Default: 0 #AllowUnsafeOptions 0 ########################################################################### # # # Log Settings # # # ########################################################################### ### Key: Log (config) ## CUPS-PDF log directory ## set this to an empty value to disable all logging ### Default: /var/log/cups #Log /var/log/cups ### Key: LogType (config, ppd) ## log-mode ## 1: errors ## 2: status (i.e. activity) ## 4: debug - this will generate a lot of log-output! ## add up values to combine options, i.e. 7 is full logging ## if logging is disabled these setting have no effect ### Default: 3 #LogType 3 ########################################################################### # # # PDF Conversion Settings # # # ########################################################################### ### Key: GhostScript (config) ## location of GhostScript binary (gs) ## MacOSX: for using pstopdf (recommended) set this to /usr/bin/pstopdf ## or its proper location on your system ### Default: /usr/bin/gs #GhostScript /usr/bin/gs ### Key: GSTmp (config) ## location of temporary files during GhostScript operation ## this must be user-writable like /var/tmp or /tmp ! ### Default: /var/tmp #GSTmp /var/tmp ### Key: GSCall (config) ## command line for calling GhostScript (!!! DO NOT USE NEWLINES !!!) ## MacOSX: for using pstopdf set this to %s %s -o %s %s ### Default: %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress %s #GSCall %s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress %s ### Key: PDFVer (config, ppd, lptopions) ## PDF version to be created - can be "1.5", "1.4", "1.3" or "1.2" ## MacOSX: for using pstopdf set this to an empty value ### Default: 1.4 #PDFVer 1.4 ### Key: PostProcessing (config, lptoptions) ## postprocessing script that will be called after the creation of the PDF ## as arguments the filename of the PDF, the username as determined by ## CUPS-PDF and the one as given to CUPS-PDF will be passed ## the script will be called with user privileges ## set this to an empty value to use no postprocessing ### Default: #PostProcessing ########################################################################### # # # Experimental Settings # # These settings activate experimental options. If you decide to use # # them I would appreciate any feedback - including an 'ok' if they # # work as expected - so I can eventually put them into the non- # # experimental sections. # # # ########################################################################### ### Key: DecodeHexStrings (config) ## this option will try to decode hex strings in the title to allow ## internationalized titles ## (have a look at pstitleconv on www.cups-pdf.de for a suitable filter ## for data from Windows clients) ## 0: disable, 1: enable ### Default: 0 #DecodeHexStrings 0 ### Key: FixNewlines (config) ## this option will try to fix various unusal line delimiters (e.g. ## form feeds) ## especially useful when using non-Linux-generated files ## 0: disable, 1: enable ### Default: 0 #FixNewlines 0 cups-pdf-3.0.2/PaxHeaders/src0000644000000000000000000000013214770021633013030 xustar0030 mtime=1742742427.872429154 30 atime=1742742414.972652024 30 ctime=1742742427.872429154 cups-pdf-3.0.2/src/0000755000215500007650000000000014770021633014511 5ustar00vrbehrstaff00000000000000cups-pdf-3.0.2/src/PaxHeaders/cups-pdf.h0000644000000000000000000000013214770021310014767 xustar0030 mtime=1742742216.584080334 30 atime=1742742404.100839873 30 ctime=1742742216.588080266 cups-pdf-3.0.2/src/cups-pdf.h0000644000215500007650000001156214770021310016400 0ustar00vrbehrstaff00000000000000/* cups-pdf.h -- CUPS Backend Header File (version 3.0.2, 2025-03-23) 16.05.2003, Volker C. Behr volker@cups-pdf.de http://www.cups-pdf.de This code may be freely distributed as long as this header is preserved. Changes to the code should be clearly indicated. This code is distributed under the GPL. (http://www.gnu.org/copyleft/gpl.html) For more detailed licensing information see cups-pdf.c in the corresponding version number. */ /* User-customizable settings - if unsure leave the default values / they are reasonable for most systems. */ /* location of the configuration file */ #define CP_CONFIG_PATH "/etc/cups" /* --- DO NOT EDIT BELOW THIS LINE --- */ /* The following settings are for internal purposes only - all relevant / options listed below can be set via cups-pdf.conf at runtime */ #define CPVERSION "v3.1.0" #define CPERROR 1 #define CPSTATUS 2 #define CPDEBUG 4 #define BUFSIZE 4096 #define TBUFSIZE "4096" typedef char cp_string[BUFSIZE]; #define SEC_CONF 1 #define SEC_PPD 2 #define SEC_LPOPT 4 /* order in the enum and the struct-array has to be identical! */ enum configOptions { AnonDirName, AnonUser, GhostScript, GSCall, Grp, GSTmp, Log, PDFVer, PostProcessing, Out, Spool, UserPrefix, RemovePrefix, OutExtension, Cut, Truncate, DirPrefix, Label, LogType, LowerCase, TitlePref, DecodeHexStrings, FixNewlines, AllowUnsafeOptions, AnonUMask, UserUMask, END_OF_OPTIONS }; struct { char *key_name; int security; union { cp_string sval; int ival; mode_t modval; } value; } configData[] = { { "AnonDirName", SEC_CONF|SEC_PPD, { "/var/spool/cups-pdf/ANONYMOUS" } }, { "AnonUser", SEC_CONF|SEC_PPD, { "nobody" } }, { "GhostScript", SEC_CONF|SEC_PPD, { "/usr/bin/gs" } }, { "GSCall", SEC_CONF|SEC_PPD, { "%s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=\"%s\" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress %s" } }, { "Grp", SEC_CONF|SEC_PPD, { "lp" } }, { "GSTmp", SEC_CONF|SEC_PPD, { "TMPDIR=/var/tmp" } }, { "Log", SEC_CONF|SEC_PPD, { "/var/log/cups" } }, { "PDFVer", SEC_CONF|SEC_PPD|SEC_LPOPT, { "1.4" } }, { "PostProcessing", SEC_CONF|SEC_PPD|SEC_LPOPT, { "" } }, { "Out", SEC_CONF|SEC_PPD, { "/var/spool/cups-pdf/${USER}" } }, { "Spool", SEC_CONF|SEC_PPD, { "/var/spool/cups-pdf/SPOOL" } }, { "UserPrefix", SEC_CONF|SEC_PPD, { "" } }, { "RemovePrefix", SEC_CONF|SEC_PPD, { "" } }, { "OutExtension", SEC_CONF|SEC_PPD|SEC_LPOPT, { "pdf" } }, { "Cut", SEC_CONF|SEC_PPD|SEC_LPOPT, {{ 3 }} }, { "Truncate", SEC_CONF|SEC_PPD|SEC_LPOPT, {{ 64 }} }, { "DirPrefix", SEC_CONF|SEC_PPD, {{ 0 }} }, { "Label", SEC_CONF|SEC_PPD|SEC_LPOPT, {{ 0 }} }, { "LogType", SEC_CONF|SEC_PPD, {{ 3 }} }, { "LowerCase", SEC_CONF|SEC_PPD, {{ 1 }} }, { "TitlePref", SEC_CONF|SEC_PPD|SEC_LPOPT, {{ 0 }} }, { "DecodeHexStrings", SEC_CONF|SEC_PPD, {{ 0 }} }, { "FixNewlines", SEC_CONF|SEC_PPD, {{ 0 }} }, { "AllowUnsafeOptions", SEC_CONF|SEC_PPD, {{ 0 }} }, { "AnonUmask", SEC_CONF|SEC_PPD, {{ 0000 }} }, { "UserUMask", SEC_CONF|SEC_PPD|SEC_LPOPT, {{ 0077 }} }, }; #define Conf_AnonDirName configData[AnonDirName].value.sval #define Conf_AnonUser configData[AnonUser].value.sval #define Conf_GhostScript configData[GhostScript].value.sval #define Conf_GSCall configData[GSCall].value.sval #define Conf_Grp configData[Grp].value.sval #define Conf_GSTmp configData[GSTmp].value.sval #define Conf_Log configData[Log].value.sval #define Conf_PDFVer configData[PDFVer].value.sval #define Conf_PostProcessing configData[PostProcessing].value.sval #define Conf_Out configData[Out].value.sval #define Conf_Spool configData[Spool].value.sval #define Conf_UserPrefix configData[UserPrefix].value.sval #define Conf_RemovePrefix configData[RemovePrefix].value.sval #define Conf_OutExtension configData[OutExtension].value.sval #define Conf_Cut configData[Cut].value.ival #define Conf_Truncate configData[Truncate].value.ival #define Conf_DirPrefix configData[DirPrefix].value.ival #define Conf_Label configData[Label].value.ival #define Conf_LogType configData[LogType].value.ival #define Conf_LowerCase configData[LowerCase].value.ival #define Conf_TitlePref configData[TitlePref].value.ival #define Conf_DecodeHexStrings configData[DecodeHexStrings].value.ival #define Conf_FixNewlines configData[FixNewlines].value.ival #define Conf_AllowUnsafeOptions configData[AllowUnsafeOptions].value.ival #define Conf_AnonUMask configData[AnonUMask].value.modval #define Conf_UserUMask configData[UserUMask].value.modval cups-pdf-3.0.2/src/PaxHeaders/cups-pdf.c0000644000000000000000000000013214770021633014772 xustar0030 mtime=1742742427.860429362 30 atime=1742742427.860429362 30 ctime=1742742427.868429223 cups-pdf-3.0.2/src/cups-pdf.c0000644000215500007650000014364214770021633016410 0ustar00vrbehrstaff00000000000000/* cups-pdf.c -- CUPS Backend (version 3.0.2, 2025-03-23) 08.02.2003, Volker C. Behr volker@cups-pdf.de http://www.cups-pdf.de This code may be freely distributed as long as this header is preserved. This code is distributed under the GPL. (http://www.gnu.org/copyleft/gpl.html) --------------------------------------------------------------------------- Copyright (C) 2003-2025 Volker C. Behr This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --------------------------------------------------------------------------- If you want to redistribute modified sources/binaries this header has to be preserved and all modifications should be clearly indicated. In case you want to include this code into your own programs I would appreciate your feedback via email. HISTORY: see ChangeLog in the parent directory of the source archive */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "cups-pdf.h" static FILE *logfp=NULL; /*************************************************************************************** ** log_event(type,message,...) **************************************************************************************** ** ** UTILITY function to write cups-pdf events to custom log ** ** Accepts: short int indicating type of logging (CPERROR, CPSTATUS, CPDEBUG) ** pointer to char string containing log message ** varargs as required by the log message ** ** Returns: nothing ** ** Configuration values used: ** LogType log-mode (binary bitflags) */ static void log_event(short type, const char *message, ...) { time_t secs; int error=errno; char ctype[8], *timestring; cp_string logbuffer; va_list ap; if ((logfp != NULL) && (type & Conf_LogType)) { (void) time(&secs); timestring=ctime(&secs); timestring[strlen(timestring)-1]='\0'; if (type == CPERROR) snprintf(ctype, 8, "ERROR"); else if (type == CPSTATUS) snprintf(ctype, 8, "STATUS"); else snprintf(ctype, 8, "DEBUG"); va_start(ap, message); vsnprintf(logbuffer, BUFSIZE, message, ap); va_end(ap); fprintf(logfp,"%s [%s] %s\n", timestring, ctype, logbuffer); if ((Conf_LogType & CPDEBUG) && (type == CPERROR) && error) fprintf(logfp,"%s [DEBUG] ERRNO: %d (%s)\n", timestring, error, strerror(error)); (void) fflush(logfp); } return; } /*************************************************************************************** ** create_dir(dirname,nolog) **************************************************************************************** ** ** UTILITY function to create a specified directory ** ** Accepts: char pointer to string containing target directory path ** int flag indicating whether (non-zero) or not (0) to log operations ** ** Returns: integer indicating success or failure of operation ** 0 is SUCCESS, 1 is FAILURE */ static int create_dir(char *dirname, int nolog) { struct stat fstatus; char buffer[BUFSIZE],*delim; int i; while ((i=strlen(dirname))>1 && dirname[i-1]=='/') dirname[i-1]='\0'; if (stat(dirname, &fstatus) || !S_ISDIR(fstatus.st_mode)) { strncpy(buffer,dirname,BUFSIZE); delim=strrchr(buffer,'/'); if (delim!=buffer) delim[0]='\0'; else delim[1]='\0'; if (create_dir(buffer,nolog)!=0) return 1; (void) stat(buffer, &fstatus); if (mkdir(dirname,fstatus.st_mode)!=0) { if (!nolog) log_event(CPERROR, "failed to create directory: %s", dirname); return 1; } else if (!nolog) log_event(CPSTATUS, "directory created: %s", dirname); if (chown(dirname,fstatus.st_uid,fstatus.st_gid)!=0) if (!nolog) log_event(CPDEBUG, "failed to set owner on directory: %s (non fatal)", dirname); } return 0; } /*************************************************************************************** ** _assign_value(security,key,value) **************************************************************************************** ** ** Store/update process-global key/value pairs ** ** Accepts: int representing level of security to apply ** char pointer to string containing key of key/value pair ** char pointer to string containing value of key/value pair ** ** Returns: integer representing success or failure of operation ** 1 is SUCCESS ** 0 is FAILURE ** ** Configuration values set: ** AnonDirName ABSOLUTE path for anonymously created PDF files ** AnonUser uid for anonymous PDF creation ** GhostScript location of GhostScript binary (gs) ** GSCall command line for calling GhostScript ** Grp group cups-pdf is supposed to run as ** GSTmp location of temporary files during GhostScript operation ** Log CUPS-PDF log directory ** PDFVer PDF version to be created ** PostProcessing postprocessing script that will be called after the creation of the PDF ** Out CUPS-PDF output directory ** Spool CUPS-PDF spool directory ** UserPrefix some installations require a domain prefix added to the user name ** RemovePrefix domain prefix to be removed for ${USER} expansion ** Cut remove file name extensions before appending .pdf to output ** Truncate max # characters to truncate long filenames to ** DirPrefix if UserPrefix, then use the prefix in the output directory's name ** Label label all jobs with a unique job-id ** LogType log-mode (bitflags: errors, status, debug) ** LowerCase check user names against their lower case variants ** TitlePref where to look first for a title when creating the output filename ** DecodeHexStrings try to decode hex strings in the title to allow internationalized titles ** FixNewlines try to fix various unusal line delimiters (e.g. form feeds) ** AnonUMask umask for anonymous output ** UserUMask umask for user output of known users */ static int _assign_value(int security, char *key, char *value) { int tmp; int option; for (option=0; option 1) && (!stat(filename, &fstatus)) && (S_ISREG(fstatus.st_mode) || S_ISLNK(fstatus.st_mode))) { fp=fopen(filename,"r"); } if (fp==NULL) { log_event(CPERROR, "Cannot open config: %s", filename); return; } while (fgets(buffer, BUFSIZE, fp) != NULL) { key[0]='\0'; value[0]='\0'; if (sscanf(buffer,"%s %[^\n]",key,value)) { if (!strlen(key) || !strncmp(key,"#",1)) continue; _assign_value(SEC_CONF, key, value); } } (void) fclose(fp); return; } /*************************************************************************************** ** read_config_ppd() **************************************************************************************** ** ** Load and merge configuration from PPD file into process configuration ** ** Accepts: nothing ** Performs: updates global configuration values from PPD file named by envvar "PPD" ** Returns: nothing ** ** NB: uses functions from libcups to access ppd file ** NB: CUPS deprecated the PPD API, starting in CUPS 1.6, and recommends ** using the (as yet to be documented) "Job Ticket API" instead. */ static void read_config_ppd() { ppd_option_t *option; ppd_file_t *ppd_file; char * ppd_name; ppd_name = getenv("PPD"); if (ppd_name == NULL) { log_event(CPERROR, "Could not retrieve PPD name"); return; } ppd_file = ppdOpenFile(ppd_name); if (ppd_file == NULL) { log_event(CPERROR, "Could not open PPD file: %s", ppd_name); return; } ppdMarkDefaults(ppd_file); option = ppdFirstOption(ppd_file); while (option != NULL) { _assign_value(SEC_PPD, option->keyword, option->defchoice); option = ppdNextOption(ppd_file); } ppdClose(ppd_file); return; } /*************************************************************************************** ** read_config_options(lpoptions) **************************************************************************************** ** ** Load and merge configuration from print job options into process configuration ** ** Accepts: char pointer to job options string ** Performs: updates global configuration values from given job options string ** Returns: nothing ** ** NB: uses function from libcups to access options string */ static void read_config_options(const char *lpoptions) { int i; int num_options; cups_option_t *options; cups_option_t *option; num_options = cupsParseOptions(lpoptions, 0, &options); for (i = 0, option = options; i < num_options; i ++, option ++) { /* replace all _ by " " in value */ int j; for (j=0; option->value[j]!= '\0'; j++) { if (option->value[j] == '_') { option->value[j] = ' '; } } _assign_value(SEC_LPOPT, option->name, option->value); } return; } /*************************************************************************************** ** dump_configuration() **************************************************************************************** ** DEBUGGING function to write selected configuration values to custom log ** ** Accepts: nothing ** Returns: nothing ** ** Configuration values used: ** AnonDirName ABSOLUTE path for anonymously created PDF files ** AnonUser uid for anonymous PDF creation ** GhostScript location of GhostScript binary (gs) ** GSCall command line for calling GhostScript ** Grp group cups-pdf is supposed to run as ** GSTmp location of temporary files during GhostScript operation ** Log CUPS-PDF log directory ** PDFVer PDF version to be created ** PostProcessing postprocessing script that will be called after the creation of the PDF ** Out CUPS-PDF output directory ** Spool CUPS-PDF spool directory ** UserPrefix some installations require a domain prefix added to the user name ** RemovePrefix domain prefix to be removed for ${USER} expansion ** Cut remove file name extensions before appending .pdf to output ** Truncate max # characters to truncate long filenames to ** DirPrefix if UserPrefix, then use the prefix in the output directory's name ** Label label all jobs with a unique job-id ** LogType log-mode (bitflags: errors, status, debug) ** LowerCase check user names against their lower case variants ** TitlePref where to look first for a title when creating the output filename ** DecodeHexStrings try to decode hex strings in the title to allow internationalized titles ** FixNewlines try to fix various unusal line delimiters (e.g. form feeds) ** AnonUMask umask for anonymous output ** UserUMask umask for user output of known users */ static void dump_configuration() { if (Conf_LogType & CPDEBUG) { log_event(CPDEBUG, "*** Final Configuration ***"); log_event(CPDEBUG, "AnonDirName = \"%s\"", Conf_AnonDirName); log_event(CPDEBUG, "AnonUser = \"%s\"", Conf_AnonUser); log_event(CPDEBUG, "GhostScript = \"%s\"", Conf_GhostScript); log_event(CPDEBUG, "GSCall = \"%s\"", Conf_GSCall); log_event(CPDEBUG, "Grp = \"%s\"", Conf_Grp); log_event(CPDEBUG, "GSTmp = \"%s\"", Conf_GSTmp); log_event(CPDEBUG, "Log = \"%s\"", Conf_Log); log_event(CPDEBUG, "PDFVer = \"%s\"", Conf_PDFVer); log_event(CPDEBUG, "PostProcessing = \"%s\"", Conf_PostProcessing); log_event(CPDEBUG, "Out = \"%s\"", Conf_Out); log_event(CPDEBUG, "Spool = \"%s\"", Conf_Spool); log_event(CPDEBUG, "UserPrefix = \"%s\"", Conf_UserPrefix); log_event(CPDEBUG, "RemovePrefix = \"%s\"", Conf_RemovePrefix); log_event(CPDEBUG, "OutExtension = \"%s\"", Conf_OutExtension); log_event(CPDEBUG, "Cut = %d", Conf_Cut); log_event(CPDEBUG, "Truncate = %d", Conf_Truncate); log_event(CPDEBUG, "DirPrefix = %d", Conf_DirPrefix); log_event(CPDEBUG, "Label = %d", Conf_Label); log_event(CPDEBUG, "LogType = %d", Conf_LogType); log_event(CPDEBUG, "LowerCase = %d", Conf_LowerCase); log_event(CPDEBUG, "TitlePref = %d", Conf_TitlePref); log_event(CPDEBUG, "DecodeHexStrings = %d", Conf_DecodeHexStrings); log_event(CPDEBUG, "FixNewlines = %d", Conf_FixNewlines); log_event(CPDEBUG, "AllowUnsafeOptions = %d", Conf_AllowUnsafeOptions); log_event(CPDEBUG, "AnonUMask = %04o", Conf_AnonUMask); log_event(CPDEBUG, "UserUMask = %04o", Conf_UserUMask); log_event(CPDEBUG, "*** End of Configuration ***"); } return; } /*************************************************************************************** ** init() **************************************************************************************** ** ** Load printer-global and printer-instance configuration values, ** establish execution group and spool directory ** establish log directory if required ** ** Accepts: a pointer to a list of pointer-to-char containing the commandline arguments ** Returns: int 0 returned on success ** 1 returned on all error conditions ** ** Directly uses configuration values: ** Grp group cups-pdf is supposed to run as ** Log CUPS-PDF log directory ** Spool CUPS-PDF spool directory ** ** NB: uses function from libcups to retrieve backend device URI */ static int init(char *argv[]) { struct stat fstatus; struct group *group; cp_string filename; int grpstat; const char *uri=cupsBackendDeviceURI(argv); if ((uri != NULL) && (strncmp(uri, "cups-pdf:/", 10) == 0) && strlen(uri) > 10) { uri = uri + 10; sprintf(filename, "%s/cups-pdf-%s.conf", CP_CONFIG_PATH, uri); } else { sprintf(filename, "%s/cups-pdf.conf", CP_CONFIG_PATH); } read_config_file(filename); read_config_ppd(); read_config_options(argv[5]); (void) umask(0077); group=getgrnam(Conf_Grp); grpstat=setgid(group->gr_gid); if (strlen(Conf_Log)) { if (stat(Conf_Log, &fstatus) || !S_ISDIR(fstatus.st_mode)) { if (create_dir(Conf_Log, 1)) return 1; if (chmod(Conf_Log, 0700)) return 1; } snprintf(filename, BUFSIZE, "%s/%s%s%s", Conf_Log, "cups-pdf-", getenv("PRINTER"), "_log"); logfp=fopen(filename, "a"); } dump_configuration(); if (!group) { log_event(CPERROR, "Grp not found: %s", Conf_Grp); return 1; } else if (grpstat) { log_event(CPERROR, "failed to set new gid: %s", Conf_Grp); return 1; } else log_event(CPDEBUG, "set new gid: %s", Conf_Grp); (void) umask(0022); if (stat(Conf_Spool, &fstatus) || !S_ISDIR(fstatus.st_mode)) { if (create_dir(Conf_Spool, 0)) { log_event(CPERROR, "failed to create spool directory: %s", Conf_Spool); return 1; } if (chmod(Conf_Spool, 0751)) { log_event(CPERROR, "failed to set mode on spool directory: %s", Conf_Spool); return 1; } if (chown(Conf_Spool, -1, group->gr_gid)) log_event(CPERROR, "failed to set group id %s on spool directory: %s (non fatal)", Conf_Grp, Conf_Spool); log_event(CPSTATUS, "spool directory created: %s", Conf_Spool); } (void) umask(0077); return 0; } /*************************************************************************************** ** announce_printers() **************************************************************************************** ** ** This function will report some initial printer/driver information ** back to CUPS, so that CUPS can place any cups-pdf printers into ** it's available printers list. ** ** Accepts: nothing ** Returns: nothing ** */ static void announce_printers() { DIR *dir; struct dirent *config_ent; int len; cp_string setup; printf("file cups-pdf:/ \"Virtual PDF Printer\" \"CUPS-PDF\" \"MFG:Generic;MDL:CUPS-PDF Printer;DES:Generic CUPS-PDF Printer;CLS:PRINTER;CMD:POSTSCRIPT;\"\n"); if ((dir = opendir(CP_CONFIG_PATH)) != NULL) { while ((config_ent = readdir(dir)) != NULL) { len = strlen(config_ent->d_name); if ((strncmp(config_ent->d_name, "cups-pdf-", 9) == 0) && (len > 14 && strcmp(config_ent->d_name + len - 5, ".conf") == 0)) { strncpy(setup, config_ent->d_name + 9, BUFSIZE>len-14 ? len-14 : BUFSIZE); setup[BUFSIZE>len-14 ? len-14 : BUFSIZE - 1] = '\0'; printf("file cups-pdf:/%s \"Virtual %s Printer\" \"CUPS-PDF\" \"MFG:Generic;MDL:CUPS-PDF Printer;DES:Generic CUPS-PDF Printer;CLS:PRINTER;CMD:POSTSCRIPT;\"\n", setup, setup); } } closedir(dir); } return; } /*************************************************************************************** ** preparedirname(passwd,uname) **************************************************************************************** ** ** generate user-specific output directory from prototype ** ** Accepts: pointer to struct passwd for selected target user ** pointer to char string naming target user ** ** Returns: pointer to char string containing (computed) path of output directory ** ** Configuration: ** RemovePrefix common username prefix to be removed ** Out CUPS-PDF output directory */ static char *preparedirname(struct passwd *passwd, char *uname) { int size; char bufin[BUFSIZE], bufout[BUFSIZE], *needle, *cptr; needle=strstr(uname, Conf_RemovePrefix); if ((int)strlen(uname)>(size=strlen(Conf_RemovePrefix))) uname=uname+size; strncpy(bufin, Conf_Out, BUFSIZE); do { needle=strstr(bufin, "${HOME}"); if (needle == NULL) break; needle[0]='\0'; cptr=needle+7; snprintf(bufout, BUFSIZE, "%s%s%s", bufin, passwd->pw_dir, cptr); strncpy(bufin, bufout, BUFSIZE); } while (needle != NULL); do { needle=strstr(bufin, "${USER}"); if (needle == NULL) break; needle[0]='\0'; cptr=needle+7; if (!Conf_DirPrefix) snprintf(bufout, BUFSIZE, "%s%s%s", bufin, uname, cptr); else snprintf(bufout, BUFSIZE, "%s%s%s", bufin, passwd->pw_name, cptr); strncpy(bufin, bufout, BUFSIZE); } while (needle != NULL); size=strlen(bufin)+1; cptr=calloc(size, sizeof(char)); if (cptr == NULL) return NULL; snprintf(cptr,size,"%s",bufin); return cptr; } /*************************************************************************************** ** prepareuser(passwd,dirname) **************************************************************************************** ** Establish user access to the PDF output directory ** ** Accepts: pointer to struct passwd of user requesting print ** pointer to string containing path to output directory ** ** Returns: int 0 returned on success ** 1 returned on all error conditions */ static int prepareuser(struct passwd *passwd, char *dirname) { struct stat fstatus; (void) umask(0000); if (stat(dirname, &fstatus) || !S_ISDIR(fstatus.st_mode)) { if (!strcmp(passwd->pw_name, Conf_AnonUser)) { if (create_dir(dirname, 0)) { log_event(CPERROR, "failed to create anonymous output directory: %s", dirname); return 1; } if (chmod(dirname, (mode_t)(0777&~Conf_AnonUMask))) { log_event(CPERROR, "failed to set mode on anonymous output directory: %s", dirname); return 1; } log_event(CPDEBUG, "anonymous output directory created: %s", dirname); } else { if (create_dir(dirname, 0)) { log_event(CPERROR, "failed to create user output directory: %s", dirname); return 1; } if (chmod(dirname, (mode_t)(0777&~Conf_UserUMask))) { log_event(CPERROR, "failed to set mode on user output directory: %s", dirname); return 1; } log_event(CPDEBUG, "user output directory created: %s", dirname); } if (chown(dirname, passwd->pw_uid, passwd->pw_gid)) { log_event(CPERROR, "failed to set owner for output directory: %s", passwd->pw_name); return 1; } log_event(CPDEBUG, "owner set for output directory: %s", passwd->pw_name); } (void) umask(0077); return 0; } /*************************************************************************************** ** decode_ps_hex_string(char *string) **************************************************************************************** ** ** Decode postscript hex string in place within string ** ** Accepts: char pointer to a string containing the postscript hexadecimal string ** Returns: nothing ** ** NB: no validation is done here, please use is_ps_hex_string for that */ static void decode_ps_hex_string(char *string) { char *src_ptr, *dst_ptr; int is_lower_digit; /* 0 - higher digit, 1 - lower digit */ char number, digit; dst_ptr=string; /* we should always be behind src_ptr, so it's safe to write over original string */ number=(char)0; is_lower_digit=0; for (src_ptr=string+1;*src_ptr != '>';src_ptr++) { /* begin after start marker */ if (*src_ptr == ' ' || *src_ptr == '\t' ) { /* skip whitespace */ continue; } if (*src_ptr >= 'a') { /* assuming 0 < A < a */ digit=*src_ptr-'a'+(char)10; } else if (*src_ptr >= 'A') { digit=*src_ptr-'A'+(char)10; } else { digit=*src_ptr-'0'; } if (is_lower_digit) { number|=digit; *dst_ptr=number; /* write character */ dst_ptr++; is_lower_digit=0; } else { /* higher digit */ number=digit<<4; is_lower_digit=1; } } if (is_lower_digit) { /* write character with lower digit = 0, as per PostScript Language Reference */ *dst_ptr=number; dst_ptr++; /* is_lower_digit=0; */ } *dst_ptr=0; /* finish him! */ return; } /*************************************************************************************** ** is_ps_hex_string(char *string) **************************************************************************************** ** ** Determine if given string contains postscript hex strings ** ** Accepts: char pointer to a string containing the postscript "title" ** Returns: an int indicating whether (1) or not (0) the input string ** contains a valid postscript "hex" string */ static int is_ps_hex_string(char *string) { int got_end_marker=0; char *ptr; if (string[0] != '<') { /* if has no start marker */ log_event(CPDEBUG, "not a hex string, has no start marker: %s", string); return 0; /* not hex string, obviously */ } for (ptr=string+1;*ptr;ptr++) { /* begin after start marker */ if (got_end_marker) { /* got end marker and still something left */ log_event(CPDEBUG, "not a hex string, trailing characters after end marker: %s", ptr); return 0; /* that's bad! */ } else if (*ptr == '>') { /* here it is! */ got_end_marker=1; log_event(CPDEBUG, "got an end marker in the hex string, expecting 0-termination: %s", ptr); } else if ( !( isxdigit(*ptr) || *ptr == ' ' || *ptr == '\t' ) ) { log_event(CPDEBUG, "not a hex string, invalid character: %s", ptr); return 0; /* that's bad, too */ } } return got_end_marker; } /*************************************************************************************** ** alternate_replace_string(string) **************************************************************************************** ** ** UTILITY to examine string and replace special characters with underscore ** ** Accepts: pointer to char, string to have special characters replaced ** Updates: in place, the string pointed to by the input pointer ** Returns: nothing ** ** Allowed characters: 0-9, A-Z, a-z, '-', '+', '.', any character above 0x7f ** All other characters converted to underscore ('_') ** NB: this function alters the string pointed to by the input parameter */ static void alternate_replace_string(char *string) { unsigned int i; log_event(CPDEBUG, "removing alternate special characters from title: %s", string); for (i=0;i<(unsigned int)strlen(string);i++) if ( isascii(string[i]) && /* leaving non-ascii characters intact */ (!isalnum(string[i])) && string[i] != '-' && string[i] != '+' && string[i] != '.') string[i]='_'; return; } /*************************************************************************************** ** replace_string(string) **************************************************************************************** ** ** UTILITY to examine string and replace special characters with underscore ** ** Accepts: pointer to char, string to have special characters replaced ** Updates: in place, the string pointed to by the input pointer ** Returns: nothing ** ** Allowed characters: 0-9, A-Z, a-z, '-', '+', '.' ** All other characters converted to underscore ('_') ** NB: this function alters the string pointed to by the input parameter */ static void replace_string(char *string) { unsigned int i; log_event(CPDEBUG, "removing special characters from title: %s", string); for (i=0;i<(unsigned int)strlen(string);i++) if ( ( string[i] < '0' || string[i] > '9' ) && ( string[i] < 'A' || string[i] > 'Z' ) && ( string[i] < 'a' || string[i] > 'z' ) && string[i] != '-' && string[i] != '+' && string[i] != '.') string[i]='_'; return; } /*************************************************************************************** ** preparetitle(title) **************************************************************************************** ** ** Using title prepared by caller, modify the title string to decode hex strings, ** remove leading and trailing underscores, parenthesis pairs, slashes, ** backslashes and "filename extensions". If required, truncate title to given ** length ** ** ** Accepts: pointer to character string containing base document title ** (may point to an "empty" string) ** ** Returns: truth value as to whether <> points to a valid title or not ** 0 if title is empty ** non-zero if title contains a string ** ** Configuration values used: ** DecodeHexStrings flag to enable decoding of hex strings to allow internationalized titles ** Cut flag to enable removing file name extensions ** Truncate truncate long filenames to a maximum of specified characters */ static int preparetitle(char *title) { char *cut; int i; if (title != NULL) { if (Conf_DecodeHexStrings) { log_event(CPSTATUS, "***Experimental Option: DecodeHexStrings"); log_event(CPDEBUG, "checking for hex strings: %s", title); if (is_ps_hex_string(title)) decode_ps_hex_string(title); log_event(CPDEBUG, "calling alternate_replace_string"); alternate_replace_string(title); } else { replace_string(title); } i=strlen(title); if (i>1) { while (title[--i]=='_'); if (i<strlen(title)-1) { log_event(CPDEBUG, "removing trailing _ from title: %s", title); title[i+1]='\0'; } i=0; while (title[i++]=='_'); if (i>1) { log_event(CPDEBUG, "removing leading _ from title: %s", title); memmove(title, title+i-1, strlen(title)-i+2); } } while (strlen(title)>2 && title[0]=='(' && title[strlen(title)-1]==')') { log_event(CPDEBUG, "removing enclosing parentheses () from full title: %s", title); title[strlen(title)-1]='\0'; memmove(title, title+1, strlen(title)); } } cut=strrchr(title, '/'); if (cut != NULL) { log_event(CPDEBUG, "removing slashes from full title: %s", title); memmove(title, cut+1, strlen(cut+1)+1); } cut=strrchr(title, '\\'); if (cut != NULL) { log_event(CPDEBUG, "removing backslashes from full title: %s", title); memmove(title, cut+1, strlen(cut+1)+1); } cut=strrchr(title, '.'); if ((cut != NULL) && ((int)strlen(cut) <= Conf_Cut+1) && (cut != title)) { log_event(CPDEBUG, "removing file name extension: %s", cut); cut[0]='\0'; } if (strlen(title)>Conf_Truncate) { title[Conf_Truncate]='\0'; log_event(CPDEBUG, "truncating title: %s", title); } return strcmp(title, ""); } /*************************************************************************************** ** fgets2(fbuffer,bufsize,ffpsrc) **************************************************************************************** ** Reads in at most one less than bufsize characters from stream and stores them into ** the buffer pointed to by fbuffer. Reading stops after an EOF, or 0x0A, 0x0C or 0x0D. ** ** Accepts: pointer to char pre-allocated buffer in which to store input data ** int size of pre-allocated buffer in bytes ** pointer to FILE handle of file to read input from ** ** Returns: pointer to char of data stored in pre-allocated buffer, or NULL on error ** ** NB: like fgets() but linedelimiters are 0x0A, 0x0C, 0x0D (ASCII LF, FF, CR). ** NB: if FixNewlines config option not set, this devolves to fgets() ** ** Configuration values used: ** FixNewlines flag to enable alternate line endings (LF, FF, CR) (experimental) */ static char *fgets2(char *fbuffer, int fbufsize, FILE *ffpsrc) { /* like fgets() but linedelimiters are 0x0A, 0x0C, 0x0D (LF, FF, CR). */ int c, pos; char *result; if (!Conf_FixNewlines) return fgets(fbuffer, fbufsize, ffpsrc); result=NULL; pos=0; while (pos < fbufsize) { /* pos in [0..fbufsize-1] */ c=fgetc(ffpsrc); /* converts CR/LF to LF in some OSses */ if (c == EOF) /* EOF _or_ error */ break; fbuffer[pos++]=c; if (c == 0x0A || c == 0x0C || c == 0x0D) /* line is at an end */ break; } if (pos > 0 && !ferror(ffpsrc)) { /* at least one char read and no error */ fbuffer[pos]='\0'; result=fbuffer; } return result; } /*************************************************************************************** ** preparespoolfile(fpsrc,spoolfile,title,cmdtitle,job,passwd) **************************************************************************************** ** ** cups hands us print data either through a named file (main() argv[6]) ** or through stdin. This function spools that input data to a cups-pdf ** spool file for processing. As this function transfers data, it may ** extract or set the title embedded in the postscript. ** ** Accepts: FILE * of input print data ** char * of path to cups-pdf internal spool file ** char * of title to apply to output PDF ** char * of title provided by CUPS (argv[3]) ** int of cups job number (argv[1] converted to int) ** struct passwd * of passwd entry associated with target user ** ** Returns: integer 0 on success, 1 on failure ** ** Configuration values used: ** FixNewlines this option will try to fix various unusal line delimiters (experimental) ** 0: disable, 1: enable ** TitlePref where to look first for a title when creating the output filename ** 0: prefer title from %Title statement in the PS file ** 1: prefer title passed via commandline ** Label label all jobs with a unique job-id ** 0: label untitled documents only ** 1: label all documents with a preceeding "job_#-" ** 2: label all documents with a tailing "-job_#" */ static int preparespoolfile(FILE *fpsrc, char *spoolfile, char *title, char *cmdtitle, int job, struct passwd *passwd) { cp_string buffer; int rec_depth,is_title=0; FILE *fpdest; if (fpsrc == NULL) { log_event(CPERROR, "failed to open source stream"); return 1; } log_event(CPDEBUG, "source stream ready"); fpdest=fopen(spoolfile, "w"); if (fpdest == NULL) { log_event(CPERROR, "failed to open spoolfile: %s", spoolfile); (void) fclose(fpsrc); return 1; } log_event(CPDEBUG, "destination stream ready: %s", spoolfile); if (chown(spoolfile, passwd->pw_uid, -1)) { log_event(CPERROR, "failed to set owner for spoolfile: %s", spoolfile); return 1; } log_event(CPDEBUG, "owner set for spoolfile: %s", spoolfile); rec_depth=0; if (Conf_FixNewlines) log_event(CPSTATUS, "***Experimental Option: FixNewlines"); else log_event(CPDEBUG, "using traditional fgets"); while (fgets2(buffer, BUFSIZE, fpsrc) != NULL) { if (!strncmp(buffer, "%!", 2) && strncmp(buffer, "%!PS-AdobeFont", 14)) { log_event(CPDEBUG, "found beginning of postscript code: %s", buffer); break; } } log_event(CPDEBUG, "now extracting postscript code"); (void) fputs(buffer, fpdest); while (fgets2(buffer, BUFSIZE, fpsrc) != NULL) { (void) fputs(buffer, fpdest); if (!is_title && !rec_depth) if (sscanf(buffer, "%%%%Title: %"TBUFSIZE"c", title)==1) { log_event(CPDEBUG, "found title in ps code: %s", title); is_title=1; } if (!strncmp(buffer, "%!", 2)) { log_event(CPDEBUG, "found embedded (e)ps code: %s", buffer); rec_depth++; } else if (!strncmp(buffer, "%%EOF", 5)) { if (!rec_depth) { log_event(CPDEBUG, "found end of postscript code: %s", buffer); break; } else { log_event(CPDEBUG, "found end of embedded (e)ps code: %s", buffer); rec_depth--; } } } (void) fclose(fpdest); (void) fclose(fpsrc); log_event(CPDEBUG, "all data written to spoolfile: %s", spoolfile); if (cmdtitle == NULL || !strcmp(cmdtitle, "(stdin)")) buffer[0]='\0'; else strncpy(buffer, cmdtitle, BUFSIZE); if (title == NULL || !strcmp(title, "((stdin))")) title[0]='\0'; if (Conf_TitlePref) { log_event(CPDEBUG, "trying to use commandline title: %s", buffer); if (!preparetitle(buffer)) { log_event(CPDEBUG, "empty commandline title, using PS title: %s", title); if (!preparetitle(title)) log_event(CPDEBUG, "empty PS title"); } else snprintf(title, BUFSIZE, "%s", buffer); } else { log_event(CPDEBUG, "trying to use PS title: %s", title); if (!preparetitle(title)) { log_event(CPDEBUG, "empty PS title, using commandline title: %s", buffer); if (!preparetitle(buffer)) log_event(CPDEBUG, "empty commandline title"); else snprintf(title, BUFSIZE, "%s", buffer); } } if (!strcmp(title, "")) { if (Conf_Label == 2) snprintf(title, BUFSIZE, "untitled_document-job_%i", job); else snprintf(title, BUFSIZE, "job_%i-untitled_document", job); log_event(CPDEBUG, "no title found - using default value: %s", title); } else { if (Conf_Label) { strcpy(buffer, title); if (Conf_Label == 2) snprintf(title, BUFSIZE, "%s-job_%i", buffer, job); else snprintf(title, BUFSIZE, "job_%i-%s", job, buffer); } log_event(CPDEBUG, "title successfully retrieved: %s", title); } return 0; } /*************************************************************************************** ** main() **************************************************************************************** ** ** mainline of cups-pdf ** ** 1) check if running as privileged user, abort if not ** ** 2) gross argument check: ** a) no arguments: announce printer and exit ** b) 5 or 6 args: process print request ** NB: read print data from argv[6] (if given) or stdin (if absent) ** c) anything else: abort with error message ** ** 3) process print request, abort on failure (see #2/b above): ** a) initialize configuration ** b) determine PDF output directory path ** c) determine user's group involvement (list of GIDs) ** d) establish user access to the PDF output directory ** e) generate input spoolfile filename ** f) create/prepare the input spoolfile ** g) generate output PDF file filename ** h) build custom ghostscript commandline ** i) ensure that the output file does not exist before ghostscript execution ** j) set ghostscript TMPDIR envvar ** k) fork a child to run ghostscript ** l) parent waits for ghostscript child process to terminate ** m) parent deallocates all previously-allocated resources ** n) parent terminates with 0 status code ** ** 4) child process runs ghostscript (see #3/k above): ** a) set process uid, gid, groups to user's uid, gid, groups (see #3/c) ** b) set umask to 0077 ** c) use system() to invoke ghostscript (#3/g, #3/h, #3/j) ** d) chmod the output file ** e) invoke optional output postprocessing ** f) child terminates with 0 status code ** ** Accepts: int of count of arguments in argument list ** char ** of argument list ** [0] holds name of this binary ** [1] holds the job ID ** [2] holds the user printing the job ** [3] holds the job name/title ** [4] holds the number of copies to print ** [5] holds the options that were provided when the job was submitted ** [6] holds the path of the file to print (optional, first program only) ** ** Returns: integer status of filter ** 0 process completed (success, usage error) ** 5 operational error (failed init, config or processing) ** ** ** Directly uses configuration values: ** UserPrefix common prefix to user name ** used to fix user name for getpwnam() call (required under some OS) ** LowerCase flag used to force user id into lower case ** TRUE when lower case required ** FALSE when mixed/upper case permitted ** AnonUser default user id for "anonymous" PDF printing ** AnonDirName directory to place "anonymous" PDFs in ** AnonUMask default "anonymous" umask for created file(s) ** UserUMask umask for user output of known users ** Spool CUPS-PDF spool directory ** OutExtension filename suffix for output file (undocumented, defaults to "pdf") ** GSCall command line for calling GhostScript ** GhostScript path to GhostScript binary ** PDFVer PDF version to be created ** GSTmp path to tempfile directory during GhostScript operation ** PostProcessing path to postprocessing script called after the creation of the PDF */ int main(int argc, char *argv[]) { char *user, *dirname, *spoolfile, *outfile, *gscall, *ppcall; cp_string title; int size; mode_t mode; struct passwd *passwd; gid_t *groups; int ngroups; pid_t pid; if (setuid(0)) { (void) fputs("CUPS-PDF cannot be called without root privileges!\n", stderr); return 0; } if (argc==1) { announce_printers(); return 0; } if (argc<6 || argc>7) { (void) fputs("Usage: cups-pdf job-id user title copies options [file]\n", stderr); return 0; } if (init(argv)) return 5; log_event(CPDEBUG, "initialization finished: %s", CPVERSION); size=strlen(Conf_UserPrefix)+strlen(argv[2])+1; user=calloc(size, sizeof(char)); if (user == NULL) { (void) fputs("CUPS-PDF: failed to allocate memory\n", stderr); return 5; } snprintf(user, size, "%s%s", Conf_UserPrefix, argv[2]); passwd=getpwnam(user); if (passwd == NULL && Conf_LowerCase) { log_event(CPDEBUG, "unknown user: %s", user); for (size=0;size<(int) strlen(argv[2]);size++) argv[2][size]=tolower(argv[2][size]); log_event(CPDEBUG, "trying lower case user name: %s", argv[2]); size=strlen(Conf_UserPrefix)+strlen(argv[2])+1; snprintf(user, size, "%s%s", Conf_UserPrefix, argv[2]); passwd=getpwnam(user); } if (passwd == NULL) { if (strlen(Conf_AnonUser)) { passwd=getpwnam(Conf_AnonUser); if (passwd == NULL) { log_event(CPERROR, "username for anonymous access unknown: %s", Conf_AnonUser); free(user); if (logfp!=NULL) (void) fclose(logfp); return 5; } log_event(CPDEBUG, "unknown user: %s", user); size=strlen(Conf_AnonDirName)+4; dirname=calloc(size, sizeof(char)); if (dirname == NULL) { (void) fputs("CUPS-PDF: failed to allocate memory\n", stderr); free(user); if (logfp!=NULL) (void) fclose(logfp); return 5; } snprintf(dirname, size, "%s", Conf_AnonDirName); while (strlen(dirname) && ((dirname[strlen(dirname)-1] == '\n') || (dirname[strlen(dirname)-1] == '\r'))) dirname[strlen(dirname)-1]='\0'; log_event(CPDEBUG, "output directory name generated: %s", dirname); } else { log_event(CPSTATUS, "anonymous access denied: %s", user); free(user); if (logfp!=NULL) (void) fclose(logfp); return 0; } mode=(mode_t)(0666&~Conf_AnonUMask); } else { log_event(CPDEBUG, "user identified: %s", passwd->pw_name); if ((dirname=preparedirname(passwd, argv[2])) == NULL) { (void) fputs("CUPS-PDF: failed to allocate memory\n", stderr); free(user); if (logfp!=NULL) (void) fclose(logfp); return 5; } while (strlen(dirname) && ((dirname[strlen(dirname)-1] == '\n') || (dirname[strlen(dirname)-1] == '\r'))) dirname[strlen(dirname)-1]='\0'; log_event(CPDEBUG, "output directory name generated: %s", dirname); mode=(mode_t)(0666&~Conf_UserUMask); } ngroups=32; groups=calloc(ngroups, sizeof(gid_t)); if (groups == NULL) { (void) fputs("CUPS-PDF: failed to allocate memory\n", stderr); free(user); if (logfp!=NULL) (void) fclose(logfp); return 5; } size=getgrouplist(user, passwd->pw_gid, groups, &ngroups); if (size == -1) { free(groups); groups=calloc(ngroups, sizeof(gid_t)); size=getgrouplist(user, passwd->pw_gid, groups, &ngroups); } if (size < 0) { log_event(CPERROR, "getgrouplist failed"); free(user); free(groups); if (logfp!=NULL) (void) fclose(logfp); return 5; } free(user); if (prepareuser(passwd, dirname)) { free(groups); free(dirname); if (logfp!=NULL) (void) fclose(logfp); return 5; } log_event(CPDEBUG, "user information prepared"); size=strlen(Conf_Spool)+22; spoolfile=calloc(size, sizeof(char)); if (spoolfile == NULL) { (void) fputs("CUPS-PDF: failed to allocate memory\n", stderr); free(groups); free(dirname); if (logfp!=NULL) (void) fclose(logfp); return 5; } snprintf(spoolfile, size, "%s/cups2pdf-%i", Conf_Spool, (int) getpid()); log_event(CPDEBUG, "spoolfile name created: %s", spoolfile); if (argc == 6) { if (preparespoolfile(stdin, spoolfile, title, argv[3], atoi(argv[1]), passwd)) { free(groups); free(dirname); free(spoolfile); if (logfp!=NULL) (void) fclose(logfp); return 5; } log_event(CPDEBUG, "input data read from stdin"); } else { if (preparespoolfile(fopen(argv[6], "r"), spoolfile, title, argv[3], atoi(argv[1]), passwd)) { free(groups); free(dirname); free(spoolfile); if (logfp!=NULL) (void) fclose(logfp); return 5; } log_event(CPDEBUG, "input data read from file: %s", argv[6]); } size=strlen(dirname)+strlen(title)+strlen(Conf_OutExtension)+3; outfile=calloc(size, sizeof(char)); if (outfile == NULL) { (void) fputs("CUPS-PDF: failed to allocate memory\n", stderr); if (unlink(spoolfile)) log_event(CPERROR, "failed to unlink spoolfile during clean-up: %s", spoolfile); free(groups); free(dirname); free(spoolfile); if (logfp!=NULL) (void) fclose(logfp); return 5; } if (strlen(Conf_OutExtension)) snprintf(outfile, size, "%s/%s.%s", dirname, title, Conf_OutExtension); else snprintf(outfile, size, "%s/%s", dirname, title); log_event(CPDEBUG, "output filename created: %s", outfile); size=strlen(Conf_GSCall)+strlen(Conf_GhostScript)+strlen(Conf_PDFVer)+strlen(outfile)+strlen(spoolfile)+6; gscall=calloc(size, sizeof(char)); if (gscall == NULL) { (void) fputs("CUPS-PDF: failed to allocate memory\n", stderr); if (unlink(spoolfile)) log_event(CPERROR, "failed to unlink spoolfile during clean-up: %s", spoolfile); free(groups); free(dirname); free(spoolfile); free(outfile); if (logfp!=NULL) (void) fclose(logfp); return 5; } snprintf(gscall, size, Conf_GSCall, Conf_GhostScript, Conf_PDFVer, outfile, spoolfile); log_event(CPDEBUG, "ghostscript commandline built: %s", gscall); (void) unlink(outfile); log_event(CPDEBUG, "output file unlinked: %s", outfile); if (putenv(Conf_GSTmp)) { log_event(CPERROR, "insufficient space in environment to set TMPDIR: %s", Conf_GSTmp); if (unlink(spoolfile)) log_event(CPERROR, "failed to unlink spoolfile during clean-up: %s", spoolfile); free(groups); free(dirname); free(spoolfile); free(outfile); free(gscall); if (logfp!=NULL) (void) fclose(logfp); return 5; } log_event(CPDEBUG, "TMPDIR set for GhostScript: %s", getenv("TMPDIR")); pid=fork(); if (!pid) { log_event(CPDEBUG, "entering child process"); if (setgid(passwd->pw_gid)) log_event(CPERROR, "failed to set GID for current user"); else log_event(CPDEBUG, "GID set for current user"); if (setgroups(ngroups, groups)) log_event(CPERROR, "failed to set supplementary groups for current user"); else log_event(CPDEBUG, "supplementary groups set for current user"); if (setuid(passwd->pw_uid)) log_event(CPERROR, "failed to set UID for current user: %s", passwd->pw_name); else log_event(CPDEBUG, "UID set for current user: %s", passwd->pw_name); (void) umask(0077); size=system(gscall); log_event(CPDEBUG, "ghostscript has finished: %d", size); if (chmod(outfile, mode)) log_event(CPERROR, "failed to set file mode for PDF file: %s (non fatal)", outfile); else log_event(CPDEBUG, "file mode set for user output: %s", outfile); if (strlen(Conf_PostProcessing)) { size=strlen(Conf_PostProcessing)+strlen(outfile)+strlen(passwd->pw_name)+strlen(argv[2])+4; ppcall=calloc(size, sizeof(char)); if (ppcall == NULL) log_event(CPERROR, "failed to allocate memory for postprocessing (non fatal)"); else { snprintf(ppcall, size, "%s %s %s %s", Conf_PostProcessing, outfile, passwd->pw_name, argv[2]); log_event(CPDEBUG, "postprocessing commandline built: %s", ppcall); size=system(ppcall); snprintf(title,BUFSIZE,"%d",size); log_event(CPDEBUG, "postprocessing has finished: %s", title); free(ppcall); } } else log_event(CPDEBUG, "no postprocessing"); return 0; } log_event(CPDEBUG, "waiting for child to exit"); (void) waitpid(pid,NULL,0); if (unlink(spoolfile)) log_event(CPERROR, "failed to unlink spoolfile: %s (non fatal)", spoolfile); else log_event(CPDEBUG, "spoolfile unlinked: %s", spoolfile); free(groups); free(dirname); free(spoolfile); free(outfile); free(gscall); log_event(CPDEBUG, "all memory has been freed"); log_event(CPSTATUS, "PDF creation successfully finished for %s", passwd->pw_name); if (logfp!=NULL) (void) fclose(logfp); return 0; } ����������������������������������������������������������������������������������������������cups-pdf-3.0.2/PaxHeaders/README��������������������������������������������������������������������0000644�0000000�0000000�00000000132�13054052523�013172� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������30 mtime=1487951187.690529825 30 atime=1742740166.835603894 30 ctime=1742740114.120510103 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cups-pdf-3.0.2/README�������������������������������������������������������������������������������0000644�0002155�0000765�00000014335�13054052523�014604� 0����������������������������������������������������������������������������������������������������ustar�00vrbehr��������������������������staff���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Welcome to CUPS-PDF v3 CONTENTS: 1. building CUPS-PDF 2. setting up the PDF queue with CUPS 3. advanced configuration and multiple instances 4. note for MacOSX 5. contact 1. building CUPS-PDF -------------------- Edit src/cups-pdf.h if you do not like /etc/cups as location for your configuration files. To compile CUPS-PDF, invoke gcc in the src/ directory: gcc -O9 -s cups-pdf.c -o cups-pdf -lcups Note: you will have to have the deveopment package for CUPS installed in order to build CUPS-PDF To install the binary, simply copy cups-pdf to the backend directory of CUPS (usually /usr/lib/cups/backend or /usr/lib64/...). Now copy extra/cups-pdf.conf to /etc/cups (or whatever location you selected in cups-pdf.h above). Here you can set all properties of CUPS-PDF at runtime without the need for restarting any services. (The defaults should work fine on most systems.) If you want to use the color PostScript driver that comes with CUPS-PDF go to the extra/ subdirectory and copy CUPS-PDF_opt.ppd to your CUPS model directory (usually /usr/share/cups/model [ /Generic ] ). If you do not want to set any options via PPD (see section 3), use CUPS-PDF_noopt.ppd instead. 2. setting up the PDF queue with CUPS ------------------------------------- Important notes: ================ * CUPS-PDF requires root privileges since it has to modify file ownerships. In order to ensure CUPS-PDF is running with the required root privileges you have to make 'root' the owner of the cups-pdf backend and set the file permissions of the backend to 0700 (root only). NOTE: in older versions of CUPS (<1.2.0) you have to set the "RunAsUser" option in cupsd.conf to "No" in order to grant full privileges. * CUPS-PDF needs a fully featured UNIX-filesystem to work. Make sure if any of CUPS-PDF's working directories (e.g. output) are located on an NFS mounted volume they are mounted without root_squash! Other filesystems (e.g. NetWare or Windows shares as well as NFSv4 with kerberos) are _not_ supported! * CUPS-PDF is known to fail if the gs (GhostScript) binary on a system is compressed by upx (Ultimate Packer for eXecutables). * If you are using SELinux, AppArmour or similar tools, make sure these do not interfere with CUPS-PDF. (You can disable SELinux for CUPS by "setsebool -P cupsd_disable_trans 1" or have a look at the SELinux-HOWTO on www.cups-pdf.de) Now you will be able to choose "CUPS-PDF (Virtual PDF Printer)" when setting up a new printer in CUPS (a CUPS-restart may be necessary). To set up a queue for other UNIX clients you should select Postscript as vendor and the Color Printer as model for your new printer; queues that get their input from samba or netatalk (i.e. Windows, OS/2 or MacOS) can be set up as raw queues. On the Windows, OS/2 or MacOS system choose a color postscript driver for that network printer (the drivers for Minolta Page Works or HP DesignJet printers do a good job). Hint: If you want to create grayscale PDFs you just have to choose a grayscale printer driver, i.e. the postscript.ppd that comes with CUPS on the Linux side or a b/w laser printer (e.g. a HP LaserJet) on the Windows side. On the Linux side be aware that the postscript.ppd will not re-process data that is already supplied in Postscript format, i.e. a color Postscript will keep it's colors. Once you print to the new device the output directory selected in cups-pdf.conf (defaults to /var/spool/cups-pdf) will be created and all converted PDF files will be placed in subdirectories named after the owner of the print job. In case the owner cannot be identified (i.e. does not exist on the server) the output is placed in the directory for anonymous operation (if not disabled in cups-pdf.conf - defaults to /var/spool/cups-pdf/ANONYMOUS/). Furthermore if logging is enabled the logfile will be placed by default in /var/log/cups. The files "CUPS-PDF_opt.ppd" and "CUPS-PDF_noopt.ppd" are modified versions of the "Postscript.ppd.gz" that comes with CUPS 1.1.15 that is able to handle color output. You should have a look at the contributed software on www.cups-pdf.de which contains several additions to CUPS-PDF which enhance functionality or supports the setup of CUPS-PDF on different platforms. 3. advanced configuration and multiple instances ------------------------------------------------ CUPS-PDF now has a PPD file (CUPS-PDF_opt.ppd) that allows setting the following options in the CUPS webinterface (administration/set default options): - resolution - page size - PDF version - truncate output file names - labelling (with jobid) of output files - title source preference - log level Please note that setting these options in the cups-pdf.conf will have no effect if you use the included PPD file as the settings from the PPD-file will override the settings in the config file. Additionally users can set some of the options using lpoptions (see man lpoptions): - PDFVer - PostProcessing - Cut - Truncate - TitelPref - UserMask See the configfile for an overview of the options and their meanings. These options are deemed not to create security risks. If you insist on allowing users to set other options as well (creating security risks, you have been warned!), set AllowUnsafeOptions in the config file (/etc/cups/cups-pdf.conf) to 1. To create multiple instances of the backend with different configurations, simply copy several config files in your config directory, naming them cups-pdf-<NAME>.conf, where <NAME> is a unique identifier for this instance. You can then select the new instances as URI when creating a new printer in CUPS. 4. note for MacOSX ------------------ Since MacOSX' AFPL GhostScript does not support the way of PDF generation used by CUPS-PDF you will have to use pstopdf instead. For this the settings of GhostScript, GSCall and PDFVer in cups-pdf.conf have to be changed accordingly. The values are documented in cups-pdf.conf . 5. contact ---------- Volker C. Behr volker@cups-pdf.de http://www.cups-pdf.de ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cups-pdf-3.0.2/PaxHeaders/ChangeLog�����������������������������������������������������������������0000644�0000000�0000000�00000000130�14770021572�014070� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������30 mtime=1742742394.976997524 28 atime=1742742446.0321154 30 ctime=1742742394.976997524 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������cups-pdf-3.0.2/ChangeLog����������������������������������������������������������������������������0000644�0002155�0000765�00000022471�14770021572�015504� 0����������������������������������������������������������������������������������������������������ustar�00vrbehr��������������������������staff���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������2025-03-23: CUPS-PDF 3.0.2 - updated GhostScript command line arguments, added full code documentation by Lew Pitcher 2017-02-24: CUPS-PDF 3.0.1 - corrected a bug with multiple instance naming, some code and logging improvements, removed obsolete code, updated the README file 2017-01-04: CUPS-PDF 3.0.0 - disabled support for multiple PS-files in one file, improved PS-structure handling, reordered compiler call to avoid errors 2014-10-19: CUPS-PDF 3.0beta2 - code simplifications and optimizations, improved file name handling, removed contrib/ directory from tarball (now on WWW), new contact data 2012-02-29: CUPS-PDF 3.0beta1 - support for multiple configurations with one backend, support for option setting via lpoptions or PPD, new option for selecting output file extension, improved logging system with better error handling, various code optimizations, additional PPD for option setting, new script in contrib/ for creating user defaults, updated documentation 2011-10-04: CUPS-PDF 2.6.1 - fixed a non-freed pointer, fixed an invalid line in the config due to a typo, added detailed copyright information to contrib/ 2011-10-01 : CUPS-PDF 2.6.0 - new experimental option for various line delimiters, supplementary groups are set in addition to primary 2011-02-18 : CUPS-PDF 2.5.1 - fixed crash due to an uninitialized pointer, improved logging mechanism in case of crashes, improved recognition of untitled documents via stdin, job labels can be set before and after document name, removed several bashisms from SELinux-contribution 2009-01-26 : CUPS-PDF 2.5.0 - new option to truncate long filenames, spoolfile is purged on errors, failed chmod() on output is treated as non-fatal, updates and additions to the documentation, removed additional changelog from source code 2008-06-22 : CUPS-PDF 2.4.8 - fixed too small allocation of postprocessing string, corrected typo in the config file documentation, update for the SELinux .te-file in contrib/ 2008-03-24 : CUPS-PDF 2.4.7 - corrected the exit codes to match CUPS' specifications, original username passed to PostProcessing as 3rd arg, made PPD file auto-selectable via IEEE-1284 device id 2007-05-04 : CUPS-PDF 2.4.6 - optimized default options for GS to produce PDFs 2007-02-27 : CUPS-PDF 2.4.5 - enclosing parentheses () are removed from title, set a more comprehensive identification string 2007-02-02 : CUPS-PDF 2.4.4 - DOS-style path separators '\' are now recognized 2006-11-22 : CUPS-PDF 2.4.3 - replaced 'setenv' by 'putenv' to increase compatibility 2006-09-30 : CUPS-PDF 2.4.2 - several code optimizations, PostScript PPD now uncompressed and rev4 only 2006-06-13 : CUPS-PDF 2.4.1 - added a PDF-to-mail postprocessing script to contrib/, added a new revision of the PostscriptColor PPD file 2006-05-28 : CUPS-PDF 2.4.0 - created the contrib/ directory with additional software 2006-05-17 : CUPS-PDF 2.3.1 - fixed possible read access after end of string, fixed recognition of international characters 2006-05-14 : CUPS-PDF 2.3.0 - experimental option to decode hex strings in title (NK) 2006-04-14 : CUPS-PDF 2.2.0 - new option to remove prefixes from usernames 2006-04-06 : CUPS-PDF 2.1.1 - minor bugfix to read umasks properly 2006-03-25 : CUPS-PDF 2.1.0 - new option to select where to look for title, some code changes and optimizations 2006-02-26 : CUPS-PDF 2.0.5 - several code optimizations 2006-01-29 : CUPS-PDF 2.0.4 - beginning of (E)PS-code now determined by "%!", optimized system call to GS in cups-pdf.conf, some minor code changes, debug information shows version number, updated PostScript PPD file supporting ledger paper 2006-01-07 : CUPS-PDF 2.0.3 - improved checking for root privileges (incl. EUID) 2006-01-04 : CUPS-PDF 2.0.2 - fixed possible testing of an uninitialized variable 2006-01-03 : CUPS-PDF 2.0.1 - fixed hanging jobs when logging is disabled 2005-12-23 : CUPS-PDF 2.0.0 - creation of non-existent parent directories, improved configurability of output directories, option CPHOMESUB is now obsolete, PPD file now matches Adobe specifications 2005-10-23 : CUPS-PDF 2.0beta2 - added support for post-processing script, fixed a bug when parsing cups-pdf.conf 2005-09-18 : CUPS-PDF 2.0beta1 - added support for runtime configuration, introduced cups-pdf.conf, made AnonDirName an abolute path 2005-09-08 : CUPS-PDF 1.7.4 - added some options to cups-pdf.h for MacOSX 2005-07-23 : CUPS-PDF 1.7.3 - fixed GhostScript failure with error 11, fixed segfault when called without root privileges 2005-07-07 : CUPS-PDF 1.7.2 - adjustment of file mode moved to non-privileged child 2005-06-16 : CUPS-PDF 1.7.1 - PDFs are protected during creation by file mode 000 2005-03-07 : CUPS-PDF 1.7.0a 2005-03-01 : CUPS-PDF 1.7.0 - call of GhostScript from a non-privileged child process, no more additional programs in the call of GhostScript, several code optimizations 2005-02-09 : CUPS-PDF 1.6.6 - updated PostScript PPD file supporting more DIN formats 2005-01-04 : CUPS-PDF 1.6.5 - cups-pdf is running with gid of group defined in CPGRP 2004-10-11 : CUPS-PDF 1.6.4 - improved configurability for different versions of 'su' 2004-10-07 : CUPS-PDF 1.6.3 - corrected erroneous call of GhostScript 2004-10-05 : CUPS-PDF 1.6.2 - added necessary quotes in the call of GhostScript 2004-10-03 : CUPS-PDF 1.6.1 - allow users w/o valid shell in /etc/passwd, several code optimizations 2004-09-08 : CUPS-PDF 1.6.0 - new option to check against user names in lower case, new option to label all created PDFs with a job-id 2004-08-10 : CUPS-PDF 1.5.2 - fixed insecure creation of spoolfile, several smaller code optimizations 2004-08-09 : CUPS-PDF 1.5.1 - fixed possible access to element outside allocated area, fixed possible conflict with overlapping memory areas 2004-08-03 : CUPS-PDF 1.5.0 - call to GS without root privileges for enhanced security 2004-08-01 : CUPS-PDF 1.4.3 - added -dSAFER to the call to GS to improve security 2004-02-25 : CUPS-PDF 1.4.2a 2004-02-24 : CUPS-PDF 1.4.2 - improved extraction of filenames, handling of embedded (e)ps code (RVT) 2004-02-09 : CUPS-PDF 1.4.1 - logfile is created with mode 644 if it does not exist 2004-01-27 : CUPS-PDF 1.4.0 - new option to set permissions for PDF output, alternative options for improved image conversion (moved CPGSCALL to cups-pdf.h) 2004-01-06 : CUPS-PDF 1.3.2 - exit status of ghostscript gets logged in debug mode 2004-01-02 : CUPS-PDF 1.3.1a 2003-11-29 : CUPS-PDF 1.3.1 - improved handling of domain prefix 2003-11-02 : CUPS-PDF 1.3 - new option to cut file name extensions 2003-10-25 : CUPS-PDF 1.2 - untitled documents are labelled with job-id, new option to add a domain prefix to user names, removed a minor bug during character replacement 2003-08-02 : CUPS-PDF 1.1 - files not viewable until creation is finished, new qualifier "$HOME" for output directory, "$HOME"-related new define in the header file 2003-07-17 : CUPS-PDF 1.0.1 - improved user name handling for multi-word names, code now distributed under the GPL 2003-06-29 : CUPS-PDF 1.0 - enhanced debug output, replacement of special characters in title, new option in the header file 2003-05-26 : CUPS-PDF 1.0pre3 - several minor bugfixes and improvements 2003-05-21 : CUPS-PDF 1.0pre2 - optimized memory management 2003-05-16 : CUPS-PDF 1.0pre1 - introduced cups-pdf.h, code now entirely written in C, cups-pdfgen is obsolete 2003-02-14 : CUPS-PDF 0.2 - script re-located to /usr/lib/cups/filter/cups-pdfgen 2003-02-12 : CUPS-PDF 0.1 - first beta release �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������