Feature: Labelprint für Kistenetiketten hinzugefügt
This commit is contained in:
20
vendor/tecnickcom/tc-lib-pdf/.editorconfig
vendored
Normal file
20
vendor/tecnickcom/tc-lib-pdf/.editorconfig
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# Ref: https://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style end of lines and a blank line at the end of the file
|
||||
[*]
|
||||
indent_style = tab
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.php]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.{js,json,scss,css,yml,vue}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
1
vendor/tecnickcom/tc-lib-pdf/.github/FUNDING.yml
vendored
Normal file
1
vendor/tecnickcom/tc-lib-pdf/.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
custom: ['https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ']
|
||||
29
vendor/tecnickcom/tc-lib-pdf/.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
29
vendor/tecnickcom/tc-lib-pdf/.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. ...
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Logs**
|
||||
If applicable, copy the relevant logs to help explain your problem.
|
||||
|
||||
**Environment:**
|
||||
- OS:
|
||||
- PHP version:
|
||||
- Version:
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
20
vendor/tecnickcom/tc-lib-pdf/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
vendor/tecnickcom/tc-lib-pdf/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
25
vendor/tecnickcom/tc-lib-pdf/.github/pull_request_template.md
vendored
Normal file
25
vendor/tecnickcom/tc-lib-pdf/.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# Description
|
||||
|
||||
Please include a summary of the change and include relevant motivation and context.
|
||||
|
||||
...
|
||||
|
||||
|
||||
## Checklist:
|
||||
|
||||
- [ ] The `make buildall` command has been run successfully without any error or warning.
|
||||
- [ ] Any new code line is covered by unit tests and the coverage has not dropped.
|
||||
- [ ] Any new code follows the style guidelines of this project.
|
||||
- [ ] The code changes have been self-reviewed.
|
||||
- [ ] Corresponding changes to the documentation have been made.
|
||||
- [ ] The version has been updated in the VERSION file.
|
||||
|
||||
## Type of change:
|
||||
|
||||
- [ ] Minor non-breaking change (e.g., bug fix, dependencies updates) → The patch number in the VERSION file has been increased.
|
||||
- [ ] New feature (non-breaking change which adds functionality) → The minor number in the VERSION file has been increased.
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) → The major number in the VERSION file has been increased.
|
||||
- [ ] Automation.
|
||||
- [ ] Documentation.
|
||||
- [ ] Example.
|
||||
- [ ] Testing.
|
||||
58
vendor/tecnickcom/tc-lib-pdf/.github/workflows/check.yml
vendored
Normal file
58
vendor/tecnickcom/tc-lib-pdf/.github/workflows/check.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: check
|
||||
|
||||
env:
|
||||
XDEBUG_MODE: coverage
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test-php:
|
||||
name: Test on php ${{ matrix.php-version }} and ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ matrix.experimental }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-version: ["8.1", "8.2", "8.3", "8.4"]
|
||||
experimental: [false]
|
||||
os: [ubuntu-latest]
|
||||
coverage-extension: [pcov]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
#- name: Install pdfinfo
|
||||
# run: sudo apt-get install -y poppler-utils
|
||||
- name: Use php ${{ matrix.php-version }}
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
coverage: ${{ matrix.coverage-extension }}
|
||||
extensions: bcmath, curl, date, gd, hash, imagick, json, mbstring, openssl, pcre, zlib
|
||||
ini-values: display_errors=on, error_reporting=-1, zend.assertions=1
|
||||
- name: List php modules
|
||||
run: php -m
|
||||
- name: List php modules using "no php ini" mode
|
||||
run: php -m -n
|
||||
- name: Cache module
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer/cache/
|
||||
key: composer-cache
|
||||
- name: Install dependencies
|
||||
run: make deps
|
||||
- name: Run all tests
|
||||
run: make qa
|
||||
- name: Send coverage
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
flags: php-${{ matrix.php-version }}-${{ matrix.os }}
|
||||
name: php-${{ matrix.php-version }}-${{ matrix.os }}
|
||||
21
vendor/tecnickcom/tc-lib-pdf/.gitignore
vendored
Normal file
21
vendor/tecnickcom/tc-lib-pdf/.gitignore
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
.phpdoc
|
||||
.phpunit.cache
|
||||
.phpunit.result.cache
|
||||
.vscode
|
||||
**/._*
|
||||
**/.#*
|
||||
**/.DS_Store
|
||||
**/.idea
|
||||
**/.vagrant
|
||||
**/*.bak
|
||||
**/*.tmp
|
||||
**/auth.json
|
||||
**/nbproject
|
||||
**/temp.php
|
||||
**/test.php
|
||||
composer.lock
|
||||
ecs.php
|
||||
phpunit.xml
|
||||
rector.php
|
||||
target
|
||||
vendor
|
||||
1
vendor/tecnickcom/tc-lib-pdf/CODEOWNERS
vendored
Normal file
1
vendor/tecnickcom/tc-lib-pdf/CODEOWNERS
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* @nicolaasuni
|
||||
128
vendor/tecnickcom/tc-lib-pdf/CODE_OF_CONDUCT.md
vendored
Normal file
128
vendor/tecnickcom/tc-lib-pdf/CODE_OF_CONDUCT.md
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
||||
26
vendor/tecnickcom/tc-lib-pdf/CONTRIBUTING.md
vendored
Normal file
26
vendor/tecnickcom/tc-lib-pdf/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# How to Contribute
|
||||
|
||||
|
||||
## Reporting a bug
|
||||
|
||||
* **Do not open up a GitHub issue if the bug is a security vulnerability**, and instead to refer to our [Security policy](SECURITY.md).
|
||||
|
||||
* Ensure the bug was not already reported by searching on GitHub Issues.
|
||||
|
||||
* If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
|
||||
|
||||
|
||||
## Submitting a bug fix
|
||||
|
||||
* Open a new GitHub pull request with the patch.
|
||||
|
||||
* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
|
||||
|
||||
* Ensure the new code is following the existing conventions and the unit test coverage is 100%.
|
||||
|
||||
* Before submitting, please run the following command locally to ensure the code is passing the automatic checks: `make buildall`.
|
||||
|
||||
|
||||
## Add a new feature or change an existing one
|
||||
|
||||
* Before writing any code please suggest the change by opening a new Feature Request on Issues.
|
||||
862
vendor/tecnickcom/tc-lib-pdf/LICENSE
vendored
Normal file
862
vendor/tecnickcom/tc-lib-pdf/LICENSE
vendored
Normal file
@@ -0,0 +1,862 @@
|
||||
**********************************************************************
|
||||
* LICENSE
|
||||
*
|
||||
* SOFTWARE : tc-lib-pdf
|
||||
* AUTHOR : Nicola Asuni <info@tecnick.com>
|
||||
* COPYRIGHT : 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
**********************************************************************
|
||||
|
||||
This is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser 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
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. 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
|
||||
them 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 prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. 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.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey 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;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If 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 convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU 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 that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
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.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
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.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
290
vendor/tecnickcom/tc-lib-pdf/Makefile
vendored
Normal file
290
vendor/tecnickcom/tc-lib-pdf/Makefile
vendored
Normal file
@@ -0,0 +1,290 @@
|
||||
# Makefile
|
||||
#
|
||||
# @since 2015-02-21
|
||||
# @category Library
|
||||
# @package Pdf
|
||||
# @author Nicola Asuni <info@tecnick.com>
|
||||
# @copyright 2015-2025 Nicola Asuni - Tecnick.com LTD
|
||||
# @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
|
||||
# @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
#
|
||||
# This file is part of tc-lib-pdf software library.
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
SHELL=/bin/bash
|
||||
.SHELLFLAGS=-o pipefail -c
|
||||
|
||||
# Project owner
|
||||
OWNER=tecnickcom
|
||||
|
||||
# Project vendor
|
||||
VENDOR=${OWNER}
|
||||
|
||||
# Project name
|
||||
PROJECT=tc-lib-pdf
|
||||
|
||||
# Project version
|
||||
VERSION=$(shell cat VERSION)
|
||||
|
||||
# Project release number (packaging build number)
|
||||
RELEASE=$(shell cat RELEASE)
|
||||
|
||||
# Name of RPM or DEB package
|
||||
PKGNAME=php-${OWNER}-${PROJECT}
|
||||
|
||||
# Data dir
|
||||
DATADIR=usr/share
|
||||
|
||||
# PHP home folder
|
||||
PHPHOME=${DATADIR}/php/Com/Tecnick
|
||||
|
||||
# Default installation path for code
|
||||
LIBPATH=${PHPHOME}/Pdf/
|
||||
|
||||
# Path for configuration files (etc/$(PKGNAME)/)
|
||||
CONFIGPATH=etc/$(PKGNAME)/
|
||||
|
||||
# Default installation path for documentation
|
||||
DOCPATH=${DATADIR}/doc/$(PKGNAME)/
|
||||
|
||||
# Installation path for the code
|
||||
PATHINSTBIN=$(DESTDIR)/$(LIBPATH)
|
||||
|
||||
# Installation path for the configuration files
|
||||
PATHINSTCFG=$(DESTDIR)/$(CONFIGPATH)
|
||||
|
||||
# Installation path for documentation
|
||||
PATHINSTDOC=$(DESTDIR)/$(DOCPATH)
|
||||
|
||||
# Current directory
|
||||
CURRENTDIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
# Target directory
|
||||
TARGETDIR=$(CURRENTDIR)target
|
||||
|
||||
# RPM Packaging path (where RPMs will be stored)
|
||||
PATHRPMPKG=$(TARGETDIR)/RPM
|
||||
|
||||
# DEB Packaging path (where DEBs will be stored)
|
||||
PATHDEBPKG=$(TARGETDIR)/DEB
|
||||
|
||||
# BZ2 Packaging path (where BZ2s will be stored)
|
||||
PATHBZ2PKG=$(TARGETDIR)/BZ2
|
||||
|
||||
# Default port number for the example server
|
||||
PORT?=8971
|
||||
|
||||
# PHP binary
|
||||
PHP=$(shell which php)
|
||||
|
||||
# Composer executable (disable APC to as a work-around of a bug)
|
||||
COMPOSER=$(PHP) -d "apc.enable_cli=0" $(shell which composer)
|
||||
|
||||
# phpDocumentor executable file
|
||||
PHPDOC=$(shell which phpDocumentor)
|
||||
|
||||
# --- MAKE TARGETS ---
|
||||
|
||||
# Display general help about this command
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo ""
|
||||
@echo "$(PROJECT) Makefile."
|
||||
@echo "The following commands are available:"
|
||||
@echo ""
|
||||
@echo " make buildall : Build and test everything from scratch"
|
||||
@echo " make bz2 : Package the library in a compressed bz2 archive"
|
||||
@echo " make clean : Delete the vendor and target directories"
|
||||
@echo " make codefix : Fix code style violations"
|
||||
@echo " make deb : Build a DEB package for Debian-like Linux distributions"
|
||||
@echo " make deps : Download all dependencies"
|
||||
@echo " make doc : Generate source code documentation"
|
||||
@echo " make fonts : Build default tc-font-mirror fonts via tc-lib-pdf-font"
|
||||
@echo " make lint : Test source code for coding standard violations"
|
||||
@echo " make qa : Run all tests and reports"
|
||||
@echo " make report : Generate various reports"
|
||||
@echo " make rpm : Build an RPM package for RedHat-like Linux distributions"
|
||||
@echo " make server : Start the development server"
|
||||
@echo " make test : Run unit tests"
|
||||
@echo " make versionup: Increase the version patch number"
|
||||
@echo ""
|
||||
@echo "To test and build everything from scratch:"
|
||||
@echo "make buildall"
|
||||
@echo ""
|
||||
|
||||
# alias for help target
|
||||
.PHONY: all
|
||||
all: help
|
||||
|
||||
# Full build and test sequence
|
||||
.PHONY: x
|
||||
x: buildall
|
||||
|
||||
# Full build and test sequence
|
||||
.PHONY: buildall
|
||||
buildall: deps
|
||||
cd vendor/tecnickcom/tc-lib-pdf-font/ && make buildall
|
||||
$(MAKE) codefix qa bz2 rpm deb
|
||||
|
||||
# Package the library in a compressed bz2 archive
|
||||
.PHONY: bz2
|
||||
bz2:
|
||||
rm -rf $(PATHBZ2PKG)
|
||||
make install DESTDIR=$(PATHBZ2PKG)
|
||||
tar -jcvf $(PATHBZ2PKG)/$(PKGNAME)-$(VERSION)-$(RELEASE).tbz2 -C $(PATHBZ2PKG) $(DATADIR)
|
||||
|
||||
# Delete the vendor and target directories
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf ./vendor $(TARGETDIR)
|
||||
|
||||
# Fix code style violations
|
||||
.PHONY: codefix
|
||||
codefix:
|
||||
./vendor/bin/phpcbf --ignore="./vendor/" --standard=psr12 src test
|
||||
|
||||
# Build a DEB package for Debian-like Linux distributions
|
||||
.PHONY: deb
|
||||
deb:
|
||||
rm -rf $(PATHDEBPKG)
|
||||
make install DESTDIR=$(PATHDEBPKG)/$(PKGNAME)-$(VERSION)
|
||||
rm -f $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/$(DOCPATH)LICENSE
|
||||
tar -zcvf $(PATHDEBPKG)/$(PKGNAME)_$(VERSION).orig.tar.gz -C $(PATHDEBPKG)/ $(PKGNAME)-$(VERSION)
|
||||
cp -rf ./resources/debian $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian
|
||||
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed -i "s/~#DATE#~/`date -R`/" {} \;
|
||||
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed -i "s/~#VENDOR#~/$(VENDOR)/" {} \;
|
||||
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed -i "s/~#PROJECT#~/$(PROJECT)/" {} \;
|
||||
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed -i "s/~#PKGNAME#~/$(PKGNAME)/" {} \;
|
||||
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed -i "s/~#VERSION#~/$(VERSION)/" {} \;
|
||||
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed -i "s/~#RELEASE#~/$(RELEASE)/" {} \;
|
||||
echo $(LIBPATH) > $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/$(PKGNAME).dirs
|
||||
echo "$(LIBPATH)* $(LIBPATH)" > $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/install
|
||||
echo $(DOCPATH) >> $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/$(PKGNAME).dirs
|
||||
echo "$(DOCPATH)* $(DOCPATH)" >> $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/install
|
||||
ifneq ($(strip $(CONFIGPATH)),)
|
||||
echo $(CONFIGPATH) >> $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/$(PKGNAME).dirs
|
||||
echo "$(CONFIGPATH)* $(CONFIGPATH)" >> $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/install
|
||||
endif
|
||||
echo "new-package-should-close-itp-bug" > $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/$(PKGNAME).lintian-overrides
|
||||
cd $(PATHDEBPKG)/$(PKGNAME)-$(VERSION) && debuild -us -uc
|
||||
|
||||
# Clean all artifacts and download all dependencies
|
||||
.PHONY: deps
|
||||
deps: ensuretarget
|
||||
rm -rf ./vendor/*
|
||||
($(COMPOSER) install -vvv --no-interaction)
|
||||
curl --silent --show-error --fail --location --output ./vendor/phpstan.phar https://github.com/phpstan/phpstan/releases/download/2.1.2/phpstan.phar \
|
||||
&& chmod +x ./vendor/phpstan.phar
|
||||
|
||||
# Generate source code documentation
|
||||
.PHONY: doc
|
||||
doc: ensuretarget
|
||||
rm -rf $(TARGETDIR)/doc
|
||||
$(PHPDOC) -d ./src -t $(TARGETDIR)/doc/
|
||||
|
||||
# Create missing target directories for test and build artifacts
|
||||
.PHONY: ensuretarget
|
||||
ensuretarget:
|
||||
mkdir -p $(TARGETDIR)/test
|
||||
mkdir -p $(TARGETDIR)/report
|
||||
mkdir -p $(TARGETDIR)/doc
|
||||
|
||||
# Build default tc-font-mirror fonts via tc-lib-pdf-font
|
||||
.PHONY: fonts
|
||||
fonts:
|
||||
cd vendor/tecnickcom/tc-lib-pdf-font/ && make deps fonts
|
||||
|
||||
# Install this application
|
||||
.PHONY: install
|
||||
install: uninstall
|
||||
mkdir -p $(PATHINSTBIN)
|
||||
cp -rf ./src/* $(PATHINSTBIN)
|
||||
cp -f ./resources/autoload.php $(PATHINSTBIN)
|
||||
find $(PATHINSTBIN) -type d -exec chmod 755 {} \;
|
||||
find $(PATHINSTBIN) -type f -exec chmod 644 {} \;
|
||||
mkdir -p $(PATHINSTDOC)
|
||||
cp -f ./LICENSE $(PATHINSTDOC)
|
||||
cp -f ./README.md $(PATHINSTDOC)
|
||||
cp -f ./VERSION $(PATHINSTDOC)
|
||||
cp -f ./RELEASE $(PATHINSTDOC)
|
||||
chmod -R 644 $(PATHINSTDOC)*
|
||||
ifneq ($(strip $(CONFIGPATH)),)
|
||||
mkdir -p $(PATHINSTCFG)
|
||||
touch -c $(PATHINSTCFG)*
|
||||
cp -ru ./resources/${CONFIGPATH}* $(PATHINSTCFG)
|
||||
find $(PATHINSTCFG) -type d -exec chmod 755 {} \;
|
||||
find $(PATHINSTCFG) -type f -exec chmod 644 {} \;
|
||||
endif
|
||||
|
||||
# Test source code for coding standard violations
|
||||
.PHONY: lint
|
||||
lint:
|
||||
./vendor/bin/phpcs --ignore="./vendor/" --standard=phpcs.xml src test
|
||||
./vendor/bin/phpmd src text unusedcode,naming,design --exclude vendor
|
||||
./vendor/bin/phpmd test text unusedcode,naming,design --exclude */vendor/*
|
||||
php -r 'exit((int)version_compare(PHP_MAJOR_VERSION, "7", ">"));' || ./vendor/phpstan.phar analyse
|
||||
|
||||
# Run all tests and reports
|
||||
.PHONY: qa
|
||||
qa: version ensuretarget lint test report
|
||||
|
||||
# Generate various reports
|
||||
.PHONY: report
|
||||
report: ensuretarget
|
||||
./vendor/bin/pdepend --jdepend-xml=$(TARGETDIR)/report/dependencies.xml --summary-xml=$(TARGETDIR)/report/metrics.xml --jdepend-chart=$(TARGETDIR)/report/dependecies.svg --overview-pyramid=$(TARGETDIR)/report/overview-pyramid.svg --ignore=vendor ./src
|
||||
#./vendor/bartlett/php-compatinfo/bin/phpcompatinfo --no-ansi analyser:run src/ > $(TARGETDIR)/report/phpcompatinfo.txt
|
||||
|
||||
# Build the RPM package for RedHat-like Linux distributions
|
||||
.PHONY: rpm
|
||||
rpm:
|
||||
rm -rf $(PATHRPMPKG)
|
||||
rpmbuild \
|
||||
--define "_topdir $(PATHRPMPKG)" \
|
||||
--define "_vendor $(VENDOR)" \
|
||||
--define "_owner $(OWNER)" \
|
||||
--define "_project $(PROJECT)" \
|
||||
--define "_package $(PKGNAME)" \
|
||||
--define "_version $(VERSION)" \
|
||||
--define "_release $(RELEASE)" \
|
||||
--define "_current_directory $(CURRENTDIR)" \
|
||||
--define "_libpath /$(LIBPATH)" \
|
||||
--define "_docpath /$(DOCPATH)" \
|
||||
--define "_configpath /$(CONFIGPATH)" \
|
||||
-bb resources/rpm/rpm.spec
|
||||
|
||||
# Start the development server
|
||||
.PHONY: server
|
||||
server:
|
||||
$(PHP) -t examples -S localhost:$(PORT)
|
||||
|
||||
# Tag this GIT version
|
||||
.PHONY: tag
|
||||
tag:
|
||||
git checkout main && \
|
||||
git tag -a ${VERSION} -m "Release ${VERSION}" && \
|
||||
git push origin --tags && \
|
||||
git pull
|
||||
|
||||
# Run unit tests
|
||||
.PHONY: test
|
||||
test:
|
||||
cp phpunit.xml.dist phpunit.xml
|
||||
#./vendor/bin/phpunit --migrate-configuration || true
|
||||
XDEBUG_MODE=coverage ./vendor/bin/phpunit --stderr test
|
||||
|
||||
# Remove all installed files
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
rm -rf $(PATHINSTBIN)
|
||||
rm -rf $(PATHINSTDOC)
|
||||
|
||||
# set the version
|
||||
version:
|
||||
sed -i -e "s/protected string \$$version = '.*';/protected string \$$version = '${VERSION}';/g" src/Base.php
|
||||
|
||||
# Increase the version patch number
|
||||
.PHONY: versionup
|
||||
versionup:
|
||||
echo ${VERSION} | gawk -F. '{printf("%d.%d.%d\n",$$1,$$2,(($$3+1)));}' > VERSION
|
||||
$(MAKE) version
|
||||
|
||||
175
vendor/tecnickcom/tc-lib-pdf/README.md
vendored
Normal file
175
vendor/tecnickcom/tc-lib-pdf/README.md
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
# tc-lib-pdf
|
||||
*PHP PDF Library*
|
||||
|
||||
[](https://packagist.org/packages/tecnickcom/tc-lib-pdf)
|
||||

|
||||
[](https://codecov.io/gh/tecnickcom/tc-lib-pdf)
|
||||
[](https://packagist.org/packages/tecnickcom/tc-lib-pdf)
|
||||
[](https://packagist.org/packages/tecnickcom/tc-lib-pdf)
|
||||
|
||||
[](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ)
|
||||
*Please consider supporting this project by making a donation via [PayPal](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ)*
|
||||
|
||||
* **category** Library
|
||||
* **package** \Com\Tecnick\Pdf
|
||||
* **author** Nicola Asuni <info@tecnick.com>
|
||||
* **copyright** 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* **license** http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* **link** https://tcpdf.org
|
||||
* **source** https://github.com/tecnickcom/tc-lib-pdf
|
||||
* **SRC DOC** https://tcpdf.org/docs/srcdoc/tc-lib-pdf
|
||||
|
||||
## Description
|
||||
|
||||
PHP library for generating PDF documents on-the-fly.
|
||||
This is the new version of the TCPDF library that will be deprecated once all the existing features are ported.
|
||||
|
||||
NOTE: The first complete (stable) version will be 8.1.0. As this is currently unstable, only the patch number in the version will be updated, even if breaking changes are introduced.
|
||||
|
||||
### Main Features:
|
||||
|
||||
***(the features striked through are in progress)***
|
||||
|
||||
* all standard page formats, custom page formats, custom margins and units of measure;
|
||||
* UTF-8 Unicode and Right-To-Left languages;
|
||||
* TrueTypeUnicode, OpenTypeUnicode v1, TrueType, OpenType v1, Type1 and CID-0 fonts;
|
||||
* font subsetting;
|
||||
* [] ~SVG~
|
||||
* [] ~CSS~
|
||||
* [] ~HTML~
|
||||
* [] ~JavaScript~
|
||||
* images, graphic (geometric figures) and transformation methods;
|
||||
* supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/script/formats.php)
|
||||
* 1D and 2D barcodes via tc-lib-barcode.
|
||||
* JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Pdfs and Transparencies;
|
||||
* page common content support (header/footer);
|
||||
* document encryption up to 256 bit and digital signature certifications;
|
||||
* PDF annotations, including links, text and file attachments;
|
||||
* text rendering modes (fill, stroke and clipping);
|
||||
* multiple columns mode;
|
||||
* no-write page regions;
|
||||
* bookmarks, named destinations and table of content;
|
||||
* text hyphenation;
|
||||
* text stretching and spacing (tracking);
|
||||
* automatic page break, line break and text alignments including justification;
|
||||
* automatic page numbering and page groups;
|
||||
* move and delete pages;
|
||||
* page compression (requires php-zlib extension);
|
||||
* XOBject Templates;
|
||||
* Layers and object visibility.
|
||||
* PDF/A-1b support.
|
||||
|
||||
### Third party fonts:
|
||||
|
||||
This library may include third party font files released with different licenses.
|
||||
|
||||
All the PHP files on the fonts directory are subject to the general TCPDF license (GNU-LGPLv3),
|
||||
they do not contain any binary data but just a description of the general properties of a particular font.
|
||||
These files can be also generated on the fly using the font utilities and TCPDF methods.
|
||||
|
||||
All the original binary TTF font files have been renamed for compatibility with TCPDF and compressed using the gzcompress PHP function that uses the ZLIB data format (.z files).
|
||||
|
||||
The binary files (.z) that begins with the prefix "free" have been extracted from the GNU FreeFont collection (GNU-GPLv3).
|
||||
The binary files (.z) that begins with the prefix "pdfa" have been derived from the GNU FreeFont, so they are subject to the same license.
|
||||
For the details of Copyright, License and other information, please check the files inside the directory fonts/freefont-20120503
|
||||
Link : http://www.gnu.org/software/freefont/
|
||||
|
||||
The binary files (.z) that begins with the prefix "dejavu" have been extracted from the DejaVu fonts 2.33 (Bitstream) collection.
|
||||
For the details of Copyright, License and other information, please check the files inside the directory fonts/dejavu-fonts-ttf-2.33
|
||||
Link : http://dejavu-fonts.org
|
||||
|
||||
The binary files (.z) that begins with the prefix "ae" have been extracted from the Arabeyes.org collection (GNU-GPLv2).
|
||||
Link : http://projects.arabeyes.org/
|
||||
|
||||
### ICC profile:
|
||||
|
||||
TCPDF includes the sRGB.icc profile from the icc-profiles-free Debian package:
|
||||
https://packages.debian.org/source/stable/icc-profiles-free
|
||||
|
||||
## Getting started
|
||||
|
||||
First, you need to install all development dependencies using [Composer](https://getcomposer.org/):
|
||||
|
||||
```bash
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ mv composer.phar /usr/local/bin/composer
|
||||
```
|
||||
|
||||
You can install the library via composer:
|
||||
|
||||
```bash
|
||||
composer require tecnickcom/tc-lib-pdf
|
||||
```
|
||||
|
||||
This project include a Makefile that allows you to test and build the project with simple commands.
|
||||
To see all available options:
|
||||
|
||||
```bash
|
||||
make help
|
||||
```
|
||||
|
||||
To install all the development dependencies:
|
||||
|
||||
```bash
|
||||
make deps
|
||||
```
|
||||
|
||||
## Running all tests
|
||||
|
||||
Before committing the code, please check if it passes all tests using
|
||||
|
||||
```bash
|
||||
make qa
|
||||
```
|
||||
|
||||
All artifacts are generated in the target directory.
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
Examples are located in the `example` directory.
|
||||
|
||||
Start a development server (requires PHP 8.0+) using the command:
|
||||
|
||||
```
|
||||
make server
|
||||
```
|
||||
|
||||
and point your browser to <http://localhost:8971/index.php>
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Create a composer.json in your projects root-directory:
|
||||
|
||||
```json
|
||||
{
|
||||
"require": {
|
||||
"tecnickcom/tc-lib-pdf": "dev-main"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "git@github.com:tecnickcom/tc-lib-pdf.git"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Packaging
|
||||
|
||||
This library is mainly intended to be used and included in other PHP projects using Composer.
|
||||
However, since some production environments dictates the installation of any application as RPM or DEB packages,
|
||||
this library includes make targets for building these packages (`make rpm` and `make deb`).
|
||||
The packages are generated under the `target` directory.
|
||||
|
||||
When this library is installed using an RPM or DEB package, you can use it your code by including the autoloader:
|
||||
```
|
||||
require_once ('/usr/share/php/Com/Tecnick/Barcode/autoload.php');
|
||||
```
|
||||
|
||||
|
||||
## Developer(s) Contact
|
||||
|
||||
* Nicola Asuni <info@tecnick.com>
|
||||
1
vendor/tecnickcom/tc-lib-pdf/RELEASE
vendored
Normal file
1
vendor/tecnickcom/tc-lib-pdf/RELEASE
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
5
vendor/tecnickcom/tc-lib-pdf/SECURITY.md
vendored
Normal file
5
vendor/tecnickcom/tc-lib-pdf/SECURITY.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please report (suspected) security vulnerabilities to info@tecnick.com.
|
||||
1
vendor/tecnickcom/tc-lib-pdf/VERSION
vendored
Normal file
1
vendor/tecnickcom/tc-lib-pdf/VERSION
vendored
Normal file
@@ -0,0 +1 @@
|
||||
8.1.5
|
||||
57
vendor/tecnickcom/tc-lib-pdf/composer.json
vendored
Normal file
57
vendor/tecnickcom/tc-lib-pdf/composer.json
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "tecnickcom/tc-lib-pdf",
|
||||
"description": "PHP PDF Library",
|
||||
"type": "library",
|
||||
"homepage": "http://www.tecnick.com",
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"keywords": [
|
||||
"tc-lib-pdf",
|
||||
"TCPDF",
|
||||
"PDF",
|
||||
"PDFD32000-2008",
|
||||
"document"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicola Asuni",
|
||||
"email": "info@tecnick.com",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"ext-date": "*",
|
||||
"ext-pcre": "*",
|
||||
"tecnickcom/tc-lib-barcode": "^2.4",
|
||||
"tecnickcom/tc-lib-color": "^2.2",
|
||||
"tecnickcom/tc-lib-pdf-image": "^2.1",
|
||||
"tecnickcom/tc-lib-pdf-font": "^2.6",
|
||||
"tecnickcom/tc-lib-file": "^2.2",
|
||||
"tecnickcom/tc-lib-pdf-encrypt": "^2.1",
|
||||
"tecnickcom/tc-lib-unicode-data": "^2.0",
|
||||
"tecnickcom/tc-lib-unicode": "^2.0",
|
||||
"tecnickcom/tc-lib-pdf-page": "^4.2",
|
||||
"tecnickcom/tc-lib-pdf-graph": "^2.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"pdepend/pdepend": "2.16.2",
|
||||
"phpmd/phpmd": "2.15.0",
|
||||
"phpunit/phpunit": "12.2.0 || 11.5.7 || 10.5.40",
|
||||
"squizlabs/php_codesniffer": "3.13.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Com\\Tecnick\\Pdf\\": "src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Test\\": "test"
|
||||
}
|
||||
},
|
||||
"archive": {
|
||||
"exclude": [
|
||||
"/example"
|
||||
]
|
||||
}
|
||||
}
|
||||
40
vendor/tecnickcom/tc-lib-pdf/examples/data/cert/tcpdf.crt
vendored
Normal file
40
vendor/tecnickcom/tc-lib-pdf/examples/data/cert/tcpdf.crt
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
Bag Attributes
|
||||
localKeyID: 7B AB 1B 7A BE 4C 85 C0 1A A6 DC 59 3F 79 48 C3 93 38 68 9C
|
||||
subject=/CN=TCPDF DEMO/O=TCPDF/OU=DEMO/emailAddress=you@example.com/C=IT
|
||||
issuer=/CN=TCPDF DEMO/O=TCPDF/OU=DEMO/emailAddress=you@example.com/C=IT
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC1TCCAj6gAwIBAgIKkehOL/XGkB5cjjANBgkqhkiG9w0BAQUFADBhMRMwEQYD
|
||||
VQQDEwpUQ1BERiBERU1PMQ4wDAYDVQQKEwVUQ1BERjENMAsGA1UECxMEREVNTzEe
|
||||
MBwGCSqGSIb3DQEJARYPeW91QGV4YW1wbGUuY29tMQswCQYDVQQGEwJJVDAeFw0w
|
||||
OTA4MjExMjU0NDhaFw0xNDA4MjExMjU0NDhaMGExEzARBgNVBAMTClRDUERGIERF
|
||||
TU8xDjAMBgNVBAoTBVRDUERGMQ0wCwYDVQQLEwRERU1PMR4wHAYJKoZIhvcNAQkB
|
||||
Fg95b3VAZXhhbXBsZS5jb20xCzAJBgNVBAYTAklUMIGfMA0GCSqGSIb3DQEBAQUA
|
||||
A4GNADCBiQKBgQDAqIL0uGKmTR98Lxx2vEEE1OGKkMXFo0JViitALe7Onhxxqx0H
|
||||
XMUDKF5mvEVu1rcvh7/oAnAfrCuEpL/up3u1mQCgBE7WXBnFFE/AE3jCksh9OkS0
|
||||
Z0Xj9woN5bzxRDsGoPiOu/4xzk5qSEXt8jf2Ep90QuNkqLIRT4swAzpDbwIDAQAB
|
||||
o4GTMIGQMDcGA1UdEgQwMC6gEQYDVQQDDApUQ1BERiBERU1PoAwGA1UECgwFVENQ
|
||||
REagCwYDVQQLDARERU1PMDcGA1UdEQQwMC6gEQYDVQQDDApUQ1BERiBERU1PoAwG
|
||||
A1UECgwFVENQREagCwYDVQQLDARERU1PMA8GCSqGSIb3LwEBCgQCBQAwCwYDVR0P
|
||||
BAQDAgSQMA0GCSqGSIb3DQEBBQUAA4GBAEhTQfqX3ZNdHmpTLDbIj22RHXii2roE
|
||||
OavCbu9WsHoWpva0qSd+yIoD594VHvYAd29sfzDfiN+7W0aiZfDhq5jpaSQMVlN8
|
||||
RGYMupbHY/+a9Gz1wqxnR84mlTtIkZVRYAhsfPwy6M1BEjdMqfdh9h40JIdkdjtb
|
||||
8faTCfXPePWQ
|
||||
-----END CERTIFICATE-----
|
||||
Bag Attributes
|
||||
localKeyID: 7B AB 1B 7A BE 4C 85 C0 1A A6 DC 59 3F 79 48 C3 93 38 68 9C
|
||||
Key Attributes: <No Attributes>
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXQIBAAKBgQDAqIL0uGKmTR98Lxx2vEEE1OGKkMXFo0JViitALe7Onhxxqx0H
|
||||
XMUDKF5mvEVu1rcvh7/oAnAfrCuEpL/up3u1mQCgBE7WXBnFFE/AE3jCksh9OkS0
|
||||
Z0Xj9woN5bzxRDsGoPiOu/4xzk5qSEXt8jf2Ep90QuNkqLIRT4swAzpDbwIDAQAB
|
||||
AoGAXc+wNMmz/5Z+RlIKYia44klmqbplEx+0JULqXI4BQsrqvs67i+I4bJkznoL+
|
||||
rEIRYSuQ3sCRKFsFtckjTGpxadnxkB+uwGKc6pZChv99BFX6HFR4hgBlT/BBRAQA
|
||||
hMDlM2JIRr4S4SMVXR7MHwGMUf9mUeanGLR3ZWtU3aXJrIECQQD7OaYUVYNEEnM9
|
||||
uXyjm22CuHyqyEf5gb13sK0uQty67547yJTMUQZd/sQc9KGwhzBbhrob2LO2jAhh
|
||||
S+f+NSRnAkEAxFHm3fMI5RgXmswxlGm4QW07a/Ueo7ZJG6xjTkFXluJhd+XHswRD
|
||||
dQIO3zG9nGjNUoeMrPhXhPvKqFc2F9RDuQJAQBEGin74N77gxqfr4ik79y8nE8J5
|
||||
oGZ2s/RJZdfFRKLg3mwbjjNHhWb4Ck5UgZkoOt8TzRApXG8/n9hktE5HFwJBALur
|
||||
M5AueO1Pl5kB489lNJ9OxUQRYUXMxpxuscuoCQwSwmv0O2+0/qtG2WKhUQnI4aYo
|
||||
L+FV0YwtivBb1jj3T/kCQQDIWOxq8eRowdaMzvJpRUHFgMcf1AVZExKyrugwYOWd
|
||||
KNsDxC4KaQOsPt8iT/Ulo4g/MJC0HolCOhWibKmR9Ayl
|
||||
-----END RSA PRIVATE KEY-----
|
||||
BIN
vendor/tecnickcom/tc-lib-pdf/examples/data/cert/tcpdf.fdf
vendored
Normal file
BIN
vendor/tecnickcom/tc-lib-pdf/examples/data/cert/tcpdf.fdf
vendored
Normal file
Binary file not shown.
BIN
vendor/tecnickcom/tc-lib-pdf/examples/data/cert/tcpdf.p12
vendored
Normal file
BIN
vendor/tecnickcom/tc-lib-pdf/examples/data/cert/tcpdf.p12
vendored
Normal file
Binary file not shown.
128
vendor/tecnickcom/tc-lib-pdf/examples/data/utf8test.txt
vendored
Normal file
128
vendor/tecnickcom/tc-lib-pdf/examples/data/utf8test.txt
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
Sentences that contain all letters commonly used in a language
|
||||
--------------------------------------------------------------
|
||||
|
||||
This file is UTF-8 encoded.
|
||||
|
||||
Czech (cz)
|
||||
---------
|
||||
|
||||
Příšerně žluťoučký kůň úpěl ďábelské ódy.
|
||||
Hleď, toť přízračný kůň v mátožné póze šíleně úpí.
|
||||
Zvlášť zákeřný učeň s ďolíčky běží podél zóny úlů.
|
||||
Loď čeří kýlem tůň obzvlášť v Grónské úžině.
|
||||
Ó, náhlý déšť již zvířil prach a čilá laň teď běží s houfcem gazel k úkrytům.
|
||||
|
||||
Danish (da)
|
||||
---------
|
||||
|
||||
Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen
|
||||
Wolther spillede på xylofon.
|
||||
(= Quiz contestants were eating strawbery with cream while Wolther
|
||||
the circus clown played on xylophone.)
|
||||
|
||||
German (de)
|
||||
-----------
|
||||
|
||||
Falsches Üben von Xylophonmusik quält jeden größeren Zwerg
|
||||
(= Wrongful practicing of xylophone music tortures every larger dwarf)
|
||||
|
||||
Zwölf Boxkämpfer jagten Eva quer über den Sylter Deich
|
||||
(= Twelve boxing fighters hunted Eva across the dike of Sylt)
|
||||
|
||||
Heizölrückstoßabdämpfung
|
||||
(= fuel oil recoil absorber)
|
||||
(jqvwxy missing, but all non-ASCII letters in one word)
|
||||
|
||||
English (en)
|
||||
------------
|
||||
|
||||
The quick brown fox jumps over the lazy dog
|
||||
|
||||
Spanish (es)
|
||||
------------
|
||||
|
||||
El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y
|
||||
frío, añoraba a su querido cachorro.
|
||||
(Contains every letter and every accent, but not every combination
|
||||
of vowel + acute.)
|
||||
|
||||
French (fr)
|
||||
-----------
|
||||
|
||||
Portez ce vieux whisky au juge blond qui fume sur son île intérieure, à
|
||||
côté de l'alcôve ovoïde, où les bûches se consument dans l'âtre, ce
|
||||
qui lui permet de penser à la cænogenèse de l'être dont il est question
|
||||
dans la cause ambiguë entendue à Moÿ, dans un capharnaüm qui,
|
||||
pense-t-il, diminue çà et là la qualité de son œuvre.
|
||||
|
||||
l'île exiguë
|
||||
Où l'obèse jury mûr
|
||||
Fête l'haï volapük,
|
||||
Âne ex aéquo au whist,
|
||||
Ôtez ce vœu déçu.
|
||||
|
||||
Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en
|
||||
canoë au delà des îles, près du mälström où brûlent les novæ.
|
||||
|
||||
Irish Gaelic (ga)
|
||||
-----------------
|
||||
|
||||
D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh
|
||||
|
||||
Hungarian (hu)
|
||||
--------------
|
||||
|
||||
Árvíztűrő tükörfúrógép
|
||||
(= flood-proof mirror-drilling machine, only all non-ASCII letters)
|
||||
|
||||
Icelandic (is)
|
||||
--------------
|
||||
|
||||
Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa
|
||||
|
||||
Sævör grét áðan því úlpan var ónýt
|
||||
(some ASCII letters missing)
|
||||
|
||||
Greek (el)
|
||||
-------------
|
||||
|
||||
Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο
|
||||
(= No more shall I see acacias or myrtles in the golden clearing)
|
||||
|
||||
Ξεσκεπάζω τὴν ψυχοφθόρα βδελυγμία
|
||||
(= I uncover the soul-destroying abhorrence)
|
||||
|
||||
Hebrew (iw)
|
||||
-----------
|
||||
|
||||
? דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה
|
||||
|
||||
Polish (pl)
|
||||
-----------
|
||||
|
||||
Pchnąć w tę łódź jeża lub osiem skrzyń fig
|
||||
(= To push a hedgehog or eight bins of figs in this boat)
|
||||
|
||||
Zażółć gęślą jaźń
|
||||
|
||||
Russian (ru)
|
||||
------------
|
||||
|
||||
В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!
|
||||
(= Would a citrus live in the bushes of south? Yes, but only a fake one!)
|
||||
|
||||
Thai (th)
|
||||
---------
|
||||
|
||||
[--------------------------|------------------------]
|
||||
๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า กว่าบรรดาฝูงสัตว์เดรัจฉาน
|
||||
จงฝ่าฟันพัฒนาวิชาการ อย่าล้างผลาญฤๅเข่นฆ่าบีฑาใคร
|
||||
ไม่ถือโทษโกรธแช่งซัดฮึดฮัดด่า หัดอภัยเหมือนกีฬาอัชฌาสัย
|
||||
ปฏิบัติประพฤติกฎกำหนดใจ พูดจาให้จ๊ะๆ จ๋าๆ น่าฟังเอย ฯ
|
||||
|
||||
[The copyright for the Thai example is owned by The Computer
|
||||
Association of Thailand under the Royal Patronage of His Majesty the
|
||||
King.]
|
||||
|
||||
Please let me know if you find others! Special thanks to the people
|
||||
from all over the world who contributed these sentences.
|
||||
214
vendor/tecnickcom/tc-lib-pdf/examples/images/tcpdf_box.ai
vendored
Normal file
214
vendor/tecnickcom/tc-lib-pdf/examples/images/tcpdf_box.ai
vendored
Normal file
@@ -0,0 +1,214 @@
|
||||
%!PS-Adobe-3.0 EPSF
|
||||
%%Creator: Adobe Illustrator
|
||||
%%BoundingBox: -7 0 487 327
|
||||
%%HiResBoundingBox: -6.66162 2.44007e-05 486.662 326.648
|
||||
%AI5_FileFormat 3
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
%%EndProlog
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
1 XR
|
||||
%AI5_BeginLayer
|
||||
1 1 1 1 0 0 -1 49 80 161 Lb
|
||||
(New Layer) Ln
|
||||
0.620000 0.580000 0.435000 0.996000 K
|
||||
[] 0 d
|
||||
1.402287 w
|
||||
0 j
|
||||
0 J
|
||||
0.263000 0.290000 0.898000 0.263000 k
|
||||
72.7885 255.643 m
|
||||
277.08 286.778 L
|
||||
425.478 260.993 L
|
||||
408.269 190.301 L
|
||||
113.504 181.247 L
|
||||
113.504 181.247 72.9813 241.769 72.7885 255.643 C
|
||||
b
|
||||
0.620000 0.580000 0.435000 0.996000 K
|
||||
1 j
|
||||
0.094000 0.102000 0.369000 0.016000 k
|
||||
423.247 259.914 m
|
||||
240.217 207.097 L
|
||||
240.635 0.701168 L
|
||||
397.776 116.053 L
|
||||
423.247 259.914 L
|
||||
b
|
||||
0.620000 0.580000 0.435000 0.996000 K
|
||||
0.133000 0.141000 0.541000 0.035000 k
|
||||
72.1745 254.207 m
|
||||
240.217 207.097 L
|
||||
240.561 0.783816 L
|
||||
101.054 87.946 L
|
||||
72.1745 254.207 L
|
||||
b
|
||||
0.047000 0.059000 0.184000 0.004000 k
|
||||
423.247 259.914 m
|
||||
308.187 51.1553 L
|
||||
396.862 116.972 L
|
||||
423.247 259.914 L
|
||||
f
|
||||
0.620000 0.580000 0.435000 0.996000 K
|
||||
0 j
|
||||
0.047000 0.059000 0.184000 0.004000 k
|
||||
479.312 250.415 m
|
||||
423.613 260.243 L
|
||||
240.385 206.966 L
|
||||
314.061 186.394 L
|
||||
479.312 250.415 L
|
||||
b
|
||||
0.620000 0.580000 0.435000 0.996000 K
|
||||
0.047000 0.059000 0.184000 0.004000 k
|
||||
69.9121 254.273 m
|
||||
237.965 207.131 L
|
||||
163.618 164.537 L
|
||||
0.687544 234.686 L
|
||||
69.9121 254.273 L
|
||||
b
|
||||
0.620000 0.580000 0.435000 0.996000 K
|
||||
0.047000 0.059000 0.184000 0.004000 k
|
||||
242.971 319.299 m
|
||||
275.613 286.233 L
|
||||
72.5703 254.295 L
|
||||
16.555 296.161 L
|
||||
242.971 319.299 L
|
||||
b
|
||||
0.620000 0.580000 0.435000 0.996000 K
|
||||
0.133000 0.141000 0.541000 0.035000 k
|
||||
423.496 260.684 m
|
||||
275.426 286.441 L
|
||||
307.326 316.69 L
|
||||
462.053 292.606 L
|
||||
423.496 260.684 L
|
||||
b
|
||||
0.196000 0.227000 0.871000 0.106000 k
|
||||
75.26 254.037 m
|
||||
274.806 285.371 L
|
||||
227.928 211.257 L
|
||||
163.396 228.836 130.937 238.701 75.26 254.037 C
|
||||
f
|
||||
0.620000 0.580000 0.435000 0.996000 K
|
||||
1 j
|
||||
0.169000 0.314000 0.424000 0.094000 k
|
||||
275.528 286.329 m
|
||||
274.75 216.78 L
|
||||
275.528 286.329 L
|
||||
b
|
||||
0.031000 0.949000 0.745000 0.729000 k
|
||||
285.929 160.982 m
|
||||
285.929 160.982 285.078 139.734 285.078 139.734 C
|
||||
285.078 139.734 275.378 135.096 275.378 135.096 C
|
||||
275.378 135.096 273.058 57.6061 273.058 57.6061 C
|
||||
273.058 57.6061 257.133 47.3536 257.133 47.3536 C
|
||||
257.133 47.3536 258.059 126.816 258.059 126.816 C
|
||||
258.059 126.816 247.186 121.618 247.186 121.618 C
|
||||
247.186 121.618 247.186 144.26 247.186 144.26 C
|
||||
247.186 144.26 285.929 160.982 285.929 160.982 C
|
||||
F
|
||||
0.031000 0.949000 0.745000 0.729000 k
|
||||
320.884 135.342 m
|
||||
320.884 135.342 307.279 128.129 307.279 128.129 C
|
||||
307.279 128.129 308.36 144.944 308.36 144.944 C
|
||||
308.681 149.948 308.724 153.011 308.483 154.097 C
|
||||
308.268 155.24 307.632 155.567 306.572 155.073 C
|
||||
305.368 154.512 304.553 153.381 304.135 151.687 C
|
||||
303.718 149.995 303.36 146.608 303.063 141.565 C
|
||||
303.063 141.565 300.477 97.6864 300.477 97.6864 C
|
||||
300.22 93.3298 300.208 90.6032 300.439 89.4791 C
|
||||
300.668 88.3599 301.318 88.1316 302.385 88.7881 C
|
||||
303.403 89.4149 304.103 90.4684 304.487 91.9528 C
|
||||
304.894 93.4524 305.253 96.6211 305.567 101.497 C
|
||||
305.567 101.497 306.297 112.86 306.297 112.86 C
|
||||
306.297 112.86 319.718 120.438 319.718 120.438 C
|
||||
319.718 120.438 319.446 116.964 319.446 116.964 C
|
||||
318.734 107.862 317.873 101.293 316.856 97.1389 C
|
||||
315.864 93.0164 314.026 88.8059 311.329 84.474 C
|
||||
308.636 80.1307 305.421 76.743 301.646 74.2975 C
|
||||
297.651 71.7096 294.365 70.7251 291.812 71.3887 C
|
||||
289.213 72.064 287.545 74.2699 286.838 78.0362 C
|
||||
286.121 81.8925 285.954 88.3297 286.349 97.4441 C
|
||||
286.349 97.4441 287.575 125.751 287.575 125.751 C
|
||||
287.89 133.007 288.277 138.586 288.737 142.421 C
|
||||
289.202 146.323 290.251 150.369 291.883 154.544 C
|
||||
293.54 158.732 295.716 162.4 298.394 165.529 C
|
||||
301.078 168.689 304.052 170.959 307.296 172.342 C
|
||||
311.621 174.188 315.02 174.154 317.521 172.296 C
|
||||
319.974 170.473 321.427 167.541 321.911 163.514 C
|
||||
322.39 159.578 322.275 153.119 321.579 144.225 C
|
||||
321.579 144.225 320.884 135.342 320.884 135.342 C
|
||||
F
|
||||
0.031000 0.949000 0.745000 0.729000 k
|
||||
*u
|
||||
329.084 179.607 m
|
||||
329.084 179.607 342.074 185.214 342.074 185.214 C
|
||||
345.446 186.669 347.94 187.235 349.586 186.932 C
|
||||
351.233 186.642 352.374 185.695 353.019 184.1 C
|
||||
353.677 182.527 353.999 180.418 353.991 177.777 C
|
||||
354.005 175.2 353.703 171.072 353.088 165.429 C
|
||||
353.088 165.429 352.244 157.683 352.244 157.683 C
|
||||
351.634 152.084 350.908 147.89 350.063 145.056 C
|
||||
349.22 142.228 347.957 139.718 346.265 137.514 C
|
||||
344.583 135.308 342.474 133.487 339.919 132.046 C
|
||||
339.919 132.046 336.736 130.25 336.736 130.25 C
|
||||
336.736 130.25 333.512 96.527 333.512 96.527 C
|
||||
333.512 96.527 321.545 88.8222 321.545 88.8222 C
|
||||
321.545 88.8222 329.084 179.607 329.084 179.607 C
|
||||
F
|
||||
340.42 168.795 m
|
||||
340.42 168.795 338.184 145.407 338.184 145.407 C
|
||||
338.526 145.552 338.82 145.69 339.068 145.822 C
|
||||
340.172 146.404 340.98 147.319 341.498 148.568 C
|
||||
342.038 149.863 342.473 152.174 342.805 155.518 C
|
||||
342.805 155.518 343.55 163.014 343.55 163.014 C
|
||||
343.863 166.167 343.82 168.111 343.416 168.832 C
|
||||
343.011 169.557 342.015 169.547 340.42 168.795 C
|
||||
F
|
||||
*U
|
||||
0.031000 0.949000 0.745000 0.729000 k
|
||||
*u
|
||||
359.204 192.607 m
|
||||
359.204 192.607 367.556 196.212 367.556 196.212 C
|
||||
372.753 198.454 376.114 199.414 377.734 199.14 C
|
||||
379.351 198.877 380.446 197.777 381.03 195.854 C
|
||||
381.608 193.948 381.815 191.642 381.655 188.934 C
|
||||
381.502 186.28 380.88 180.934 379.804 172.981 C
|
||||
379.804 172.981 375.968 144.653 375.968 144.653 C
|
||||
375.021 137.654 374.236 132.926 373.604 130.399 C
|
||||
372.993 127.921 372.216 125.786 371.268 123.986 C
|
||||
370.323 122.215 369.243 120.698 368.023 119.43 C
|
||||
366.801 118.187 365.012 116.807 362.638 115.279 C
|
||||
362.638 115.279 349.593 106.88 349.593 106.88 C
|
||||
349.593 106.88 359.204 192.607 359.204 192.607 C
|
||||
F
|
||||
368.395 181.985 m
|
||||
368.395 181.985 361.644 126.918 361.644 126.918 C
|
||||
363.113 127.815 364.084 128.947 364.566 130.32 C
|
||||
365.053 131.727 365.629 135.077 366.301 140.416 C
|
||||
366.301 140.416 370.368 172.752 370.368 172.752 C
|
||||
370.86 176.666 371.12 179.163 371.145 180.223 C
|
||||
371.168 181.285 371.006 181.972 370.654 182.282 C
|
||||
370.306 182.629 369.555 182.531 368.395 181.985 C
|
||||
F
|
||||
*U
|
||||
0.031000 0.949000 0.745000 0.729000 k
|
||||
387.58 204.854 m
|
||||
387.58 204.854 403.348 211.659 403.348 211.659 C
|
||||
403.348 211.659 400.803 195.062 400.803 195.062 C
|
||||
400.803 195.062 394.579 192.087 394.579 192.087 C
|
||||
394.579 192.087 392.296 176.619 392.296 176.619 C
|
||||
392.296 176.619 397.801 179.482 397.801 179.482 C
|
||||
397.801 179.482 395.533 164.634 395.533 164.634 C
|
||||
395.533 164.634 390.075 161.574 390.075 161.574 C
|
||||
390.075 161.574 385.406 129.937 385.406 129.937 C
|
||||
385.406 129.937 376.374 124.122 376.374 124.122 C
|
||||
376.374 124.122 387.58 204.854 387.58 204.854 C
|
||||
F
|
||||
LB
|
||||
%AI5_EndLayer--
|
||||
%AI5_BeginLayer
|
||||
1 1 1 1 0 0 -1 49 80 161 Lb
|
||||
(MasterLayer 1) Ln
|
||||
LB
|
||||
%AI5_EndLayer--
|
||||
%%Trailer
|
||||
%%EOF
|
||||
69
vendor/tecnickcom/tc-lib-pdf/examples/images/tcpdf_box.svg
vendored
Normal file
69
vendor/tecnickcom/tc-lib-pdf/examples/images/tcpdf_box.svg
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
width="600"
|
||||
height="400"
|
||||
id="tcpdf_box">
|
||||
<path
|
||||
d="M 90.985619,80.446426 346.35007,41.527969 531.84796,73.758171 510.33606,162.12434 141.88004,173.44107 c 0,0 -50.653416,-75.65219 -50.894421,-92.994643 z"
|
||||
id="path3233"
|
||||
style="fill:#a0892c;fill-rule:evenodd;stroke:#000000;stroke-width:1.752859;stroke-miterlimit:4" />
|
||||
<path
|
||||
d="M 529.05896,75.10788 300.27124,141.12856 300.79367,399.12354 497.22012,254.93323 529.05896,75.10788 z"
|
||||
id="path2459"
|
||||
style="fill:#e9ddaf;fill-rule:evenodd;stroke:#000000;stroke-width:1.752859;stroke-linejoin:round;stroke-miterlimit:4" />
|
||||
<path
|
||||
d="M 90.218147,82.241417 300.27124,141.12855 300.7012,399.02023 126.31743,290.06747 90.218147,82.241417 z"
|
||||
id="path3231"
|
||||
style="fill:#decd87;fill-rule:evenodd;stroke:#000000;stroke-width:1.752859;stroke-linejoin:round;stroke-miterlimit:4" />
|
||||
<path
|
||||
d="M 529.05896,75.10788 385.23331,336.05582 496.07782,253.785 529.05896,75.10788 z"
|
||||
id="path3204"
|
||||
style="fill:#f4eed7;fill-rule:evenodd" />
|
||||
<path
|
||||
d="M 599.14056,86.981453 529.51617,74.695641 300.48178,141.29306 392.57645,167.00775 599.14056,86.981453 z"
|
||||
id="path3243"
|
||||
style="fill:#f4eed7;fill-rule:evenodd;stroke:#000000;stroke-width:1.752859;stroke-miterlimit:4" />
|
||||
<path
|
||||
d="M 87.390083,82.159248 297.45667,141.08572 204.52271,194.32928 0.85943,106.64266 87.390083,82.159248 z"
|
||||
id="path3245"
|
||||
style="fill:#f4eed7;fill-rule:evenodd;stroke:#000000;stroke-width:1.752859;stroke-miterlimit:4" />
|
||||
<path
|
||||
d="M 303.71381,0.87646 344.51688,42.208691 90.712837,82.130967 20.69376,29.79868 303.71381,0.876461 z"
|
||||
id="path3247"
|
||||
style="fill:#f4eed7;fill-rule:evenodd;stroke:#000000;stroke-width:1.752859;stroke-miterlimit:4" />
|
||||
<path
|
||||
d="M 529.36993,74.145378 344.28207,41.9492 384.15726,4.13702 577.56598,34.24292 529.36993,74.145378 z"
|
||||
id="path3263"
|
||||
style="fill:#decd87;fill-rule:evenodd;stroke:#000000;stroke-width:1.752859;stroke-miterlimit:4" />
|
||||
<path
|
||||
d="M 94.075058,82.454048 343.50751,43.286419 284.91046,135.92899 C 204.24522,113.95545 163.67139,101.62348 94.075058,82.454049 z"
|
||||
id="path3206"
|
||||
style="fill:#c8ab37;fill-rule:evenodd" />
|
||||
<path
|
||||
d="m 344.40955,42.08839 -0.97239,86.93644 0.97239,-86.93644 z"
|
||||
id="path2426"
|
||||
style="fill:#caa98d;fill-rule:evenodd;stroke:#000000;stroke-width:1.752859;stroke-linejoin:round;stroke-miterlimit:4" />
|
||||
<path
|
||||
d="m 357.41141,198.77278 c 0,0 -1.06345,26.55933 -1.06345,26.55933 0,0 -12.12588,5.79739 -12.12588,5.79739 0,0 -2.89969,96.8629 -2.89969,96.8629 0,0 -19.9061,12.81561 -19.9061,12.81561 0,0 1.15698,-99.32809 1.15698,-99.32809 0,0 -13.59121,6.49803 -13.59121,6.49803 0,0 0,-28.30334 0,-28.30334 0,0 48.42935,-20.90183 48.42935,-20.90183"
|
||||
id="path5441"
|
||||
style="fill:#550000" />
|
||||
<path
|
||||
d="m 401.10504,230.8226 c 0,0 -17.00665,9.0165 -17.00665,9.0165 0,0 1.3512,-21.019 1.3512,-21.019 0.402,-6.2545 0.45517,-10.08344 0.15475,-11.44165 -0.26965,-1.42879 -1.06461,-1.83763 -2.3894,-1.22009 -1.50556,0.70219 -2.52317,2.11514 -3.04563,4.2332 -0.52157,2.11482 -0.96939,6.34812 -1.34085,12.65235 0,0 -3.23221,54.84809 -3.23221,54.84809 -0.32101,5.44577 -0.33578,8.85397 -0.048,10.25909 0.28671,1.39908 1.09888,1.68448 2.43259,0.86377 1.27319,-0.78342 2.14758,-2.10034 2.62838,-3.95581 0.50837,-1.87454 0.95707,-5.83545 1.34897,-11.93002 0,0 0.91309,-14.20398 0.91309,-14.20398 0,0 16.77621,-9.47276 16.77621,-9.47276 0,0 -0.33963,4.34254 -0.33963,4.34254 -0.89019,11.37775 -1.9667,19.58865 -3.23806,24.78162 -1.24018,5.15307 -3.53693,10.4162 -6.90912,15.83102 -3.36563,5.4292 -7.3844,9.66376 -12.10367,12.72073 -4.99368,3.23487 -9.10043,4.46546 -12.29227,3.63599 -3.24878,-0.84418 -5.33295,-3.60156 -6.21771,-8.30939 -0.89523,-4.8204 -1.10458,-12.86691 -0.61096,-24.25988 0,0 1.53271,-35.38347 1.53271,-35.38347 0.3931,-9.07071 0.87778,-16.0441 1.45276,-20.83719 0.58109,-4.87754 1.8923,-9.93605 3.93183,-15.15415 2.07186,-5.235 4.79159,-9.82054 8.13882,-13.73193 3.35501,-3.94881 7.07321,-6.78658 11.12744,-8.51622 5.4072,-2.30643 9.65549,-2.2641 12.78149,0.0581 3.06675,2.27881 4.88321,5.94397 5.48707,10.97809 0.5997,4.91933 0.45568,12.99251 -0.41431,24.11017 0,0 -0.86871,11.10411 -0.86871,11.10411"
|
||||
id="path5443"
|
||||
style="fill:#550000" />
|
||||
<path
|
||||
d="m 411.35443,175.49126 c 0,0 16.23862,-7.00843 16.23862,-7.00843 4.21411,-1.81866 7.33169,-2.52597 9.38946,-2.14839 2.05817,0.3633 3.48441,1.54648 4.29062,3.53996 0.82251,1.9665 1.22608,4.60317 1.21613,7.90484 0.0169,3.22044 -0.36075,8.38028 -1.12943,15.43508 0,0 -1.05478,9.68189 -1.05478,9.68189 -0.76248,6.99831 -1.66961,12.24153 -2.72592,15.78421 -1.05399,3.53464 -2.6333,6.67149 -4.74774,9.42722 -2.10278,2.75729 -4.73932,5.03327 -7.93247,6.83464 0,0 -3.97955,2.24502 -3.97955,2.24502 0,0 -4.02936,42.15401 -4.02936,42.15401 0,0 -14.95935,9.63092 -14.95935,9.63092 0,0 9.42377,-113.48097 9.42377,-113.48097 m 14.17023,13.51561 c 0,0 -2.79438,29.23405 -2.79438,29.23405 0.42658,-0.18139 0.79483,-0.35402 1.10511,-0.5179 1.37976,-0.72847 2.39001,-1.87172 3.03671,-3.4328 0.67474,-1.61934 1.21869,-4.50798 1.63415,-8.6878 0,0 0.93119,-9.36968 0.93119,-9.36968 0.39178,-3.9412 0.33706,-6.37085 -0.16742,-7.27288 -0.50681,-0.90578 -1.75189,-0.89307 -3.74564,0.0468"
|
||||
id="path5445"
|
||||
style="fill:#550000" />
|
||||
<path
|
||||
d="m 449.00479,159.24159 c 0,0 10.44077,-4.5061 10.44077,-4.5061 6.49575,-2.80348 10.69668,-4.00293 12.72158,-3.6608 2.0213,0.32964 3.39048,1.7039 4.12034,4.10832 0.72277,2.38149 0.98129,5.26491 0.78176,8.64975 -0.19201,3.31783 -0.96899,9.99964 -2.31472,19.94068 0,0 -4.79395,35.41017 -4.79395,35.41017 -1.18439,8.74899 -2.16592,14.65866 -2.95572,17.8175 -0.76312,3.09777 -1.73532,5.76644 -2.91974,8.01586 -1.18118,2.21374 -2.5317,4.11101 -4.05642,5.69523 -1.52753,1.55346 -3.76374,3.27924 -6.73096,5.18953 0,0 -16.30603,10.49793 -16.30603,10.49793 0,0 12.01309,-107.15807 12.01309,-107.15807 m 11.48944,13.27721 c 0,0 -8.43966,68.83415 -8.43966,68.83415 1.83639,-1.12169 3.05044,-2.53693 3.65325,-4.25322 0.60837,-1.758 1.3288,-5.94594 2.16813,-12.61931 0,0 5.08401,-40.4202 5.08401,-40.4202 0.61536,-4.89276 0.94013,-8.01438 0.9708,-9.3384 0.0297,-1.32778 -0.17337,-2.18634 -0.61277,-2.57413 -0.43551,-0.43419 -1.37487,-0.31191 -2.82376,0.37111"
|
||||
id="path5447"
|
||||
style="fill:#550000" />
|
||||
<path
|
||||
d="m 484.47485,143.93306 c 0,0 19.70978,-8.50664 19.70978,-8.50664 0,0 -3.18149,20.74545 -3.18149,20.74545 0,0 -7.77993,3.71959 -7.77993,3.71959 0,0 -2.85361,19.33512 -2.85361,19.33512 0,0 6.88156,-3.57958 6.88156,-3.57958 0,0 -2.83499,18.56089 -2.83499,18.56089 0,0 -6.82193,3.82412 -6.82193,3.82412 0,0 -5.83667,39.54715 -5.83667,39.54715 0,0 -11.29004,7.26862 -11.29004,7.26862 0,0 14.00732,-100.91472 14.00732,-100.91472"
|
||||
id="path5449"
|
||||
style="fill:#550000" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.9 KiB |
BIN
vendor/tecnickcom/tc-lib-pdf/examples/images/tcpdf_logo.jpg
vendored
Normal file
BIN
vendor/tecnickcom/tc-lib-pdf/examples/images/tcpdf_logo.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
vendor/tecnickcom/tc-lib-pdf/examples/images/tcpdf_signature.png
vendored
Normal file
BIN
vendor/tecnickcom/tc-lib-pdf/examples/images/tcpdf_signature.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
328
vendor/tecnickcom/tc-lib-pdf/examples/images/testsvg.svg
vendored
Normal file
328
vendor/tecnickcom/tc-lib-pdf/examples/images/testsvg.svg
vendored
Normal file
@@ -0,0 +1,328 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
version="1.1"
|
||||
width="12cm"
|
||||
height="6cm"
|
||||
id="svg2">
|
||||
<desc
|
||||
id="desc4">TCPDF SVG EXAMPLE</desc>
|
||||
<defs
|
||||
id="defs42">
|
||||
<radialGradient
|
||||
cx="85"
|
||||
cy="15"
|
||||
r="5.25"
|
||||
fx="85"
|
||||
fy="15"
|
||||
id="radialGradient2865"
|
||||
xlink:href="#MyRGradient"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
cx="60"
|
||||
cy="25"
|
||||
r="10.5"
|
||||
fx="60"
|
||||
fy="25"
|
||||
id="radialGradient2867"
|
||||
xlink:href="#MyRGradient"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
cx="17.82198"
|
||||
cy="28.055244"
|
||||
r="10.871407"
|
||||
fx="17.82198"
|
||||
fy="28.055244"
|
||||
id="radialGradient2869"
|
||||
xlink:href="#MyRGradient"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(3.6200333,0,0,1.8396889,173.9517,-9.005912)" />
|
||||
<radialGradient
|
||||
cx="184.10963"
|
||||
cy="476.55164"
|
||||
r="74.151497"
|
||||
fx="184.10963"
|
||||
fy="476.55164"
|
||||
id="radialGradient5087"
|
||||
xlink:href="#linearGradient5075"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(3.2520801,0,0,1.0907419,-234.6921,-1.613686)" />
|
||||
<linearGradient
|
||||
id="linearGradient5075">
|
||||
<stop
|
||||
id="stop5077"
|
||||
style="stop-color:#ffff00;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop5079"
|
||||
style="stop-color:#ff0000;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
cx="184.10963"
|
||||
cy="476.55164"
|
||||
r="74.151497"
|
||||
fx="184.10963"
|
||||
fy="476.55164"
|
||||
id="radialGradient2846"
|
||||
xlink:href="#linearGradient5075"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(3.2520801,0,0,1.0907419,-234.6921,-1.613686)" />
|
||||
<linearGradient
|
||||
id="linearGradient2848">
|
||||
<stop
|
||||
id="stop2850"
|
||||
style="stop-color:#ffff00;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop2852"
|
||||
style="stop-color:#ff0000;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
cx="184.10963"
|
||||
cy="476.55164"
|
||||
r="74.151497"
|
||||
fx="184.10963"
|
||||
fy="476.55164"
|
||||
id="radialGradient2854"
|
||||
xlink:href="#linearGradient5075"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(3.2520801,0,0,1.0907419,-234.6921,-1.613686)" />
|
||||
<linearGradient
|
||||
id="linearGradient2856">
|
||||
<stop
|
||||
id="stop2858"
|
||||
style="stop-color:#ffff00;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop2860"
|
||||
style="stop-color:#ff0000;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
cx="184.10963"
|
||||
cy="476.55164"
|
||||
r="74.151497"
|
||||
fx="184.10963"
|
||||
fy="476.55164"
|
||||
id="radialGradient2862"
|
||||
xlink:href="#linearGradient5075"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(3.2520801,0,0,1.0907419,-234.6921,-1.613686)" />
|
||||
<linearGradient
|
||||
id="linearGradient2864">
|
||||
<stop
|
||||
id="stop2866"
|
||||
style="stop-color:#ffff00;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop2868"
|
||||
style="stop-color:#ff0000;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
cx="184.10963"
|
||||
cy="476.55164"
|
||||
r="74.151497"
|
||||
fx="184.10963"
|
||||
fy="476.55164"
|
||||
id="radialGradient2885"
|
||||
xlink:href="#linearGradient5075"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(3.2520801,0,0,1.0907419,-234.6921,-1.613686)" />
|
||||
<radialGradient
|
||||
cx="60"
|
||||
cy="25"
|
||||
r="10.5"
|
||||
fx="60"
|
||||
fy="25"
|
||||
id="radialGradient5215"
|
||||
xlink:href="#MyRGradient"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
cx="184.10963"
|
||||
cy="476.55164"
|
||||
r="74.151497"
|
||||
fx="184.10963"
|
||||
fy="476.55164"
|
||||
id="radialGradient5223"
|
||||
xlink:href="#linearGradient5075"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(3.2520801,0,0,1.0907419,-234.6921,-1.613686)" />
|
||||
<radialGradient
|
||||
cx="184.10963"
|
||||
cy="476.55164"
|
||||
r="74.151497"
|
||||
fx="184.10963"
|
||||
fy="476.55164"
|
||||
id="radialGradient5245"
|
||||
xlink:href="#linearGradient5075"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(3.2520801,0,0,1.0907419,-234.6921,-1.613686)" />
|
||||
<radialGradient
|
||||
cx="184.10963"
|
||||
cy="476.55164"
|
||||
r="74.151497"
|
||||
fx="184.10963"
|
||||
fy="476.55164"
|
||||
id="radialGradient5261"
|
||||
xlink:href="#linearGradient5075"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(3.2520801,0,0,1.0907419,-234.6921,-1.613686)" />
|
||||
<radialGradient
|
||||
cx="184.10963"
|
||||
cy="476.55164"
|
||||
r="74.151497"
|
||||
fx="184.10963"
|
||||
fy="476.55164"
|
||||
id="radialGradient5264"
|
||||
xlink:href="#linearGradient5075"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.53063427,0,0,0.17133835,-41.5959,-53.579631)" />
|
||||
<radialGradient
|
||||
cx="184.10963"
|
||||
cy="476.55164"
|
||||
r="74.151497"
|
||||
fx="184.10963"
|
||||
fy="476.55164"
|
||||
id="radialGradient5267"
|
||||
xlink:href="#linearGradient5075"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.53063427,0,0,0.17133835,-41.5959,-53.579631)" />
|
||||
<radialGradient
|
||||
cx="184.10963"
|
||||
cy="476.55164"
|
||||
r="74.151497"
|
||||
fx="184.10963"
|
||||
fy="476.55164"
|
||||
id="radialGradient5270"
|
||||
xlink:href="#linearGradient5075"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.53063427,0,0,0.17133835,-41.5959,-53.579631)" />
|
||||
<radialGradient
|
||||
cx="85"
|
||||
cy="15"
|
||||
r="5.25"
|
||||
fx="85"
|
||||
fy="15"
|
||||
id="radialGradient5295"
|
||||
xlink:href="#MyRGradient"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<linearGradient
|
||||
x1="2.4930596"
|
||||
y1="8.1225491"
|
||||
x2="58.448399"
|
||||
y2="8.1225491"
|
||||
id="MyLGradient"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(2.1674701,3.2244804e-8,-1.0401032e-8,0.46846403,253.27742,-193.75856)">
|
||||
<stop
|
||||
id="stop7"
|
||||
style="stop-color:#ff6600;stop-opacity:1"
|
||||
offset="0.05" />
|
||||
<stop
|
||||
id="stop9"
|
||||
style="stop-color:#ffff66;stop-opacity:1"
|
||||
offset="0.94999999" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
id="MyRGradient">
|
||||
<stop
|
||||
id="stop12"
|
||||
style="stop-color:#0033ff;stop-opacity:1"
|
||||
offset="0.05" />
|
||||
<stop
|
||||
id="stop14"
|
||||
style="stop-color:#ffff66;stop-opacity:1"
|
||||
offset="0.94999999" />
|
||||
</radialGradient>
|
||||
<rect
|
||||
width="120.08073"
|
||||
height="25.367481"
|
||||
rx="3.602421"
|
||||
ry="2.5367482"
|
||||
x="259.28146"
|
||||
y="-189.53065"
|
||||
transform="matrix(0.71626866,0.69782463,-0.72008162,0.69388937,0,0)"
|
||||
id="rect16"
|
||||
style="fill:url(#MyLGradient);stroke:#0000ff;stroke-width:1.00766146" />
|
||||
<ellipse
|
||||
cx="90"
|
||||
cy="30"
|
||||
rx="20"
|
||||
ry="10"
|
||||
transform="matrix(1.4285714,0,0,1.4285714,178.03709,88.814199)"
|
||||
id="ellipse20"
|
||||
style="fill:#00ff00;stroke:#008000;stroke-width:1" />
|
||||
<path
|
||||
d="m 199.75816,42.607008 c 0,-25.80645 38.7097,-25.80645 38.7097,0 0,25.80645 38.70969,25.80645 38.70969,0 z"
|
||||
id="path30"
|
||||
style="fill:url(#radialGradient2869);stroke:#0000ff;stroke-width:1.29032314" />
|
||||
<path
|
||||
d="m 56.981711,101.40999 q 38.411107,-48.013879 76.822209,0 38.41109,48.01387 76.8222,0"
|
||||
id="path32"
|
||||
style="fill:none;stroke:#008000;stroke-width:0.96027768" />
|
||||
<path
|
||||
d="m 56.981711,101.40999 38.411107,-48.013879 38.411102,48.013879 38.41109,48.01387 38.41111,-48.01387"
|
||||
id="path34"
|
||||
style="fill:none;stroke:#888888;stroke-width:0.38411102" />
|
||||
<line
|
||||
x1="158.17"
|
||||
y1="196.27382"
|
||||
x2="403.61057"
|
||||
y2="196.27382"
|
||||
id="line22"
|
||||
style="fill:#ff0000;stroke:#ff0000;stroke-width:2.72711658;stroke-opacity:1" />
|
||||
<text
|
||||
x="158.15259"
|
||||
y="182.61755"
|
||||
id="text38"
|
||||
style="font-size:35.67964172px;font-weight:bold;fill:#0000ff;font-family:Helvetica">www.tcpdf.org</text>
|
||||
<polygon
|
||||
points="80,10 90,10 90,20 80,20 80,10 "
|
||||
transform="matrix(4.7619048,0,0,4.7619048,-28.55484,-29.862646)"
|
||||
id="polygon26"
|
||||
style="fill:url(#radialGradient5295);stroke:#ff0000;stroke-width:0.5" />
|
||||
<path
|
||||
d="M 172.22678,86.983374 H 140.4086 A 31.818187,31.818187 0 1 0 172.22678,55.16517 z"
|
||||
id="path10"
|
||||
style="fill:#ff0000;stroke:#0000ff;stroke-width:1.06060624" />
|
||||
<path
|
||||
d="M 166.92376,81.680334 V 49.86215 a 31.818187,31.818187 0 0 0 -31.81821,31.818184 z"
|
||||
id="path12"
|
||||
style="fill:#ffff00;stroke:#0000ff;stroke-width:1.06060624" />
|
||||
<path
|
||||
d="m 191.9699,155.18875 13.78038,-6.89018 a 7.7034622,7.7034622 0 1 1 13.78037,-6.89018 l 13.78033,-6.89018 a 15.386158,7.6930793 60 0 1 13.78034,-6.89016 l 13.78034,-6.89017 a 23.073485,7.6911617 60 0 1 13.78037,-6.89019 l 13.78037,-6.89017 a 30.761945,7.6904861 60 1 1 13.78036,-6.89019 l 13.78034,-6.890167"
|
||||
id="path14"
|
||||
style="fill:none;stroke:#ff0000;stroke-width:1.37803578" />
|
||||
<circle
|
||||
cx="60"
|
||||
cy="25"
|
||||
r="10"
|
||||
transform="matrix(2.3809524,0,0,2.3809524,-86.105483,113.11357)"
|
||||
id="circle18"
|
||||
style="fill:url(#radialGradient5215);stroke:#ff0000;stroke-width:1" />
|
||||
<path
|
||||
d="m 32.361418,52.28906 48.780487,0 -24.39025,48.78049 z"
|
||||
id="path28"
|
||||
style="fill:#ffff00;stroke:#0000ff;stroke-width:1.21951222" />
|
||||
<image
|
||||
xlink:href="tcpdf_logo.jpg"
|
||||
id="image36"
|
||||
height="26.666664"
|
||||
width="80"
|
||||
y="111.32501"
|
||||
x="16.751661" />
|
||||
<text
|
||||
x="13.399332"
|
||||
y="41.580627"
|
||||
id="text5343"
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#008000;font-family:helvetica;font-size:30pt">SVG</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 10 KiB |
1487
vendor/tecnickcom/tc-lib-pdf/examples/images/tux.svg
vendored
Normal file
1487
vendor/tecnickcom/tc-lib-pdf/examples/images/tux.svg
vendored
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 54 KiB |
1651
vendor/tecnickcom/tc-lib-pdf/examples/index.php
vendored
Normal file
1651
vendor/tecnickcom/tc-lib-pdf/examples/index.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
308
vendor/tecnickcom/tc-lib-pdf/examples/invoice.php
vendored
Normal file
308
vendor/tecnickcom/tc-lib-pdf/examples/invoice.php
vendored
Normal file
@@ -0,0 +1,308 @@
|
||||
<?php
|
||||
/**
|
||||
* index.php
|
||||
*
|
||||
* @since 2017-05-08
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* This file is part of tc-lib-pdf software library.
|
||||
*/
|
||||
|
||||
// NOTE: run make deps fonts in the project root to generate the dependencies and example fonts.
|
||||
|
||||
// autoloader when using Composer
|
||||
require(__DIR__ . '/../vendor/autoload.php');
|
||||
|
||||
|
||||
define('OUTPUT_FILE', realpath(__DIR__ . '/../target') . '/example_invoice.pdf');
|
||||
|
||||
// define fonts directory
|
||||
define('K_PATH_FONTS', realpath(__DIR__ . '/../vendor/tecnickcom/tc-lib-pdf-font/target/fonts'));
|
||||
|
||||
// autoloader when using RPM or DEB package installation
|
||||
//require ('/usr/share/php/Com/Tecnick/Pdf/autoload.php');
|
||||
|
||||
// main TCPDF object
|
||||
$pdf = new \Com\Tecnick\Pdf\Tcpdf(
|
||||
'mm', // string $unit = 'mm',
|
||||
true, // bool $isunicode = true,
|
||||
false, // bool $subsetfont = false,
|
||||
true, // bool $compress = true,
|
||||
'pdfa3', // string $mode = '',
|
||||
null, // ?ObjEncrypt $objEncrypt = null,
|
||||
);
|
||||
|
||||
// ----------
|
||||
|
||||
|
||||
$pdf->setCreator('tc-lib-pdf');
|
||||
$pdf->setAuthor('John Doe');
|
||||
$pdf->setSubject('tc-lib-pdf invoice example');
|
||||
$pdf->setTitle('Example: Invoice');
|
||||
$pdf->setKeywords('TCPDF tc-lib-pdf invoice example');
|
||||
$pdf->setPDFFilename('test_invoice.pdf');
|
||||
|
||||
$pdf->setViewerPreferences(['DisplayDocTitle' => true]);
|
||||
|
||||
$pdf->enableDefaultPageContent();
|
||||
|
||||
// ----------
|
||||
// Insert fonts
|
||||
|
||||
$bfont1 = $pdf->font->insert($pdf->pon, 'helvetica', '', 12);
|
||||
|
||||
// ----------
|
||||
|
||||
|
||||
// Factur-X 1.07 / ZUGFeRD 2.3
|
||||
|
||||
$pageF01 = $pdf->addPage();
|
||||
$pdf->setBookmark('Factur', '', 0, -1, 0, 0, 'B', '');
|
||||
|
||||
$pdf->page->addContent($bfont1['out']);
|
||||
|
||||
$txtF1 = 'Example of custom XMP metadata for Factur-X 1.07 / ZUGFeRD 2.3';
|
||||
$txtboxF1 = $pdf->getTextCell($txtF1, 15, 15, 150, valign: 'T', halign: 'L');
|
||||
$pdf->page->addContent($txtboxF1);
|
||||
|
||||
$invoiceXML = <<<XML
|
||||
<?xml version='1.0' encoding='UTF-8' ?>
|
||||
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
|
||||
<rsm:ExchangedDocumentContext>
|
||||
<ram:BusinessProcessSpecifiedDocumentContextParameter>
|
||||
<ram:ID>Baurechnung</ram:ID>
|
||||
</ram:BusinessProcessSpecifiedDocumentContextParameter>
|
||||
<ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
<ram:ID>urn:cen.eu:en16931:2017</ram:ID>
|
||||
</ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
</rsm:ExchangedDocumentContext>
|
||||
<rsm:ExchangedDocument>
|
||||
<ram:ID>181301674</ram:ID>
|
||||
<ram:TypeCode>204</ram:TypeCode>
|
||||
<ram:IssueDateTime>
|
||||
<udt:DateTimeString format="102">20241115</udt:DateTimeString>
|
||||
</ram:IssueDateTime>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>Rapport-Nr.: 42389 vom 01.11.2024
|
||||
Im 2. OG BT1 Besprechungsraum eine Beamerhalterung an die Decke montiert. Dafür eine Deckenplatte ausgesägt. Beamerhalterung zur Montage auseinander gebaut. Ein Stromkabel für den Beamer, ein HDMI Kabel und ein VGA Kabel durch die Halterung gezogen. Beamerhalterung wieder zusammengebaut und Beamer montiert. Beamer verkabelt und ausgerichtet. Decke geschlossen.</ram:Content>
|
||||
</ram:IncludedNote>
|
||||
</rsm:ExchangedDocument>
|
||||
<rsm:SupplyChainTradeTransaction>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>01</ram:LineID>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>01 Beamermontage
|
||||
Für die doppelte Verlegung, falls erforderlich.</ram:Content>
|
||||
</ram:IncludedNote>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>TGA Obermonteur/Monteur</ram:Name>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount>43.2</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount>43.2</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="HUR">3</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount>129.6</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>02</ram:LineID>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>02 Außerhalb Angebot</ram:Content>
|
||||
</ram:IncludedNote>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Beamer-Deckenhalterung</ram:Name>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount>122.5</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount>122.5</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="H87">1</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount>122.5</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:BuyerReference>Liselotte Müller-Lüdenscheidt</ram:BuyerReference>
|
||||
<ram:SellerTradeParty>
|
||||
<ram:ID>549910</ram:ID>
|
||||
<ram:Name>ELEKTRON Industrieservice GmbH</ram:Name>
|
||||
<ram:Description>Geschäftsführer Egon Schrempp Amtsgericht Stuttgart HRB 1234</ram:Description>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>74465</ram:PostcodeCode>
|
||||
<ram:LineOne>Erfurter Strasse 13</ram:LineOne>
|
||||
<ram:CityName>Demoort</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE136695976</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:SellerTradeParty>
|
||||
<ram:BuyerTradeParty>
|
||||
<ram:ID>16259</ram:ID>
|
||||
<ram:Name>ConsultingService GmbH</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>76138</ram:PostcodeCode>
|
||||
<ram:LineOne>Musterstr. 18</ram:LineOne>
|
||||
<ram:CityName>Karlsruhe</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
</ram:BuyerTradeParty>
|
||||
<ram:SellerOrderReferencedDocument>
|
||||
<ram:IssuerAssignedID>per Mail vom 01.09.2024</ram:IssuerAssignedID>
|
||||
</ram:SellerOrderReferencedDocument>
|
||||
<ram:AdditionalReferencedDocument>
|
||||
<ram:IssuerAssignedID>13130162</ram:IssuerAssignedID>
|
||||
<ram:URIID>#ef=Aufmass.png</ram:URIID>
|
||||
<ram:TypeCode>916</ram:TypeCode>
|
||||
</ram:AdditionalReferencedDocument>
|
||||
<ram:AdditionalReferencedDocument>
|
||||
<ram:IssuerAssignedID>42389</ram:IssuerAssignedID>
|
||||
<ram:URIID>#ef=ElektronRapport_neu-red.pdf</ram:URIID>
|
||||
<ram:TypeCode>916</ram:TypeCode>
|
||||
</ram:AdditionalReferencedDocument>
|
||||
<ram:SpecifiedProcuringProject>
|
||||
<ram:ID>13130162</ram:ID>
|
||||
<ram:Name>Projekt</ram:Name>
|
||||
</ram:SpecifiedProcuringProject>
|
||||
</ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:ApplicableHeaderTradeDelivery>
|
||||
<ram:ActualDeliverySupplyChainEvent>
|
||||
<ram:OccurrenceDateTime>
|
||||
<udt:DateTimeString format="102">20241101</udt:DateTimeString>
|
||||
</ram:OccurrenceDateTime>
|
||||
</ram:ActualDeliverySupplyChainEvent>
|
||||
</ram:ApplicableHeaderTradeDelivery>
|
||||
<ram:ApplicableHeaderTradeSettlement>
|
||||
<ram:PaymentReference>Rechnung 181301674</ram:PaymentReference>
|
||||
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
||||
<ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:TypeCode>58</ram:TypeCode>
|
||||
<ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:IBANID>DE91100000000123456789</ram:IBANID>
|
||||
</ram:PayeePartyCreditorFinancialAccount>
|
||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount>47.9</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount>252.1</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradePaymentTerms>
|
||||
<ram:Description>Zahlbar sofort rein netto</ram:Description>
|
||||
</ram:SpecifiedTradePaymentTerms>
|
||||
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
<ram:LineTotalAmount>252.1</ram:LineTotalAmount>
|
||||
<ram:ChargeTotalAmount>0</ram:ChargeTotalAmount>
|
||||
<ram:AllowanceTotalAmount>0</ram:AllowanceTotalAmount>
|
||||
<ram:TaxBasisTotalAmount>252.1</ram:TaxBasisTotalAmount>
|
||||
<ram:TaxTotalAmount currencyID="EUR">47.9</ram:TaxTotalAmount>
|
||||
<ram:GrandTotalAmount>300</ram:GrandTotalAmount>
|
||||
<ram:TotalPrepaidAmount>0</ram:TotalPrepaidAmount>
|
||||
<ram:DuePayableAmount>300</ram:DuePayableAmount>
|
||||
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
<ram:ReceivableSpecifiedTradeAccountingAccount>
|
||||
<ram:ID>420</ram:ID>
|
||||
</ram:ReceivableSpecifiedTradeAccountingAccount>
|
||||
</ram:ApplicableHeaderTradeSettlement>
|
||||
</rsm:SupplyChainTradeTransaction>
|
||||
</rsm:CrossIndustryInvoice>
|
||||
XML;
|
||||
|
||||
$pdf->addContentAsEmbeddedFile('factur-x.xml', $invoiceXML);
|
||||
|
||||
$pdf->setCustomXMP('x:xmpmeta.rdf:RDF.rdf:Description.pdfaExtension:schemas.rdf:Bag',
|
||||
'<rdf:li rdf:parseType="Resource">
|
||||
<pdfaSchema:schema>Factur-X PDFA Extension Schema</pdfaSchema:schema>
|
||||
<pdfaSchema:namespaceURI>urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#</pdfaSchema:namespaceURI>
|
||||
<pdfaSchema:prefix>fx</pdfaSchema:prefix>
|
||||
<pdfaSchema:property>
|
||||
<rdf:Seq>
|
||||
<rdf:li rdf:parseType="Resource">
|
||||
<pdfaProperty:name>DocumentFileName</pdfaProperty:name>
|
||||
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
||||
<pdfaProperty:category>external</pdfaProperty:category>
|
||||
<pdfaProperty:description>The name of the embedded XML document</pdfaProperty:description>
|
||||
</rdf:li>
|
||||
<rdf:li rdf:parseType="Resource">
|
||||
<pdfaProperty:name>DocumentType</pdfaProperty:name>
|
||||
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
||||
<pdfaProperty:category>external</pdfaProperty:category>
|
||||
<pdfaProperty:description>The type of the hybrid document in capital letters, e.g. INVOICE or ORDER</pdfaProperty:description>
|
||||
</rdf:li>
|
||||
<rdf:li rdf:parseType="Resource">
|
||||
<pdfaProperty:name>Version</pdfaProperty:name>
|
||||
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
||||
<pdfaProperty:category>external</pdfaProperty:category>
|
||||
<pdfaProperty:description>The actual version of the standard applying to the embedded XML document</pdfaProperty:description>
|
||||
</rdf:li>
|
||||
<rdf:li rdf:parseType="Resource">
|
||||
<pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
|
||||
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
||||
<pdfaProperty:category>external</pdfaProperty:category>
|
||||
<pdfaProperty:description>The conformance level of the embedded XML document</pdfaProperty:description>
|
||||
</rdf:li>
|
||||
</rdf:Seq>
|
||||
</pdfaSchema:property>
|
||||
</rdf:li>'
|
||||
);
|
||||
|
||||
$pdf->setCustomXMP('x:xmpmeta.rdf:RDF',
|
||||
'<rdf:Description xmlns:fx="urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#" rdf:about="">
|
||||
<fx:DocumentType>INVOICE</fx:DocumentType>
|
||||
<fx:DocumentFileName>factur-x.xml</fx:DocumentFileName>
|
||||
<fx:Version>1.0</fx:Version>
|
||||
<fx:ConformanceLevel>EN 16931</fx:ConformanceLevel>
|
||||
</rdf:Description>');
|
||||
|
||||
// =============================================================
|
||||
|
||||
// ----------
|
||||
// get PDF document as raw string
|
||||
$rawpdf = $pdf->getOutPDFString();
|
||||
|
||||
// ----------
|
||||
|
||||
// Various output modes:
|
||||
|
||||
//$pdf->savePDF(dirname(__DIR__).'/target', $rawpdf);
|
||||
$pdf->renderPDF($rawpdf);
|
||||
//$pdf->downloadPDF($rawpdf);
|
||||
//echo $pdf->getMIMEAttachmentPDF($rawpdf);
|
||||
15
vendor/tecnickcom/tc-lib-pdf/phpcompatinfo.json
vendored
Normal file
15
vendor/tecnickcom/tc-lib-pdf/phpcompatinfo.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"source-providers": [
|
||||
{
|
||||
"in": "src as source",
|
||||
"exclude": "vendor",
|
||||
"name": "/\\.(php)$/"
|
||||
}
|
||||
],
|
||||
"plugins": [
|
||||
],
|
||||
"analysers": [
|
||||
],
|
||||
"services": [
|
||||
]
|
||||
}
|
||||
7
vendor/tecnickcom/tc-lib-pdf/phpcs.xml
vendored
Normal file
7
vendor/tecnickcom/tc-lib-pdf/phpcs.xml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="backward-compatibility">
|
||||
<description>PSR-12 for PHP less than 7.1</description>
|
||||
<rule ref="PSR12">
|
||||
<exclude name="PSR12.Properties.ConstantVisibility"/>
|
||||
</rule>
|
||||
</ruleset>
|
||||
10
vendor/tecnickcom/tc-lib-pdf/phpstan.neon
vendored
Normal file
10
vendor/tecnickcom/tc-lib-pdf/phpstan.neon
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
parameters:
|
||||
level: max
|
||||
paths:
|
||||
- src
|
||||
- test
|
||||
excludePaths:
|
||||
- vendor
|
||||
ignoreErrors:
|
||||
reportUnmatchedIgnoredErrors: false
|
||||
treatPhpDocTypesAsCertain: false
|
||||
31
vendor/tecnickcom/tc-lib-pdf/phpunit.xml.dist
vendored
Normal file
31
vendor/tecnickcom/tc-lib-pdf/phpunit.xml.dist
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit backupGlobals="false"
|
||||
bootstrap="vendor/autoload.php"
|
||||
colors="true"
|
||||
displayDetailsOnTestsThatTriggerDeprecations="true"
|
||||
displayDetailsOnTestsThatTriggerErrors="true"
|
||||
displayDetailsOnTestsThatTriggerNotices="true"
|
||||
displayDetailsOnTestsThatTriggerWarnings="true"
|
||||
displayDetailsOnPhpunitDeprecations="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false">
|
||||
<testsuites>
|
||||
<testsuite name="tc-lib-pdf Test Suite">
|
||||
<directory>./test</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<source>
|
||||
<include>
|
||||
<directory suffix=".php">src</directory>
|
||||
</include>
|
||||
</source>
|
||||
<coverage>
|
||||
<report>
|
||||
<clover outputFile="target/coverage/coverage.xml"/>
|
||||
<html outputDirectory="target/coverage" lowUpperBound="50" highLowerBound="90"/>
|
||||
</report>
|
||||
</coverage>
|
||||
<logging>
|
||||
<junit outputFile="target/logs/junit.xml"/>
|
||||
</logging>
|
||||
</phpunit>
|
||||
30
vendor/tecnickcom/tc-lib-pdf/resources/autoload.php
vendored
Normal file
30
vendor/tecnickcom/tc-lib-pdf/resources/autoload.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* autoload.php
|
||||
*
|
||||
* Autoloader for Tecnick.com libraries
|
||||
*
|
||||
* @since 2015-03-04
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* This file is part of tc-lib-pdf software library.
|
||||
*/
|
||||
spl_autoload_register(
|
||||
function ($class) {
|
||||
$prefix = 'Com\\Tecnick\\';
|
||||
$len = strlen($prefix);
|
||||
if (strncmp($prefix, $class, $len) !== 0) {
|
||||
return;
|
||||
}
|
||||
$relative_class = substr($class, $len);
|
||||
$file = dirname(__DIR__).'/'.str_replace('\\', '/', $relative_class).'.php';
|
||||
if (file_exists($file)) {
|
||||
require $file;
|
||||
}
|
||||
}
|
||||
);
|
||||
7
vendor/tecnickcom/tc-lib-pdf/resources/debian/changelog
vendored
Normal file
7
vendor/tecnickcom/tc-lib-pdf/resources/debian/changelog
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
~#PKGNAME#~ (~#VERSION#~-~#RELEASE#~) UNRELEASED; urgency=low
|
||||
|
||||
* Please check the
|
||||
https://github.com/~#VENDOR#~/~#PROJECT#~
|
||||
commit history
|
||||
|
||||
-- Nicola Asuni <info@tecnick.com> ~#DATE#~
|
||||
1
vendor/tecnickcom/tc-lib-pdf/resources/debian/compat
vendored
Normal file
1
vendor/tecnickcom/tc-lib-pdf/resources/debian/compat
vendored
Normal file
@@ -0,0 +1 @@
|
||||
10
|
||||
15
vendor/tecnickcom/tc-lib-pdf/resources/debian/control
vendored
Normal file
15
vendor/tecnickcom/tc-lib-pdf/resources/debian/control
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
Source: ~#PKGNAME#~
|
||||
Maintainer: Nicola Asuni <info@tecnick.com>
|
||||
Section: php
|
||||
Priority: optional
|
||||
Build-Depends: debhelper (>= 9)
|
||||
Standards-Version: 3.9.7
|
||||
Homepage: https://github.com/~#VENDOR#~/~#PROJECT#~
|
||||
Vcs-Git: https://github.com/~#VENDOR#~/~#PROJECT#~.git
|
||||
|
||||
Package: ~#PKGNAME#~
|
||||
Provides: php-~#PROJECT#~
|
||||
Architecture: all
|
||||
Depends: php (>= 8.1.0), php-date, php-tecnickcom-tc-lib-barcode (<< 3.0.0), php-tecnickcom-tc-lib-barcode (>= 2.4.8), php-tecnickcom-tc-lib-color (<< 3.0.0), php-tecnickcom-tc-lib-color (>= 2.2.13), php-tecnickcom-tc-lib-pdf-image (<< 3.0.0), php-tecnickcom-tc-lib-pdf-image (>= 2.1.14), php-tecnickcom-tc-lib-pdf-font (<< 3.0.0), php-tecnickcom-tc-lib-pdf-font (>= 2.6.12), php-tecnickcom-tc-lib-file (<< 3.0.0), php-tecnickcom-tc-lib-file (>= 2.2.2), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.16), php-tecnickcom-tc-lib-unicode-data (<< 3.0.0), php-tecnickcom-tc-lib-unicode-data (>= 2.0.24), php-tecnickcom-tc-lib-unicode (<< 3.0.0), php-tecnickcom-tc-lib-unicode (>= 2.0.25), php-tecnickcom-tc-lib-pdf-page (<< 5.0.0), php-tecnickcom-tc-lib-pdf-page (>= 4.2.12), php-tecnickcom-tc-lib-pdf-graph (<< 3.0.0), php-tecnickcom-tc-lib-pdf-graph (>= 2.3.2), ${misc:Depends}
|
||||
Description: PHP Barcode library
|
||||
This library includes PHP classes to generate PDF documents.
|
||||
20
vendor/tecnickcom/tc-lib-pdf/resources/debian/copyright
vendored
Normal file
20
vendor/tecnickcom/tc-lib-pdf/resources/debian/copyright
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: ~#PROJECT#~
|
||||
Source: https://github.com/~#VENDOR#~/~#PROJECT#~
|
||||
|
||||
Files: *
|
||||
Copyright: Copyright 2001-2025 Nicola Asuni <info@tecnick.com>
|
||||
License: LGPL-3
|
||||
|
||||
License: LGPL-3
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation, either version 3 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, see <http://www.gnu.org/licenses/> or
|
||||
/usr/share/common-licenses/LGPL-3
|
||||
3
vendor/tecnickcom/tc-lib-pdf/resources/debian/rules
vendored
Normal file
3
vendor/tecnickcom/tc-lib-pdf/resources/debian/rules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/make -f
|
||||
%:
|
||||
dh $@
|
||||
1
vendor/tecnickcom/tc-lib-pdf/resources/debian/source/format
vendored
Normal file
1
vendor/tecnickcom/tc-lib-pdf/resources/debian/source/format
vendored
Normal file
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
0
vendor/tecnickcom/tc-lib-pdf/resources/etc/php-tecnickcom-tc-lib-pdf/config.json
vendored
Normal file
0
vendor/tecnickcom/tc-lib-pdf/resources/etc/php-tecnickcom-tc-lib-pdf/config.json
vendored
Normal file
68
vendor/tecnickcom/tc-lib-pdf/resources/rpm/rpm.spec
vendored
Normal file
68
vendor/tecnickcom/tc-lib-pdf/resources/rpm/rpm.spec
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
# SPEC file
|
||||
|
||||
%global c_vendor %{_vendor}
|
||||
%global gh_owner %{_owner}
|
||||
%global gh_project %{_project}
|
||||
|
||||
Name: %{_package}
|
||||
Version: %{_version}
|
||||
Release: %{_release}%{?dist}
|
||||
Summary: PHP library to generate PDF documents
|
||||
|
||||
Group: Development/Libraries
|
||||
License: LGPLv3+
|
||||
URL: https://github.com/%{gh_owner}/%{gh_project}
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: php(language) >= 8.1.0
|
||||
Requires: php-date
|
||||
Requires: php-pcre
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-barcode) < 3.0.0
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-barcode) >= 2.4.8
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-color) < 3.0.0
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.2.13
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-pdf-image) < 3.0.0
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-pdf-image) >= 2.1.14
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font) < 3.0.0
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font) >= 2.6.12
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-file) < 3.0.0
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-file) >= 2.2.2
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 3.0.0
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.16
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) < 3.0.0
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 2.0.24
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-unicode) < 3.0.0
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-unicode) >= 2.0.25
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-pdf-page) < 5.0.0
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-pdf-page) >= 4.2.12
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-pdf-graph) < 3.0.0
|
||||
Requires: php-composer(%{c_vendor}/tc-lib-pdf-graph) >= 2.3.2
|
||||
|
||||
Provides: php-composer(%{c_vendor}/%{gh_project}) = %{version}
|
||||
Provides: php-%{gh_project} = %{version}
|
||||
|
||||
%description
|
||||
PHP library to generate PDF documents
|
||||
|
||||
%build
|
||||
#(cd %{_current_directory} && make build)
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
(cd %{_current_directory} && make install DESTDIR=$RPM_BUILD_ROOT)
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
#(cd %{_current_directory} && make clean)
|
||||
|
||||
%files
|
||||
%attr(-,root,root) %{_libpath}
|
||||
%attr(-,root,root) %{_docpath}
|
||||
%docdir %{_docpath}
|
||||
%config(noreplace) %{_configpath}*
|
||||
|
||||
%changelog
|
||||
* Fri Jun 10 2024 Nicola Asuni <info@tecnick.com> 8.0.0-1
|
||||
- Initial commit
|
||||
789
vendor/tecnickcom/tc-lib-pdf/src/Base.php
vendored
Normal file
789
vendor/tecnickcom/tc-lib-pdf/src/Base.php
vendored
Normal file
@@ -0,0 +1,789 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Base.php
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* This file is part of tc-lib-pdf software library.
|
||||
*/
|
||||
|
||||
namespace Com\Tecnick\Pdf;
|
||||
|
||||
use Com\Tecnick\Pdf\Exception as PdfException;
|
||||
use Com\Tecnick\Barcode\Barcode as ObjBarcode;
|
||||
use Com\Tecnick\Color\Pdf as ObjColor;
|
||||
use Com\Tecnick\File\Cache as ObjCache;
|
||||
use Com\Tecnick\File\File as ObjFile;
|
||||
use Com\Tecnick\Pdf\Encrypt\Encrypt as ObjEncrypt;
|
||||
use Com\Tecnick\Pdf\Font\Stack as ObjFont;
|
||||
use Com\Tecnick\Pdf\Graph\Draw as ObjGraph;
|
||||
use Com\Tecnick\Pdf\Image\Import as ObjImage;
|
||||
use Com\Tecnick\Pdf\Page\Page as ObjPage;
|
||||
use Com\Tecnick\Unicode\Convert as ObjUniConvert;
|
||||
|
||||
/**
|
||||
* Com\Tecnick\Pdf\Base
|
||||
*
|
||||
* Output PDF data
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* @phpstan-import-type PageInputData from \Com\Tecnick\Pdf\Page\Box
|
||||
* @phpstan-import-type PageData from \Com\Tecnick\Pdf\Page\Box
|
||||
* @phpstan-import-type TFontMetric from \Com\Tecnick\Pdf\Font\Stack
|
||||
*
|
||||
* @phpstan-type TViewerPref array{
|
||||
* 'HideToolbar'?: bool,
|
||||
* 'HideMenubar'?: bool,
|
||||
* 'HideWindowUI'?: bool,
|
||||
* 'FitWindow'?: bool,
|
||||
* 'CenterWindow'?: bool,
|
||||
* 'DisplayDocTitle'?: bool,
|
||||
* 'NonFullScreenPageMode'?: string,
|
||||
* 'Direction'?: string,
|
||||
* 'ViewArea'?: string,
|
||||
* 'ViewClip'?: string,
|
||||
* 'PrintArea'?: string,
|
||||
* 'PrintClip'?: string,
|
||||
* 'PrintScaling'?: string,
|
||||
* 'Duplex'?: string,
|
||||
* 'PickTrayByPDFSize'?: bool,
|
||||
* 'PrintPageRange'?: array<int>,
|
||||
* 'NumCopies'?: int,
|
||||
* }
|
||||
*
|
||||
* @phpstan-type TBBox array{
|
||||
* 'x': float,
|
||||
* 'y': float,
|
||||
* 'w': float,
|
||||
* 'h': float,
|
||||
* }
|
||||
*
|
||||
* @phpstan-type TCellDef array{
|
||||
* 'margin': array{
|
||||
* 'T': float,
|
||||
* 'R': float,
|
||||
* 'B': float,
|
||||
* 'L': float,
|
||||
* },
|
||||
* 'padding': array{
|
||||
* 'T': float,
|
||||
* 'R': float,
|
||||
* 'B': float,
|
||||
* 'L': float,
|
||||
* },
|
||||
* 'borderpos': float,
|
||||
* }
|
||||
*
|
||||
* @phpstan-type TRefUnitValues array{
|
||||
* 'parent': float,
|
||||
* 'font': array{
|
||||
* 'rootsize': float,
|
||||
* 'size': float,
|
||||
* 'xheight': float,
|
||||
* 'zerowidth': float,
|
||||
* },
|
||||
* 'viewport': array{
|
||||
* 'width': float,
|
||||
* 'height': float,
|
||||
* },
|
||||
* 'page': array{
|
||||
* 'width': float,
|
||||
* 'height': float,
|
||||
* },
|
||||
* }
|
||||
*
|
||||
* @phpstan-type TCustomXMP array{
|
||||
* 'x:xmpmeta': string,
|
||||
* 'x:xmpmeta.rdf:RDF': string,
|
||||
* 'x:xmpmeta.rdf:RDF.rdf:Description': string,
|
||||
* 'x:xmpmeta.rdf:RDF.rdf:Description.pdfaExtension:schemas': string,
|
||||
* 'x:xmpmeta.rdf:RDF.rdf:Description.pdfaExtension:schemas.rdf:Bag': string,
|
||||
* }
|
||||
*
|
||||
* @phpstan-type TStackBBox array<int, TBBox>
|
||||
*
|
||||
* @phpstan-import-type TAnnot from Output
|
||||
* @phpstan-import-type TEmbeddedFile from Output
|
||||
* @phpstan-import-type TObjID from Output
|
||||
* @phpstan-import-type TOutline from Output
|
||||
* @phpstan-import-type TSignature from Output
|
||||
* @phpstan-import-type TSignTimeStamp from Output
|
||||
* @phpstan-import-type TGTransparency from Output
|
||||
* @phpstan-import-type TUserRights from Output
|
||||
* @phpstan-import-type TXOBject from Output
|
||||
*
|
||||
* @SuppressWarnings("PHPMD")
|
||||
*/
|
||||
abstract class Base
|
||||
{
|
||||
/**
|
||||
* Encrypt object.
|
||||
*/
|
||||
public ObjEncrypt $encrypt;
|
||||
|
||||
/**
|
||||
* Color object.
|
||||
*/
|
||||
public ObjColor $color;
|
||||
|
||||
/**
|
||||
* Barcode object.
|
||||
*/
|
||||
public ObjBarcode $barcode;
|
||||
|
||||
/**
|
||||
* File object.
|
||||
*/
|
||||
public ObjFile $file;
|
||||
|
||||
/**
|
||||
* Cache object.
|
||||
*/
|
||||
public ObjCache $cache;
|
||||
|
||||
/**
|
||||
* Unicode Convert object.
|
||||
*/
|
||||
public ObjUniConvert $uniconv;
|
||||
|
||||
/**
|
||||
* Page object.
|
||||
*/
|
||||
public ObjPage $page;
|
||||
|
||||
/**
|
||||
* Graph object.
|
||||
*/
|
||||
public ObjGraph $graph;
|
||||
|
||||
/**
|
||||
* Font object.
|
||||
*/
|
||||
public ObjFont $font;
|
||||
|
||||
/**
|
||||
* Image Import object.
|
||||
*/
|
||||
public ObjImage $image;
|
||||
|
||||
/**
|
||||
* TCPDF version.
|
||||
*/
|
||||
protected string $version = '8.1.5';
|
||||
|
||||
/**
|
||||
* Time is seconds since EPOCH when the document was created.
|
||||
*/
|
||||
protected int $doctime = 0;
|
||||
|
||||
/**
|
||||
* Time is seconds since EPOCH when the document was modified.
|
||||
*/
|
||||
protected int $docmodtime = 0;
|
||||
|
||||
/**
|
||||
* The name of the application that generates the PDF.
|
||||
*
|
||||
* If the document was converted to PDF from another format,
|
||||
* the name of the conforming product that created the original document from which it was converted.
|
||||
*/
|
||||
protected string $creator = 'TCPDF';
|
||||
|
||||
/**
|
||||
* The name of the person who created the document.
|
||||
*/
|
||||
protected string $author = 'TCPDF';
|
||||
|
||||
/**
|
||||
* Subject of the document.
|
||||
*/
|
||||
protected string $subject = '-';
|
||||
|
||||
/**
|
||||
* Title of the document.
|
||||
*/
|
||||
protected string $title = 'PDF Document';
|
||||
|
||||
/**
|
||||
* Space-separated list of keywords associated with the document.
|
||||
*/
|
||||
protected string $keywords = 'TCPDF';
|
||||
|
||||
/**
|
||||
* Additional custom XMP data.
|
||||
*
|
||||
* @var TCustomXMP
|
||||
*/
|
||||
protected array $custom_xmp = [
|
||||
'x:xmpmeta' => '',
|
||||
'x:xmpmeta.rdf:RDF' => '',
|
||||
'x:xmpmeta.rdf:RDF.rdf:Description' => '',
|
||||
'x:xmpmeta.rdf:RDF.rdf:Description.pdfaExtension:schemas' => '',
|
||||
'x:xmpmeta.rdf:RDF.rdf:Description.pdfaExtension:schemas.rdf:Bag' => '',
|
||||
];
|
||||
|
||||
/**
|
||||
* Set this to TRUE to add the default sRGB ICC color profile
|
||||
*/
|
||||
protected bool $sRGB = false;
|
||||
|
||||
/**
|
||||
* Viewer preferences dictionary controlling the way the document is to be presented on the screen or in print.
|
||||
* (PDF reference, "Viewer Preferences").
|
||||
*
|
||||
* @var TViewerPref
|
||||
*/
|
||||
protected array $viewerpref = [];
|
||||
|
||||
/**
|
||||
* Boolean flag to set the default document language direction.
|
||||
* False = LTR = Left-To-Right.
|
||||
* True = RTL = Right-To-Left.
|
||||
*
|
||||
* @val bool
|
||||
*/
|
||||
protected bool $rtl = false;
|
||||
|
||||
/**
|
||||
* Document ID.
|
||||
*/
|
||||
protected string $fileid;
|
||||
|
||||
/**
|
||||
* Unit of measure.
|
||||
*/
|
||||
protected string $unit = 'mm';
|
||||
|
||||
/**
|
||||
* Valid HTML/CSS/SVG units.
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected const VALIDUNITS = [
|
||||
'%', 'ch', 'cm', 'em', 'ex',
|
||||
'in', 'mm', 'pc', 'pt', 'px',
|
||||
'rem', 'vh', 'vmax', 'vmin', 'vw',
|
||||
];
|
||||
|
||||
/**
|
||||
* Map of relative font sizes.
|
||||
* The key is the relative size and the value is the font size increment in points.
|
||||
*
|
||||
* @var array<string, float>
|
||||
*/
|
||||
protected const FONTRELSIZE = [
|
||||
'xx-small' => -4.0,
|
||||
'x-small' => -3.0,
|
||||
'smaller' => -3.0,
|
||||
'small' => -2.0,
|
||||
'medium' => 0.0,
|
||||
'large' => 2.0,
|
||||
'x-large' => 4.0,
|
||||
'larger' => 3.0,
|
||||
'xx-large' => 6.0,
|
||||
];
|
||||
|
||||
/**
|
||||
* Default eference values for unit conversion.
|
||||
*
|
||||
* @var TRefUnitValues
|
||||
*/
|
||||
protected const REFUNITVAL = [
|
||||
'parent' => 1.0,
|
||||
'font' => [
|
||||
'rootsize' => 10.0,
|
||||
'size' => 10.0,
|
||||
'xheight' => 5.0,
|
||||
'zerowidth' => 3.0,
|
||||
],
|
||||
'viewport' => [
|
||||
'width' => 1000.0,
|
||||
'height' => 1000.0,
|
||||
],
|
||||
'page' => [
|
||||
'width' => 595.276,
|
||||
'height' => 841.890,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* DPI (Dot Per Inch) Document Resolution (do not change).
|
||||
* 1pt = 1/72 of 1in.
|
||||
*/
|
||||
protected float $dpi = 72.0;
|
||||
|
||||
/**
|
||||
* Unit of measure conversion ratio.
|
||||
*/
|
||||
protected float $kunit = 1.0;
|
||||
|
||||
/**
|
||||
* Ratio between an internal point and pixel size.
|
||||
*/
|
||||
protected float $pointtopixelratio = 1.0;
|
||||
|
||||
/**
|
||||
* Version of the PDF/A mode or 0 otherwise.
|
||||
*/
|
||||
protected int $pdfa = 0;
|
||||
|
||||
/**
|
||||
* Enable stream compression.
|
||||
*/
|
||||
protected bool $compress = true;
|
||||
|
||||
/**
|
||||
* True if we are in PDF/X mode.
|
||||
*/
|
||||
protected bool $pdfx = false;
|
||||
|
||||
/**
|
||||
* True if the document is signed.
|
||||
*/
|
||||
protected bool $sign = false;
|
||||
|
||||
/**
|
||||
* True if the signature approval is enabled (for incremental updates).
|
||||
*/
|
||||
protected bool $sigapp = false;
|
||||
|
||||
/**
|
||||
* True to subset the fonts.
|
||||
*/
|
||||
protected bool $subsetfont = false;
|
||||
|
||||
/**
|
||||
* True for Unicode font mode.
|
||||
*/
|
||||
protected bool $isunicode = true;
|
||||
|
||||
/**
|
||||
* Document encoding.
|
||||
*/
|
||||
protected string $encoding = 'UTF-8';
|
||||
|
||||
/**
|
||||
* Current PDF object number.
|
||||
*/
|
||||
public int $pon = 0;
|
||||
|
||||
/**
|
||||
* PDF version.
|
||||
*/
|
||||
protected string $pdfver = '1.7';
|
||||
|
||||
/**
|
||||
* Defines the way the document is to be displayed by the viewer.
|
||||
*
|
||||
* @var array{
|
||||
* zoom: int|string,
|
||||
* layout: string,
|
||||
* mode: string,
|
||||
* }
|
||||
*/
|
||||
protected array $display = [
|
||||
'zoom' => 'default',
|
||||
'layout' => 'SinglePage',
|
||||
'mode' => 'UseNone',
|
||||
];
|
||||
|
||||
/**
|
||||
* Embedded files data.
|
||||
*
|
||||
* @var array<string, TEmbeddedFile>
|
||||
*/
|
||||
protected array $embeddedfiles = [];
|
||||
|
||||
/**
|
||||
* Annotations indexed bu object IDs.
|
||||
*
|
||||
* @var array<int, TAnnot>
|
||||
*/
|
||||
protected array $annotation = [];
|
||||
|
||||
/**
|
||||
* Array containing the regular expression used to identify withespaces or word separators.
|
||||
*
|
||||
* @var array{
|
||||
* r: string,
|
||||
* p: string,
|
||||
* m: string,
|
||||
* }
|
||||
*/
|
||||
protected array $spaceregexp = [
|
||||
'r' => '/[^\S\xa0]/',
|
||||
'p' => '[^\S\xa0]',
|
||||
'm' => '',
|
||||
];
|
||||
|
||||
/**
|
||||
* File name of the PDF document.
|
||||
*/
|
||||
protected string $pdffilename;
|
||||
|
||||
/**
|
||||
* Raw encoded fFile name of the PDF document.
|
||||
*/
|
||||
protected string $encpdffilename;
|
||||
|
||||
/**
|
||||
* Array containing the ID of some named PDF objects.
|
||||
*
|
||||
* @var TObjID
|
||||
*/
|
||||
protected array $objid = [
|
||||
'catalog' => 0,
|
||||
'dests' => 0,
|
||||
'form' => [],
|
||||
'info' => 0,
|
||||
'pages' => 0,
|
||||
'resdic' => 0,
|
||||
'signature' => 0,
|
||||
'srgbicc' => 0,
|
||||
'xmp' => 0,
|
||||
];
|
||||
|
||||
/**
|
||||
* Current XOBject template ID.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected string $xobjtid = '';
|
||||
|
||||
/**
|
||||
* Outlines Data.
|
||||
*
|
||||
* @var array<int, TOutline>
|
||||
*/
|
||||
protected array $outlines = [];
|
||||
|
||||
/**
|
||||
* Outlines Root object ID.
|
||||
*/
|
||||
protected int $outlinerootoid = 0;
|
||||
|
||||
/**
|
||||
* Javascript catalog entry.
|
||||
*/
|
||||
protected string $jstree = '';
|
||||
|
||||
/**
|
||||
* Signature Data.
|
||||
*
|
||||
* @var TSignature
|
||||
*/
|
||||
protected array $signature = [
|
||||
'appearance' => [
|
||||
'empty' => [],
|
||||
'name' => '',
|
||||
'page' => 0,
|
||||
'rect' => '',
|
||||
],
|
||||
'approval' => '',
|
||||
'cert_type' => -1,
|
||||
'extracerts' => null,
|
||||
'info' => [
|
||||
'ContactInfo' => '',
|
||||
'Location' => '',
|
||||
'Name' => '',
|
||||
'Reason' => '',
|
||||
],
|
||||
'password' => '',
|
||||
'privkey' => '',
|
||||
'signcert' => '',
|
||||
];
|
||||
|
||||
/**
|
||||
* Signature Timestamp Data.
|
||||
*
|
||||
* @var TSignTimeStamp
|
||||
*/
|
||||
protected array $sigtimestamp = [
|
||||
'enabled' => false,
|
||||
'host' => '',
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
'cert' => '',
|
||||
];
|
||||
|
||||
/**
|
||||
* ByteRange placemark used during digital signature process.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected const BYTERANGE = '/ByteRange[0 ********** ********** **********]';
|
||||
|
||||
/**
|
||||
* Digital signature max length.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected const SIGMAXLEN = 11742;
|
||||
|
||||
/**
|
||||
* User rights Data.
|
||||
*
|
||||
* @var TUserRights
|
||||
*/
|
||||
protected array $userrights = [
|
||||
'annots' => '/Create/Delete/Modify/Copy/Import/Export',
|
||||
'document' => '/FullSave',
|
||||
'ef' => '/Create/Delete/Modify/Import',
|
||||
'enabled' => false,
|
||||
'form' => '/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate',
|
||||
'formex' => '', // 'BarcodePlaintext',
|
||||
'signature' => '/Modify',
|
||||
];
|
||||
|
||||
/**
|
||||
* XObjects data.
|
||||
*
|
||||
* @var array<string, TXOBject>
|
||||
*/
|
||||
protected array $xobjects = [];
|
||||
|
||||
/**
|
||||
* Stack of bounding boxes [x, y, width, height] in user units.
|
||||
*
|
||||
* @var TStackBBox
|
||||
*/
|
||||
protected array $bbox = [[
|
||||
'x' => 0,
|
||||
'y' => 0,
|
||||
'w' => 0,
|
||||
'h' => 0,
|
||||
]];
|
||||
|
||||
/**
|
||||
* Set to true to enable the default page footer.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected bool $defPageContentEnabled = false;
|
||||
|
||||
/**
|
||||
* Default font for defautl page content.
|
||||
*
|
||||
* @var ?TFontMetric
|
||||
*/
|
||||
protected ?array $defaultfont = null;
|
||||
/**
|
||||
* The default relative position of the cell origin when
|
||||
* the border is centered on the cell edge.
|
||||
*/
|
||||
public const BORDERPOS_DEFAULT = 0;
|
||||
|
||||
/**
|
||||
* The relative position of the cell origin when
|
||||
* the border is external to the cell edge.
|
||||
*/
|
||||
public const BORDERPOS_EXTERNAL = -0.5; //-1/2
|
||||
|
||||
/**
|
||||
* The relative position of the cell origin when
|
||||
* the border is internal to the cell edge.
|
||||
*/
|
||||
public const BORDERPOS_INTERNAL = 0.5; // 1/2
|
||||
|
||||
/**
|
||||
* Default values for cell.
|
||||
*
|
||||
* @const TCellDef
|
||||
*/
|
||||
public const ZEROCELL = [
|
||||
'margin' => [
|
||||
'T' => 0,
|
||||
'R' => 0,
|
||||
'B' => 0,
|
||||
'L' => 0,
|
||||
],
|
||||
'padding' => [
|
||||
'T' => 0,
|
||||
'R' => 0,
|
||||
'B' => 0,
|
||||
'L' => 0,
|
||||
],
|
||||
'borderpos' => self::BORDERPOS_DEFAULT,
|
||||
];
|
||||
|
||||
/**
|
||||
* Default values for cell.
|
||||
*
|
||||
* @var TCellDef
|
||||
*/
|
||||
protected $defcell = self::ZEROCELL;
|
||||
|
||||
/**
|
||||
* Convert user units to internal points unit.
|
||||
*
|
||||
* @param float $usr Value to convert.
|
||||
*/
|
||||
public function toPoints(float $usr): float
|
||||
{
|
||||
return ($usr * $this->kunit);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert internal points to user unit.
|
||||
*
|
||||
* @param float $pnt Value to convert in user units.
|
||||
*/
|
||||
public function toUnit(float $pnt): float
|
||||
{
|
||||
return ($pnt / $this->kunit);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert vertical user value to internal points unit.
|
||||
* Note: the internal Y points coordinate starts at the bottom left of the page.
|
||||
*
|
||||
* @param float $usr Value to convert.
|
||||
* @param float $pageh Optional page height in internal points ($pageh:$this->page->getPage()['pheight']).
|
||||
*/
|
||||
public function toYPoints(float $usr, float $pageh = -1): float
|
||||
{
|
||||
$pageh = $pageh >= 0 ? $pageh : $this->page->getPage()['pheight'];
|
||||
return ($pageh - $this->toPoints($usr));
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert vertical internal points value to user unit.
|
||||
* Note: the internal Y points coordinate starts at the bottom left of the page.
|
||||
*
|
||||
* @param float $pnt Value to convert.
|
||||
* @param float $pageh Optional page height in internal points ($pageh:$this->page->getPage()['pheight']).
|
||||
*/
|
||||
public function toYUnit(float $pnt, float $pageh = -1): float
|
||||
{
|
||||
$pageh = $pageh >= 0 ? $pageh : $this->page->getPage()['pheight'];
|
||||
return $this->toUnit($pageh - $pnt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable the default page content.
|
||||
*
|
||||
* @param bool $enable Enable or disable the default page content.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function enableDefaultPageContent(bool $enable = true): void
|
||||
{
|
||||
$this->defPageContentEnabled = $enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the pixel/point ratio used to convert pixel values to points.
|
||||
*
|
||||
* @param float $val
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setPointToPixelRatio(float $val): void
|
||||
{
|
||||
$this->pointtopixelratio = $val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a string containing value and unit of measure to internal points.
|
||||
* This is used to convert values for SVG, CSS, HTML.
|
||||
*
|
||||
* @param string|float|int $val String containing values and unit.
|
||||
* @param TRefUnitValues $ref Reference values in internal points.
|
||||
* @param string $defunit Default unit (can be one of the VALIDUNITS).
|
||||
*
|
||||
* @return float Internal points value.
|
||||
*/
|
||||
protected function getUnitValuePoints(
|
||||
string|float|int $val,
|
||||
array $ref = self::REFUNITVAL,
|
||||
string $defunit = 'px',
|
||||
): float {
|
||||
$unit = 'px';
|
||||
if (in_array($defunit, self::VALIDUNITS)) {
|
||||
$unit = $defunit;
|
||||
}
|
||||
|
||||
$value = 0.0;
|
||||
if (is_numeric($val)) {
|
||||
$value = floatval($val);
|
||||
} elseif (preg_match('/([0-9\.\-\+]+)([a-z%]{0,4})/', $val, $match)) {
|
||||
$value = floatval($match[1]);
|
||||
if (in_array($match[2], self::VALIDUNITS)) {
|
||||
$unit = $match[2];
|
||||
}
|
||||
} else {
|
||||
throw new PdfException('Invalid value: ' . $val);
|
||||
}
|
||||
|
||||
return match ($unit) {
|
||||
// Percentage relative to the parent element.
|
||||
'%' => (($value * $ref['parent']) / 100),
|
||||
// Relative to the width of the "0" (zero)
|
||||
'ch' => ($value * $ref['font']['zerowidth']),
|
||||
// Centimeters.
|
||||
'cm' => (($value * $this->dpi) / 2.54),
|
||||
// Relative to the font-size of the element.
|
||||
'em' => ($value * $ref['font']['size']),
|
||||
// Relative to the x-height of the current font.
|
||||
'ex' => ($value * $ref['font']['xheight']),
|
||||
// Inches.
|
||||
'in' => ($value * $this->dpi),
|
||||
// Millimeters.
|
||||
'mm' => (($value * $this->dpi) / 25.4),
|
||||
// One pica is 12 points.
|
||||
'pc' => ($value * 12),
|
||||
// Points.
|
||||
'pt' => $value,
|
||||
// Pixels.
|
||||
'px' => ($value * $this->pointtopixelratio),
|
||||
// Relative to font-size of the root element.
|
||||
'rem' => ($value * $ref['font']['rootsize']),
|
||||
// Relative to 1% of the height of the viewport.
|
||||
'vh' => (($value * $ref['viewport']['height']) / 100),
|
||||
// Relative to 1% of viewport's* larger dimension.
|
||||
'vmax' => (($value * max($ref['viewport']['height'], $ref['viewport']['width'])) / 100),
|
||||
// Relative to 1% of viewport's smaller dimension.
|
||||
'vmin' => (($value * min($ref['viewport']['height'], $ref['viewport']['width'])) / 100),
|
||||
// Relative to 1% of the width of the viewport.
|
||||
'vw' => (($value * $ref['viewport']['width']) / 100),
|
||||
// Default to pixels.
|
||||
default => ($value * $this->pointtopixelratio),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a string containing font size value to internal points.
|
||||
* This is used to convert values for SVG, CSS, HTML.
|
||||
*
|
||||
* @param string|float|int $val String containing values and unit.
|
||||
* @param TRefUnitValues $ref Reference values in internal points.
|
||||
* @param string $defunit Default unit (can be one of the VALIDUNITS).
|
||||
*
|
||||
* @return float Internal points value.
|
||||
*/
|
||||
protected function getFontValuePoints(
|
||||
string|float|int $val,
|
||||
array $ref = self::REFUNITVAL,
|
||||
string $defunit = 'pt',
|
||||
): float {
|
||||
if (is_string($val) && isset(self::FONTRELSIZE[$val])) {
|
||||
return ($ref['parent'] + self::FONTRELSIZE[$val]);
|
||||
}
|
||||
|
||||
return $this->getUnitValuePoints($val, $ref, $defunit);
|
||||
}
|
||||
}
|
||||
36
vendor/tecnickcom/tc-lib-pdf/src/CSS.php
vendored
Normal file
36
vendor/tecnickcom/tc-lib-pdf/src/CSS.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CSS.php
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* This file is part of tc-lib-pdf software library.
|
||||
*/
|
||||
|
||||
namespace Com\Tecnick\Pdf;
|
||||
|
||||
use Com\Tecnick\Pdf\Exception as PdfException;
|
||||
|
||||
/**
|
||||
* Com\Tecnick\Pdf\CSS
|
||||
*
|
||||
* CSS PDF class
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*/
|
||||
abstract class CSS extends \Com\Tecnick\Pdf\SVG
|
||||
{
|
||||
}
|
||||
625
vendor/tecnickcom/tc-lib-pdf/src/Cell.php
vendored
Normal file
625
vendor/tecnickcom/tc-lib-pdf/src/Cell.php
vendored
Normal file
@@ -0,0 +1,625 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Text.php
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* This file is part of tc-lib-pdf software library.
|
||||
*/
|
||||
|
||||
namespace Com\Tecnick\Pdf;
|
||||
|
||||
/**
|
||||
* Com\Tecnick\Pdf\Cell
|
||||
*
|
||||
* Cell PDF data
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* @phpstan-import-type StyleDataOpt from \Com\Tecnick\Pdf\Graph\Style
|
||||
* @phpstan-import-type TCellDef from \Com\Tecnick\Pdf\Base
|
||||
*
|
||||
*/
|
||||
abstract class Cell extends \Com\Tecnick\Pdf\Base
|
||||
{
|
||||
/**
|
||||
* Set the default cell margin in user units.
|
||||
*
|
||||
* @param float $top Top.
|
||||
* @param float $right Right.
|
||||
* @param float $bottom Bottom.
|
||||
* @param float $left Left.
|
||||
*/
|
||||
public function setDefaultCellMargin(
|
||||
float $top,
|
||||
float $right,
|
||||
float $bottom,
|
||||
float $left
|
||||
): void {
|
||||
$this->defcell['margin']['T'] = $this->toPoints($top);
|
||||
$this->defcell['margin']['R'] = $this->toPoints($right);
|
||||
$this->defcell['margin']['B'] = $this->toPoints($bottom);
|
||||
$this->defcell['margin']['L'] = $this->toPoints($left);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default cell padding in user units.
|
||||
*
|
||||
* @param float $top Top.
|
||||
* @param float $right Right.
|
||||
* @param float $bottom Bottom.
|
||||
* @param float $left Left.
|
||||
*/
|
||||
public function setDefaultCellPadding(
|
||||
float $top,
|
||||
float $right,
|
||||
float $bottom,
|
||||
float $left
|
||||
): void {
|
||||
$this->defcell['padding']['T'] = $this->toPoints($top);
|
||||
$this->defcell['padding']['R'] = $this->toPoints($right);
|
||||
$this->defcell['padding']['B'] = $this->toPoints($bottom);
|
||||
$this->defcell['padding']['L'] = $this->toPoints($left);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the default cell border position.
|
||||
*
|
||||
* @param float $borderpos The border position to set:
|
||||
* BORDERPOS_DEFAULT
|
||||
* BORDERPOS_EXTERNAL
|
||||
* BORDERPOS_INTERNAL
|
||||
*/
|
||||
public function setDefaultCellBorderPos(float $borderpos): void
|
||||
{
|
||||
if (
|
||||
($borderpos == self::BORDERPOS_DEFAULT)
|
||||
|| ($borderpos == self::BORDERPOS_EXTERNAL)
|
||||
|| ($borderpos == self::BORDERPOS_INTERNAL)
|
||||
) {
|
||||
$this->defcell['borderpos'] = $borderpos;
|
||||
return;
|
||||
}
|
||||
|
||||
$this->defcell['borderpos'] = self::BORDERPOS_DEFAULT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Increase the cell padding to account for the border tickness.
|
||||
*
|
||||
* @param array<int|string, StyleDataOpt> $styles Optional to overwrite the styles (see: getCurrentStyleArray).
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*
|
||||
* @return TCellDef
|
||||
*/
|
||||
protected function adjustMinCellPadding(
|
||||
array $styles = [],
|
||||
?array $cell = null
|
||||
): array {
|
||||
if ($cell === null) {
|
||||
$cell = $this->defcell;
|
||||
}
|
||||
|
||||
if ($styles === []) {
|
||||
$styles = $this->graph->getCurrentStyleArray();
|
||||
}
|
||||
|
||||
$border_ratio = round(self::BORDERPOS_INTERNAL + $cell['borderpos'], 1);
|
||||
|
||||
$minT = 0;
|
||||
$minR = 0;
|
||||
$minB = 0;
|
||||
$minL = 0;
|
||||
if (! empty($styles['all']['lineWidth'])) {
|
||||
$minT = $this->toPoints((float) $styles['all']['lineWidth'] * $border_ratio);
|
||||
$minR = $minT;
|
||||
$minB = $minT;
|
||||
$minL = $minT;
|
||||
} elseif (
|
||||
(count($styles) == 4)
|
||||
&& isset($styles[0]['lineWidth'])
|
||||
&& isset($styles[1]['lineWidth'])
|
||||
&& isset($styles[2]['lineWidth'])
|
||||
&& isset($styles[3]['lineWidth'])
|
||||
) {
|
||||
$minT = $this->toPoints((float) $styles[0]['lineWidth'] * $border_ratio);
|
||||
$minR = $this->toPoints((float) $styles[1]['lineWidth'] * $border_ratio);
|
||||
$minB = $this->toPoints((float) $styles[2]['lineWidth'] * $border_ratio);
|
||||
$minL = $this->toPoints((float) $styles[3]['lineWidth'] * $border_ratio);
|
||||
} else {
|
||||
return $cell;
|
||||
}
|
||||
|
||||
$cell['padding']['T'] = max($cell['padding']['T'], $minT);
|
||||
$cell['padding']['R'] = max($cell['padding']['R'], $minR);
|
||||
$cell['padding']['B'] = max($cell['padding']['B'], $minB);
|
||||
$cell['padding']['L'] = max($cell['padding']['L'], $minL);
|
||||
return $cell;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the minimum cell height in points for the current text height.
|
||||
*
|
||||
* @param float $pheight Text height in internal points.
|
||||
* @param string $align Text vertical alignment inside the cell:
|
||||
* - T=top;
|
||||
* - C=center;
|
||||
* - B=bottom;
|
||||
* - A=center-on-font-ascent;
|
||||
* - L=center-on-font-baseline;
|
||||
* - D=center-on-font-descent.
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*/
|
||||
protected function cellMinHeight(
|
||||
float $pheight = 0,
|
||||
string $align = 'C',
|
||||
?array $cell = null
|
||||
): float {
|
||||
if ($cell === null) {
|
||||
$cell = $this->defcell;
|
||||
}
|
||||
|
||||
$curfont = $this->font->getCurrentFont();
|
||||
|
||||
if ($pheight == 0) {
|
||||
$pheight = $curfont['height'];
|
||||
}
|
||||
|
||||
return match ($align) {
|
||||
'T', 'B' => ($pheight + $cell['padding']['T'] + $cell['padding']['B']),
|
||||
'L' => ($pheight - $curfont['height'] + (2 * max(
|
||||
($cell['padding']['T'] + $curfont['ascent']),
|
||||
($cell['padding']['B'] - $curfont['descent'])
|
||||
))),
|
||||
'A', 'D' => ($pheight
|
||||
- $curfont['height']
|
||||
+ (2 * ($curfont['height'] + max($cell['padding']['T'], $cell['padding']['B'])))),
|
||||
// default on 'C' case
|
||||
default => ($pheight + (2 * max($cell['padding']['T'], $cell['padding']['B']))),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the minimum cell width in points for the current text
|
||||
*
|
||||
* @param float $txtwidth Text width in internal points.
|
||||
* @param string $align Cell horizontal alignment: L=left; C=center; R=right; J=Justify.
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*/
|
||||
protected function cellMinWidth(
|
||||
float $txtwidth,
|
||||
string $align = 'L',
|
||||
?array $cell = null
|
||||
): float {
|
||||
if ($cell === null) {
|
||||
$cell = $this->defcell;
|
||||
}
|
||||
|
||||
if ($align === '' || $align === 'J') { // Justify
|
||||
$align = $this->rtl ? 'R' : 'L';
|
||||
}
|
||||
|
||||
return match ($align) {
|
||||
'C' => ceil($txtwidth + (2 * max($cell['padding']['L'], $cell['padding']['R']))),
|
||||
default => ceil($txtwidth + $cell['padding']['L'] + $cell['padding']['R']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the adjusted cell top Y coordinate to account for margins.
|
||||
*
|
||||
* @param float $pnty Starting top Y coordinate in internal points.
|
||||
* @param float $pheight Cell height in internal points.
|
||||
* @param string $align Cell vertical alignment: T=top; C=center; B=bottom.
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*/
|
||||
protected function cellVPos(
|
||||
float $pnty,
|
||||
float $pheight,
|
||||
string $align = 'T',
|
||||
?array $cell = null
|
||||
): float {
|
||||
if ($cell === null) {
|
||||
$cell = $this->defcell;
|
||||
}
|
||||
|
||||
return match ($align) {
|
||||
'T' => $pnty - $cell['margin']['T'],
|
||||
'C' => $pnty + ($pheight / 2),
|
||||
'B' => $pnty + $cell['margin']['B'] + $pheight,
|
||||
default => $pnty,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the adjusted cell left X coordinate to account for margins.
|
||||
*
|
||||
* @param float $pntx Starting top Y coordinate in internal points.
|
||||
* @param float $pwidth Cell width in internal points.
|
||||
* @param string $align Cell horizontal alignment: L=left; C=center; R=right; J=Justify.
|
||||
* @param TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*/
|
||||
protected function cellHPos(
|
||||
float $pntx,
|
||||
float $pwidth,
|
||||
string $align = 'L',
|
||||
?array $cell = null
|
||||
): float {
|
||||
if ($cell === null) {
|
||||
$cell = $this->defcell;
|
||||
}
|
||||
|
||||
if ($align === '' || $align === 'J') { // Justify
|
||||
$align = $this->rtl ? 'R' : 'L';
|
||||
}
|
||||
|
||||
return match ($align) {
|
||||
'L' => $pntx + $cell['margin']['L'],
|
||||
'R' => $pntx - $cell['margin']['R'] - $pwidth,
|
||||
'C' => $pntx - ($pwidth / 2),
|
||||
default => $pntx,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the vertical distance between the cell top side and the text.
|
||||
*
|
||||
* @param float $cellpheight Cell height in internal points.
|
||||
* @param float $txtpheight Text height in internal points.
|
||||
* @param string $align Text vertical alignment inside the cell:
|
||||
* - T=top;
|
||||
* - C=center;
|
||||
* - B=bottom;
|
||||
* - A=center-on-font-ascent;
|
||||
* - L=center-on-font-baseline;
|
||||
* - D=center-on-font-descent.
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*/
|
||||
protected function cellTextVAlign(
|
||||
float $cellpheight,
|
||||
float $txtpheight = 0,
|
||||
string $align = 'C',
|
||||
?array $cell = null
|
||||
): float {
|
||||
if ($cell === null) {
|
||||
$cell = $this->defcell;
|
||||
}
|
||||
|
||||
$curfont = $this->font->getCurrentFont();
|
||||
|
||||
if ($txtpheight == 0) {
|
||||
$txtpheight = $curfont['height'];
|
||||
}
|
||||
|
||||
return match ($align) {
|
||||
'T' => ($cell['padding']['T']),
|
||||
'B' => (($cellpheight - $txtpheight) - $cell['padding']['B']),
|
||||
'L' => ((($cellpheight - $txtpheight + $curfont['height']) / 2) - $curfont['ascent']),
|
||||
'A' => (($cellpheight - $txtpheight + $curfont['height']) / 2),
|
||||
'D' => ((($cellpheight - $txtpheight + $curfont['height']) / 2) - $curfont['height']),
|
||||
// default on 'C' case
|
||||
default => (($cellpheight - $txtpheight) / 2)
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the horizontal distance between the cell left side and the text left side.
|
||||
*
|
||||
* @param float $pwidth Cell width in internal points.
|
||||
* @param float $txtpwidth Text width in internal points.
|
||||
* @param string $align Text horizontal alignment inside the cell: L=left; C=center; R=right; J=Justify.
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*/
|
||||
protected function cellTextHAlign(
|
||||
float $pwidth,
|
||||
float $txtpwidth,
|
||||
string $align = 'L',
|
||||
?array $cell = null
|
||||
): float {
|
||||
if ($cell === null) {
|
||||
$cell = $this->defcell;
|
||||
}
|
||||
|
||||
if ($align === '' || $align === 'J') { // Justify
|
||||
$align = $this->rtl ? 'R' : 'L';
|
||||
}
|
||||
|
||||
return match ($align) {
|
||||
'C' => (($pwidth - $txtpwidth) / 2),
|
||||
'R' => ($pwidth - $cell['padding']['R'] - $txtpwidth),
|
||||
// default on 'L' case
|
||||
default => ($cell['padding']['L']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the top Y coordinate of the cell wrapping the text.
|
||||
*
|
||||
* @param float $txty Text baseline top Y coordinate in internal points.
|
||||
* @param float $cellpheight Cell height in internal points.
|
||||
* @param float $txtpheight Text height in internal points.
|
||||
* @param string $align Text vertical alignment inside the cell:
|
||||
* - T=top;
|
||||
* - C=center;
|
||||
* - B=bottom;
|
||||
* - A=center-on-font-ascent;
|
||||
* - L=center-on-font-baseline;
|
||||
* - D=center-on-font-descent.
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*/
|
||||
protected function cellVPosFromText(
|
||||
float $txty,
|
||||
float $cellpheight,
|
||||
float $txtpheight = 0,
|
||||
string $align = 'C',
|
||||
?array $cell = null
|
||||
): float {
|
||||
return ($txty + $this->cellTextVAlign($cellpheight, $txtpheight, $align, $cell));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the left X coordinate of the cell wrapping the text.
|
||||
*
|
||||
* @param float $txtx Text left X coordinate in internal points.
|
||||
* @param float $pwidth Cell width in internal points.
|
||||
* @param float $txtpwidth Text width in internal points.
|
||||
* @param string $align Text horizontal alignment inside the cell: L=left; C=center; R=right.
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*/
|
||||
protected function cellHPosFromText(
|
||||
float $txtx,
|
||||
float $pwidth,
|
||||
float $txtpwidth,
|
||||
string $align = 'L',
|
||||
?array $cell = null
|
||||
): float {
|
||||
return ($txtx - $this->cellTextHAlign($pwidth, $txtpwidth, $align, $cell));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the top Y coordinate of the text inside the cell.
|
||||
*
|
||||
* @param float $pnty Cell top Y coordinate in internal points.
|
||||
* @param float $cellpheight Cell height in internal points.
|
||||
* @param float $txtpheight Text height in internal points.
|
||||
* @param string $align Text vertical alignment inside the cell:
|
||||
* - T=top;
|
||||
* - C=center;
|
||||
* - B=bottom;
|
||||
* - A=center-on-font-ascent;
|
||||
* - L=center-on-font-baseline;
|
||||
* - D=center-on-font-descent.
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*/
|
||||
protected function textVPosFromCell(
|
||||
float $pnty,
|
||||
float $cellpheight,
|
||||
float $txtpheight = 0,
|
||||
string $align = 'C',
|
||||
?array $cell = null
|
||||
): float {
|
||||
return ($pnty - $this->cellTextVAlign($cellpheight, $txtpheight, $align, $cell));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the left X coordinate of the text inside the cell.
|
||||
*
|
||||
* @param float $pntx Cell left X coordinate in internal points.
|
||||
* @param float $pwidth Cell width in internal points.
|
||||
* @param float $txtpwidth Text width in internal points.
|
||||
* @param string $align Text horizontal alignment inside the cell: L=left; C=center; R=right.
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*/
|
||||
protected function textHPosFromCell(
|
||||
float $pntx,
|
||||
float $pwidth,
|
||||
float $txtpwidth,
|
||||
string $align = 'L',
|
||||
?array $cell = null
|
||||
): float {
|
||||
return ($pntx + $this->cellTextHAlign($pwidth, $txtpwidth, $align, $cell));
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the maximum width available for a cell that fits the current region width.
|
||||
*
|
||||
* @param float $pntx Cell left X coordinate in internal points.
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
protected function cellMaxWidth(
|
||||
float $pntx = 0,
|
||||
?array $cell = null
|
||||
): float {
|
||||
if ($cell === null) {
|
||||
$cell = $this->defcell;
|
||||
}
|
||||
|
||||
$region = $this->page->getRegion();
|
||||
return ($this->toPoints($region['RW']) - $pntx - $cell['margin']['L'] - $cell['margin']['R']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the maximum width available for text within a cell.
|
||||
*
|
||||
* @param float $pwidth Cell width in internal points.
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*
|
||||
* @return float The maximum width available for text within the cell.
|
||||
*/
|
||||
protected function textMaxWidth(
|
||||
float $pwidth,
|
||||
?array $cell = null
|
||||
): float {
|
||||
if ($cell === null) {
|
||||
$cell = $this->defcell;
|
||||
}
|
||||
|
||||
return ($pwidth - $cell['padding']['L'] - $cell['padding']['R']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the maximum height available for text within a cell.
|
||||
*
|
||||
* @param float $pheight Available vertical space in internal points.
|
||||
* @param string $align Text vertical alignment inside the cell:
|
||||
* - T=top;
|
||||
* - C=center;
|
||||
* - B=bottom;
|
||||
* - A=center-on-font-ascent;
|
||||
* - L=center-on-font-baseline;
|
||||
* - D=center-on-font-descent.
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*
|
||||
* @return float The maximum width available for text within the cell.
|
||||
*/
|
||||
protected function textMaxHeight(
|
||||
float $pheight,
|
||||
string $align = 'T',
|
||||
?array $cell = null
|
||||
): float {
|
||||
if ($cell === null) {
|
||||
$cell = $this->defcell;
|
||||
}
|
||||
|
||||
$curfont = $this->font->getCurrentFont();
|
||||
$cph = ($pheight - $cell['margin']['T'] - $cell['margin']['B']);
|
||||
|
||||
// Use a match expression to determine the maximum text height based on alignment.
|
||||
return match ($align) {
|
||||
// Top or Bottom
|
||||
'T', 'B' => ($cph - $cell['padding']['T'] - $cell['padding']['B']),
|
||||
// Center on font Baseline
|
||||
'L' => ($cph + $curfont['height'] - (2 * max(
|
||||
($cell['padding']['T'] + $curfont['ascent']),
|
||||
($cell['padding']['B'] - $curfont['descent'])
|
||||
))),
|
||||
// Center on font Ascent or Descent
|
||||
'A', 'D' => ($cph
|
||||
+ $curfont['height']
|
||||
- (2 * ($curfont['height'] + max($cell['padding']['T'], $cell['padding']['B'])))),
|
||||
// Default to Center 'C' case
|
||||
default => ($cph - (2 * max($cell['padding']['T'], $cell['padding']['B']))),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the PDF code to draw the text cell border and background.
|
||||
*
|
||||
* @param float $pntx Cell left X coordinate in internal points.
|
||||
* @param float $pnty Cell top Y coordinate in internal points.
|
||||
* @param float $pwidth Cell width in internal points.
|
||||
* @param float $pheight Cell height in internal points.
|
||||
* @param array<int|string, StyleDataOpt> $styles Optional to overwrite the styles (see: getCurrentStyleArray).
|
||||
* @param ?TCellDef $cell Optional to overwrite cell parameters for padding, margin etc.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function drawCell(
|
||||
float $pntx,
|
||||
float $pnty,
|
||||
float $pwidth,
|
||||
float $pheight,
|
||||
array $styles = [],
|
||||
?array $cell = null
|
||||
) {
|
||||
|
||||
$drawfill = (!empty($styles['all']['fillColor']));
|
||||
$drawborder = (
|
||||
!empty($styles['all']['lineWidth'])
|
||||
|| !empty($styles[0]['lineWidth'])
|
||||
|| !empty($styles[1]['lineWidth'])
|
||||
|| !empty($styles[2]['lineWidth'])
|
||||
|| !empty($styles[3]['lineWidth'])
|
||||
);
|
||||
|
||||
if (!$drawfill && !$drawborder) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($cell === null) {
|
||||
$cell = $this->defcell;
|
||||
}
|
||||
|
||||
$styleall = (empty($styles['all']) ? [] : $styles['all']);
|
||||
|
||||
$out = $this->graph->getStartTransform();
|
||||
$stoptr = $this->graph->getStopTransform();
|
||||
|
||||
if (
|
||||
$drawfill
|
||||
&& $drawborder
|
||||
&& ($cell['borderpos'] == self::BORDERPOS_DEFAULT)
|
||||
&& (count($styles) <= 1)
|
||||
) {
|
||||
// single default border style for all sides
|
||||
$out .= $this->graph->getBasicRect(
|
||||
$this->toUnit($pntx),
|
||||
$this->toYUnit($pnty),
|
||||
$this->toUnit($pwidth),
|
||||
$this->toUnit($pheight),
|
||||
'b', // close, fill, and then stroke the path
|
||||
$styleall,
|
||||
);
|
||||
|
||||
return $out . $stoptr;
|
||||
}
|
||||
|
||||
if ($drawfill) {
|
||||
$out .= $this->graph->getBasicRect(
|
||||
$this->toUnit($pntx),
|
||||
$this->toYUnit($pnty),
|
||||
$this->toUnit($pwidth),
|
||||
$this->toUnit($pheight),
|
||||
'f', // fill the path
|
||||
$styleall,
|
||||
);
|
||||
}
|
||||
|
||||
if (!$drawborder) {
|
||||
return $out . $stoptr;
|
||||
}
|
||||
|
||||
$adj = (isset($styles['all']['lineWidth'])
|
||||
? $this->toPoints((float) $styles['all']['lineWidth'] * $cell['borderpos'])
|
||||
: 0);
|
||||
$adjx = (isset($styles['3']['lineWidth'])
|
||||
? $this->toPoints((float) $styles['3']['lineWidth'] * $cell['borderpos'])
|
||||
: $adj);
|
||||
$adjy = isset($styles['0']['lineWidth'])
|
||||
? $this->toPoints((float) $styles['0']['lineWidth'] * $cell['borderpos'])
|
||||
: $adj;
|
||||
$adjw = $adjx + (isset($styles['1']['lineWidth'])
|
||||
? $this->toPoints((float) $styles['1']['lineWidth'] * $cell['borderpos'])
|
||||
: $adj);
|
||||
$adjh = $adjy + (isset($styles['2']['lineWidth'])
|
||||
? $this->toPoints((float) $styles['2']['lineWidth'] * $cell['borderpos'])
|
||||
: $adj);
|
||||
|
||||
// different border styles for each side
|
||||
$out .= $this->graph->getRect(
|
||||
$this->toUnit($pntx + $adjx),
|
||||
$this->toYUnit($pnty - $adjy),
|
||||
$this->toUnit($pwidth - $adjw),
|
||||
$this->toUnit($pheight - $adjh),
|
||||
's', // close and stroke the path
|
||||
$styles,
|
||||
);
|
||||
|
||||
return $out . $stoptr;
|
||||
}
|
||||
}
|
||||
105
vendor/tecnickcom/tc-lib-pdf/src/ClassObjects.php
vendored
Normal file
105
vendor/tecnickcom/tc-lib-pdf/src/ClassObjects.php
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ClassObjects.php
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* This file is part of tc-lib-pdf software library.
|
||||
*/
|
||||
|
||||
namespace Com\Tecnick\Pdf;
|
||||
|
||||
use Com\Tecnick\Barcode\Barcode as ObjBarcode;
|
||||
use Com\Tecnick\Color\Pdf as ObjColor;
|
||||
use Com\Tecnick\File\Cache as ObjCache;
|
||||
use Com\Tecnick\File\File as ObjFile;
|
||||
use Com\Tecnick\Pdf\Encrypt\Encrypt as ObjEncrypt;
|
||||
use Com\Tecnick\Pdf\Font\Stack as ObjFont;
|
||||
use Com\Tecnick\Pdf\Graph\Draw as ObjGraph;
|
||||
use Com\Tecnick\Pdf\Image\Import as ObjImage;
|
||||
use Com\Tecnick\Pdf\Page\Page as ObjPage;
|
||||
use Com\Tecnick\Unicode\Convert as ObjUniConvert;
|
||||
|
||||
/**
|
||||
* Com\Tecnick\Pdf\ClassObjects
|
||||
*
|
||||
* External class objects PDF class
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* @SuppressWarnings("PHPMD.DepthOfInheritance")
|
||||
*/
|
||||
abstract class ClassObjects extends \Com\Tecnick\Pdf\Output
|
||||
{
|
||||
/**
|
||||
* Initialize dependencies class objects.
|
||||
*
|
||||
* @param ?ObjEncrypt $objEncrypt Encryption object.
|
||||
*/
|
||||
public function initClassObjects(
|
||||
?ObjEncrypt $objEncrypt = null
|
||||
): void {
|
||||
if ($objEncrypt instanceof ObjEncrypt) {
|
||||
$this->encrypt = $objEncrypt;
|
||||
} else {
|
||||
$this->encrypt = new ObjEncrypt();
|
||||
}
|
||||
|
||||
$this->color = new ObjColor();
|
||||
$this->barcode = new ObjBarcode();
|
||||
$this->file = new ObjFile();
|
||||
$this->cache = new ObjCache();
|
||||
$this->uniconv = new ObjUniConvert();
|
||||
|
||||
$pdfamode = (bool) ($this->pdfa > 0);
|
||||
|
||||
$this->page = new ObjPage(
|
||||
$this->unit,
|
||||
$this->color,
|
||||
$this->encrypt,
|
||||
$pdfamode,
|
||||
$this->compress,
|
||||
$this->sigapp,
|
||||
);
|
||||
|
||||
$this->kunit = $this->page->getKUnit();
|
||||
$this->svgminunitlen = $this->toUnit($this::SVGMINPNTLEN);
|
||||
|
||||
$this->graph = new ObjGraph(
|
||||
$this->kunit,
|
||||
0, // $this->graph->setPageWidth($pagew)
|
||||
0, // $this->graph->setPageHeight($pageh)
|
||||
$this->color,
|
||||
$this->encrypt,
|
||||
$pdfamode,
|
||||
$this->compress,
|
||||
);
|
||||
|
||||
$this->font = new ObjFont(
|
||||
$this->kunit,
|
||||
$this->subsetfont,
|
||||
$this->isunicode,
|
||||
$pdfamode,
|
||||
);
|
||||
|
||||
$this->image = new ObjImage(
|
||||
$this->kunit,
|
||||
$this->encrypt,
|
||||
$pdfamode,
|
||||
$this->compress,
|
||||
);
|
||||
}
|
||||
}
|
||||
34
vendor/tecnickcom/tc-lib-pdf/src/Exception.php
vendored
Normal file
34
vendor/tecnickcom/tc-lib-pdf/src/Exception.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Exception.php
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package PDF
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* This file is part of tc-lib-pdf software library.
|
||||
*/
|
||||
|
||||
namespace Com\Tecnick\Pdf;
|
||||
|
||||
/**
|
||||
* Com\Tecnick\Pdf\Exception
|
||||
*
|
||||
* Custom Exception class
|
||||
*
|
||||
* @since 2015-02-21
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*/
|
||||
class Exception extends \Exception
|
||||
{
|
||||
}
|
||||
36
vendor/tecnickcom/tc-lib-pdf/src/HTML.php
vendored
Normal file
36
vendor/tecnickcom/tc-lib-pdf/src/HTML.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* HTML.php
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* This file is part of tc-lib-pdf software library.
|
||||
*/
|
||||
|
||||
namespace Com\Tecnick\Pdf;
|
||||
|
||||
use Com\Tecnick\Pdf\Exception as PdfException;
|
||||
|
||||
/**
|
||||
* Com\Tecnick\Pdf\HTML
|
||||
*
|
||||
* HTML PDF class
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*/
|
||||
abstract class HTML extends \Com\Tecnick\Pdf\CSS
|
||||
{
|
||||
}
|
||||
38
vendor/tecnickcom/tc-lib-pdf/src/JavaScript.php
vendored
Normal file
38
vendor/tecnickcom/tc-lib-pdf/src/JavaScript.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* JavaScript.php
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* This file is part of tc-lib-pdf software library.
|
||||
*/
|
||||
|
||||
namespace Com\Tecnick\Pdf;
|
||||
|
||||
use Com\Tecnick\Pdf\Exception as PdfException;
|
||||
|
||||
/**
|
||||
* Com\Tecnick\Pdf\JavaScript
|
||||
*
|
||||
* JavaScript PDF class
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* @SuppressWarnings("PHPMD.DepthOfInheritance")
|
||||
*/
|
||||
abstract class JavaScript extends \Com\Tecnick\Pdf\HTML
|
||||
{
|
||||
}
|
||||
593
vendor/tecnickcom/tc-lib-pdf/src/MetaInfo.php
vendored
Normal file
593
vendor/tecnickcom/tc-lib-pdf/src/MetaInfo.php
vendored
Normal file
@@ -0,0 +1,593 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MetaInfo.php
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* This file is part of tc-lib-pdf software library.
|
||||
*/
|
||||
|
||||
namespace Com\Tecnick\Pdf;
|
||||
|
||||
use Com\Tecnick\Pdf\Exception as PdfException;
|
||||
|
||||
/**
|
||||
* Com\Tecnick\Pdf\MetaInfo
|
||||
*
|
||||
* Meta Informaton PDF class
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* @phpstan-import-type TViewerPref from Base
|
||||
*
|
||||
* @SuppressWarnings("PHPMD.DepthOfInheritance")
|
||||
*/
|
||||
abstract class MetaInfo extends \Com\Tecnick\Pdf\JavaScript
|
||||
{
|
||||
/**
|
||||
* Valid document zoom modes
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected const VALIDZOOM = ['fullpage', 'fullwidth', 'real', 'default'];
|
||||
|
||||
/**
|
||||
* Return the program version.
|
||||
*/
|
||||
public function getVersion(): string
|
||||
{
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a field value only if it is not empty.
|
||||
*
|
||||
* @param string $field Field name
|
||||
* @param string $value Value to set
|
||||
*/
|
||||
private function setNonEmptyFieldValue(string $field, string $value): static
|
||||
{
|
||||
if ($value !== '') {
|
||||
$this->$field = $value;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of an existing array key if it is not empty.
|
||||
*
|
||||
* @param string $field Field array name
|
||||
* @param string $key Key name
|
||||
* @param string $value Value to set
|
||||
*/
|
||||
private function setNonEmptyArrayFieldValue(string $field, string $key, string $value): static
|
||||
{
|
||||
if (
|
||||
isset($this->$field)
|
||||
&& is_array($this->$field)
|
||||
&& ($key !== '')
|
||||
&& isset($this->$field[$key])
|
||||
&& ($value !== '')
|
||||
) {
|
||||
$this->$field[$key] = $value;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the creator of the document.
|
||||
* This is typically the name of the application that generates the PDF.
|
||||
*
|
||||
* @param string $creator The name of the creator.
|
||||
*/
|
||||
public function setCreator(string $creator): static
|
||||
{
|
||||
return $this->setNonEmptyFieldValue('creator', $creator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the author of the document.
|
||||
*
|
||||
* @param string $author The name of the author.
|
||||
*/
|
||||
public function setAuthor(string $author): static
|
||||
{
|
||||
return $this->setNonEmptyFieldValue('author', $author);
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the subject of the document.
|
||||
*
|
||||
* @param string $subject The subject.
|
||||
*/
|
||||
public function setSubject(string $subject): static
|
||||
{
|
||||
return $this->setNonEmptyFieldValue('subject', $subject);
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the title of the document.
|
||||
*
|
||||
* @param string $title The title.
|
||||
*/
|
||||
public function setTitle(string $title): static
|
||||
{
|
||||
return $this->setNonEmptyFieldValue('title', $title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'.
|
||||
*
|
||||
* @param string $keywords Space-separated list of keywords.
|
||||
*/
|
||||
public function setKeywords(string $keywords): static
|
||||
{
|
||||
return $this->setNonEmptyFieldValue('keywords', $keywords);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the PDF version (check PDF reference for valid values).
|
||||
*
|
||||
* @param string $version PDF document version.
|
||||
*
|
||||
* @throw PdfException in case of error.
|
||||
*/
|
||||
public function setPDFVersion(string $version = '1.7'): static
|
||||
{
|
||||
if ($this->pdfa == 1) { // PDF/A 1 mode
|
||||
$this->pdfver = '1.4';
|
||||
return $this;
|
||||
}
|
||||
|
||||
$isvalid = preg_match('/^[1-9]+[.]\d+$/', $version);
|
||||
if ($isvalid === false) {
|
||||
throw new PdfException('Invalid PDF version format');
|
||||
}
|
||||
|
||||
$this->pdfver = $version;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the sRGB mode
|
||||
*
|
||||
* @param bool $enabled Set to true to add the default sRGB ICC color profile
|
||||
*/
|
||||
public function setSRGB(bool $enabled): static
|
||||
{
|
||||
$this->sRGB = $enabled;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format a text string for output.
|
||||
*
|
||||
* @param string $str String to escape.
|
||||
* @param int $oid Current PDF object number.
|
||||
* @param bool $bom If true set the Byte Order Mark (BOM).
|
||||
*
|
||||
* @return string escaped string.
|
||||
*/
|
||||
protected function getOutTextString(
|
||||
string $str,
|
||||
int $oid,
|
||||
bool $bom = false
|
||||
): string {
|
||||
if ($this->isunicode) {
|
||||
$str = $this->uniconv->toUTF16BE($str);
|
||||
if ($bom) {
|
||||
$str = "\xFE\xFF" . $str; // Byte Order Mark (BOM)
|
||||
}
|
||||
}
|
||||
|
||||
return $this->encrypt->escapeDataString($str, $oid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a formatted date for meta information
|
||||
*
|
||||
* @param int $time Time in seconds.
|
||||
*
|
||||
* @return string date-time string.
|
||||
*/
|
||||
protected function getFormattedDate(int $time): string
|
||||
{
|
||||
return substr_replace(date('YmdHisO', $time), "'", (-2), 0) . "'";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a formatted date for XMP meta information
|
||||
*
|
||||
* @param int $time Time in seconds.
|
||||
*
|
||||
* @return string date-time string.
|
||||
*/
|
||||
protected function getXMPFormattedDate(int $time): string
|
||||
{
|
||||
return date('Y-m-dTH:i:sP', $time);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the producer string
|
||||
*/
|
||||
protected function getProducer(): string
|
||||
{
|
||||
return "\x54\x43\x50\x44\x46\x20"
|
||||
. $this->version
|
||||
. "\x20\x28\x68\x74\x74\x70\x73\x3a\x2f\x2f"
|
||||
. "\x74\x63\x70\x64\x66\x2e\x6f\x72\x67\x29";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a formatted date for meta information
|
||||
*
|
||||
* @param int $time Time in seconds.
|
||||
* @param int $oid Current PDF object number.
|
||||
*
|
||||
* @return string escaped date-time string.
|
||||
*/
|
||||
protected function getOutDateTimeString(int $time, int $oid): string
|
||||
{
|
||||
if ($time === 0) {
|
||||
$time = $this->doctime;
|
||||
}
|
||||
|
||||
return $this->encrypt->escapeDataString('D:' . $this->getFormattedDate($time), $oid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the PDF output string for the Document Information Dictionary.
|
||||
* (ref. Chapter 14.3.3 Document Information Dictionary of PDF32000_2008.pdf)
|
||||
*/
|
||||
protected function getOutMetaInfo(): string
|
||||
{
|
||||
$oid = ++$this->pon;
|
||||
$this->objid['info'] = $oid;
|
||||
return $oid . ' 0 obj' . "\n"
|
||||
. '<<'
|
||||
. ' /Creator ' . $this->getOutTextString($this->creator, $oid, true)
|
||||
. ' /Author ' . $this->getOutTextString($this->author, $oid, true)
|
||||
. ' /Subject ' . $this->getOutTextString($this->subject, $oid, true)
|
||||
. ' /Title ' . $this->getOutTextString($this->title, $oid, true)
|
||||
. ' /Keywords ' . $this->getOutTextString($this->keywords, $oid, true)
|
||||
. ' /Producer ' . $this->getOutTextString($this->getProducer(), $oid, true)
|
||||
. ' /CreationDate ' . $this->getOutDateTimeString($this->doctime, $oid)
|
||||
. ' /ModDate ' . $this->getOutDateTimeString($this->docmodtime, $oid)
|
||||
. ' /Trapped /False'
|
||||
. ' >>' . "\n"
|
||||
. 'endobj' . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape some special characters (< > &) for XML output.
|
||||
*
|
||||
* @param string $str Input string to escape.
|
||||
*/
|
||||
protected function getEscapedXML(string $str): string
|
||||
{
|
||||
return strtr($str, [
|
||||
"\0" => '',
|
||||
'&' => '&',
|
||||
'<' => '<',
|
||||
'>' => '>',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set additional custom XMP data to be appended just before the end of the tag indicated by the key.
|
||||
*
|
||||
* IMPORTANT:
|
||||
* This data is added as-is without controls, so you have to validate your data before using this method.
|
||||
*
|
||||
* @param string $key Key for the custom XMP data. Valid keys are:
|
||||
* - 'x:xmpmeta'
|
||||
* - 'x:xmpmeta.rdf:RDF'
|
||||
* - 'x:xmpmeta.rdf:RDF.rdf:Description'
|
||||
* - 'x:xmpmeta.rdf:RDF.rdf:Description.pdfaExtension:schemas'
|
||||
* - 'x:xmpmeta.rdf:RDF.rdf:Description.pdfaExtension:schemas.rdf:Bag'
|
||||
* @param string $xmp Custom XMP data.
|
||||
*/
|
||||
public function setCustomXMP(string $key, string $xmp): static
|
||||
{
|
||||
return $this->setNonEmptyArrayFieldValue('custom_xmp', $key, $xmp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the PDF output string for the XMP data object
|
||||
*
|
||||
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
|
||||
*/
|
||||
protected function getOutXMP(): string
|
||||
{
|
||||
$uuid = 'uuid:' . substr($this->fileid, 0, 8)
|
||||
. '-' . substr($this->fileid, 8, 4)
|
||||
. '-' . substr($this->fileid, 12, 4)
|
||||
. '-' . substr($this->fileid, 16, 4)
|
||||
. '-' . substr($this->fileid, 20, 12);
|
||||
|
||||
// @codingStandardsIgnoreStart
|
||||
$xmp = '<?xpacket begin="' . $this->uniconv->chr(0xfeff) . '" id="W5M0MpCehiHzreSzNTczkc9d"?>' . "\n"
|
||||
. '<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:08:04">' . "\n"
|
||||
. "\t" . '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">' . "\n"
|
||||
. "\t\t" . '<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/">' . "\n"
|
||||
. "\t\t\t" . '<dc:format>application/pdf</dc:format>' . "\n"
|
||||
. "\t\t\t" . '<dc:title>' . "\n"
|
||||
. "\t\t\t\t" . '<rdf:Alt>' . "\n"
|
||||
. "\t\t\t\t\t" . '<rdf:li xml:lang="x-default">' . $this->getEscapedXML($this->title) . '</rdf:li>' . "\n"
|
||||
. "\t\t\t\t" . '</rdf:Alt>' . "\n"
|
||||
. "\t\t\t" . '</dc:title>' . "\n"
|
||||
. "\t\t\t" . '<dc:creator>' . "\n"
|
||||
. "\t\t\t\t" . '<rdf:Seq>' . "\n"
|
||||
. "\t\t\t\t\t" . '<rdf:li>' . $this->getEscapedXML($this->author) . '</rdf:li>' . "\n"
|
||||
. "\t\t\t\t" . '</rdf:Seq>' . "\n"
|
||||
. "\t\t\t" . '</dc:creator>' . "\n"
|
||||
. "\t\t\t" . '<dc:description>' . "\n"
|
||||
. "\t\t\t\t" . '<rdf:Alt>' . "\n"
|
||||
. "\t\t\t\t\t" . '<rdf:li xml:lang="x-default">' . $this->getEscapedXML($this->subject) . '</rdf:li>' . "\n"
|
||||
. "\t\t\t\t" . '</rdf:Alt>' . "\n"
|
||||
. "\t\t\t" . '</dc:description>' . "\n"
|
||||
. "\t\t\t" . '<dc:subject>' . "\n"
|
||||
. "\t\t\t\t" . '<rdf:Bag>' . "\n"
|
||||
. "\t\t\t\t\t" . '<rdf:li>' . $this->getEscapedXML($this->keywords) . '</rdf:li>' . "\n"
|
||||
. "\t\t\t\t" . '</rdf:Bag>' . "\n"
|
||||
. "\t\t\t" . '</dc:subject>' . "\n"
|
||||
. "\t\t" . '</rdf:Description>' . "\n"
|
||||
. "\t\t" . '<rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/">' . "\n"
|
||||
. "\t\t\t" . '<xmp:CreateDate>' . $this->getXMPFormattedDate($this->doctime) . '</xmp:CreateDate>' . "\n"
|
||||
. "\t\t\t" . '<xmp:CreatorTool>' . $this->getEscapedXML($this->creator) . '</xmp:CreatorTool>' . "\n"
|
||||
. "\t\t\t" . '<xmp:ModifyDate>' . $this->getXMPFormattedDate($this->docmodtime) . '</xmp:ModifyDate>' . "\n"
|
||||
. "\t\t\t" . '<xmp:MetadataDate>' . $this->getXMPFormattedDate($this->doctime) . '</xmp:MetadataDate>' . "\n"
|
||||
. "\t\t" . '</rdf:Description>' . "\n"
|
||||
. "\t\t" . '<rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/">' . "\n"
|
||||
. "\t\t\t" . '<pdf:Keywords>' . $this->getEscapedXML($this->keywords) . '</pdf:Keywords>' . "\n"
|
||||
. "\t\t\t" . '<pdf:Producer>' . $this->getEscapedXML($this->getProducer()) . '</pdf:Producer>' . "\n"
|
||||
. "\t\t" . '</rdf:Description>' . "\n"
|
||||
. "\t\t" . '<rdf:Description rdf:about="" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">' . "\n"
|
||||
. "\t\t\t" . '<xmpMM:DocumentID>' . $uuid . '</xmpMM:DocumentID>' . "\n"
|
||||
. "\t\t\t" . '<xmpMM:InstanceID>' . $uuid . '</xmpMM:InstanceID>' . "\n"
|
||||
. "\t\t" . '</rdf:Description>' . "\n";
|
||||
|
||||
if ($this->pdfa !== 0) {
|
||||
$xmp .= ' <rdf:Description rdf:about="" xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/">' . "\n"
|
||||
. "\t\t\t" . '<pdfaid:part>' . $this->pdfa . '</pdfaid:part>' . "\n"
|
||||
. "\t\t\t" . '<pdfaid:conformance>B</pdfaid:conformance>' . "\n"
|
||||
. "\t\t" . '</rdf:Description>' . "\n";
|
||||
}
|
||||
|
||||
// XMP extension schemas
|
||||
$xmp .= "\t\t" . '<rdf:Description rdf:about="" xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#">' . "\n"
|
||||
. "\t\t\t" . '<pdfaExtension:schemas>' . "\n"
|
||||
. "\t\t\t\t" . '<rdf:Bag>' . "\n"
|
||||
. "\t\t\t\t\t" . '<rdf:li rdf:parseType="Resource">' . "\n"
|
||||
. "\t\t\t\t\t\t" . '<pdfaSchema:namespaceURI>http://ns.adobe.com/pdf/1.3/</pdfaSchema:namespaceURI>' . "\n"
|
||||
. "\t\t\t\t\t\t" . '<pdfaSchema:prefix>pdf</pdfaSchema:prefix>' . "\n"
|
||||
. "\t\t\t\t\t\t" . '<pdfaSchema:schema>Adobe PDF Schema</pdfaSchema:schema>' . "\n"
|
||||
. "\t\t\t\t\t" . '</rdf:li>' . "\n"
|
||||
. "\t\t\t\t\t" . '<rdf:li rdf:parseType="Resource">' . "\n"
|
||||
. "\t\t\t\t\t\t" . '<pdfaSchema:namespaceURI>http://ns.adobe.com/xap/1.0/mm/</pdfaSchema:namespaceURI>' . "\n"
|
||||
. "\t\t\t\t\t\t" . '<pdfaSchema:prefix>xmpMM</pdfaSchema:prefix>' . "\n"
|
||||
. "\t\t\t\t\t\t" . '<pdfaSchema:schema>XMP Media Management Schema</pdfaSchema:schema>' . "\n"
|
||||
. "\t\t\t\t\t\t" . '<pdfaSchema:property>' . "\n"
|
||||
. "\t\t\t\t\t\t\t" . '<rdf:Seq>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t" . '<rdf:li rdf:parseType="Resource">' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:category>internal</pdfaProperty:category>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:description>UUID based identifier for specific incarnation of a document</pdfaProperty:description>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:name>InstanceID</pdfaProperty:name>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:valueType>URI</pdfaProperty:valueType>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t" . '</rdf:li>' . "\n"
|
||||
. "\t\t\t\t\t\t\t" . '</rdf:Seq>' . "\n"
|
||||
. "\t\t\t\t\t\t" . '</pdfaSchema:property>' . "\n"
|
||||
. "\t\t\t\t\t" . '</rdf:li>' . "\n"
|
||||
. "\t\t\t\t\t" . '<rdf:li rdf:parseType="Resource">' . "\n"
|
||||
. "\t\t\t\t\t\t" . '<pdfaSchema:namespaceURI>http://www.aiim.org/pdfa/ns/id/</pdfaSchema:namespaceURI>' . "\n"
|
||||
. "\t\t\t\t\t\t" . '<pdfaSchema:prefix>pdfaid</pdfaSchema:prefix>' . "\n"
|
||||
. "\t\t\t\t\t\t" . '<pdfaSchema:schema>PDF/A ID Schema</pdfaSchema:schema>' . "\n"
|
||||
. "\t\t\t\t\t\t" . '<pdfaSchema:property>' . "\n"
|
||||
. "\t\t\t\t\t\t\t" . '<rdf:Seq>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t" . '<rdf:li rdf:parseType="Resource">' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:category>internal</pdfaProperty:category>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:description>Part of PDF/A standard</pdfaProperty:description>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:name>part</pdfaProperty:name>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:valueType>Integer</pdfaProperty:valueType>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t" . '</rdf:li>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t" . '<rdf:li rdf:parseType="Resource">' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:category>internal</pdfaProperty:category>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:description>Amendment of PDF/A standard</pdfaProperty:description>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:name>amd</pdfaProperty:name>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:valueType>Text</pdfaProperty:valueType>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t" . '</rdf:li>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t" . '<rdf:li rdf:parseType="Resource">' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:category>internal</pdfaProperty:category>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:description>Conformance level of PDF/A standard</pdfaProperty:description>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:name>conformance</pdfaProperty:name>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t\t" . '<pdfaProperty:valueType>Text</pdfaProperty:valueType>' . "\n"
|
||||
. "\t\t\t\t\t\t\t\t" . '</rdf:li>' . "\n"
|
||||
. "\t\t\t\t\t\t\t" . '</rdf:Seq>' . "\n"
|
||||
. "\t\t\t\t\t\t" . '</pdfaSchema:property>' . "\n"
|
||||
. "\t\t\t\t\t" . '</rdf:li>' . "\n"
|
||||
. $this->custom_xmp['x:xmpmeta.rdf:RDF.rdf:Description.pdfaExtension:schemas.rdf:Bag'] . "\n"
|
||||
. "\t\t\t\t" . '</rdf:Bag>' . "\n"
|
||||
. $this->custom_xmp['x:xmpmeta.rdf:RDF.rdf:Description.pdfaExtension:schemas'] . "\n"
|
||||
. "\t\t\t" . '</pdfaExtension:schemas>' . "\n"
|
||||
. $this->custom_xmp['x:xmpmeta.rdf:RDF.rdf:Description'] . "\n"
|
||||
. "\t\t" . '</rdf:Description>' . "\n"
|
||||
. $this->custom_xmp['x:xmpmeta.rdf:RDF'] . "\n"
|
||||
. "\t" . '</rdf:RDF>' . "\n"
|
||||
. $this->custom_xmp['x:xmpmeta'] . "\n"
|
||||
. '</x:xmpmeta>' . "\n"
|
||||
. '<?xpacket end="w"?>';
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
$oid = ++$this->pon;
|
||||
$this->objid['xmp'] = $oid;
|
||||
|
||||
return $oid . ' 0 obj' . "\n"
|
||||
. '<<'
|
||||
. ' /Type /Metadata'
|
||||
. ' /Subtype /XML'
|
||||
. ' /Length ' . strlen($xmp)
|
||||
. ' >> stream' . "\n"
|
||||
. $xmp . "\n"
|
||||
. 'endstream' . "\n"
|
||||
. 'endobj' . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default document language direction.
|
||||
*
|
||||
* @param bool $enabled False = LTR = Left-To-Right; True = RTL = Right-To-Left.
|
||||
*/
|
||||
public function setRTL(bool $enabled): static
|
||||
{
|
||||
$this->rtl = $enabled;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the viewer preferences dictionary
|
||||
* controlling the way the document is to be presented on the screen or in print.
|
||||
*
|
||||
* @param TViewerPref $pref Array of options (see PDF reference "Viewer Preferences").
|
||||
*/
|
||||
public function setViewerPreferences(array $pref): static
|
||||
{
|
||||
$this->viewerpref = $pref;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize the page box name and return the default 'CropBox' in case of error.
|
||||
*
|
||||
* @param string $name Entry name.
|
||||
*/
|
||||
protected function getPageBoxName(string $name): string
|
||||
{
|
||||
$box = 'CropBox';
|
||||
if (isset($this->viewerpref[$name])) {
|
||||
$val = $this->viewerpref[$name];
|
||||
if (
|
||||
isset($this->page->$box[$val]) // @phpstan-ignore offsetAccess.nonOffsetAccessible
|
||||
&& is_string($this->page->$box[$val])
|
||||
) {
|
||||
$box = $this->page->$box[$val];
|
||||
}
|
||||
}
|
||||
|
||||
return ' /' . $name . ' /' . $box;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize the page box name and return the default 'CropBox' in case of error.
|
||||
*/
|
||||
protected function getPagePrintScaling(): string
|
||||
{
|
||||
$mode = 'AppDefault';
|
||||
if (isset($this->viewerpref['PrintScaling'])) {
|
||||
$name = strtolower($this->viewerpref['PrintScaling']);
|
||||
$valid = [
|
||||
'none' => 'None',
|
||||
'appdefault' => 'AppDefault',
|
||||
];
|
||||
if (isset($valid[$name])) {
|
||||
$mode = $valid[$name];
|
||||
}
|
||||
}
|
||||
|
||||
return ' /PrintScaling /' . $mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Duplex mode for the Viewer Preferences
|
||||
*/
|
||||
protected function getDuplexMode(): string
|
||||
{
|
||||
if (isset($this->viewerpref['Duplex'])) {
|
||||
$name = strtolower($this->viewerpref['Duplex']);
|
||||
$valid = [
|
||||
'simplex' => 'Simplex',
|
||||
'duplexflipshortedge' => 'DuplexFlipShortEdge',
|
||||
'duplexfliplongedge' => 'DuplexFlipLongEdge',
|
||||
];
|
||||
if (isset($valid[$name])) {
|
||||
return ' /Duplex /' . $valid[$name];
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Viewer Preference boolean entry.
|
||||
*
|
||||
* @param string $name Entry name.
|
||||
*/
|
||||
protected function getBooleanMode(string $name): string
|
||||
{
|
||||
if (isset($this->viewerpref[$name])) {
|
||||
return ' /' . $name . ' ' . ($this->viewerpref[$name] === true ? 'true' : 'false');
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the PDF viewer preferences for the catalog section
|
||||
*/
|
||||
protected function getOutViewerPref(): string
|
||||
{
|
||||
$vpr = $this->viewerpref;
|
||||
$out = ' /ViewerPreferences <<';
|
||||
if ($this->rtl) {
|
||||
$out .= ' /Direction /R2L';
|
||||
} else {
|
||||
$out .= ' /Direction /L2R';
|
||||
}
|
||||
|
||||
$out .= $this->getBooleanMode('HideToolbar');
|
||||
$out .= $this->getBooleanMode('HideMenubar');
|
||||
$out .= $this->getBooleanMode('HideWindowUI');
|
||||
$out .= $this->getBooleanMode('FitWindow');
|
||||
$out .= $this->getBooleanMode('CenterWindow');
|
||||
$out .= $this->getBooleanMode('DisplayDocTitle');
|
||||
if (isset($vpr['NonFullScreenPageMode'])) {
|
||||
$out .= ' /NonFullScreenPageMode /' . $this->page->getDisplay($vpr['NonFullScreenPageMode']);
|
||||
}
|
||||
|
||||
$out .= $this->getPageBoxName('ViewArea');
|
||||
$out .= $this->getPageBoxName('ViewClip');
|
||||
$out .= $this->getPageBoxName('PrintArea');
|
||||
$out .= $this->getPageBoxName('PrintClip');
|
||||
$out .= $this->getPagePrintScaling();
|
||||
$out .= $this->getDuplexMode();
|
||||
$out .= $this->getBooleanMode('PickTrayByPDFSize');
|
||||
if (isset($vpr['PrintPageRange'])) {
|
||||
$PrintPageRangeNum = '';
|
||||
foreach ($vpr['PrintPageRange'] as $pnum) {
|
||||
$PrintPageRangeNum .= ' ' . ($pnum - 1) . '';
|
||||
}
|
||||
|
||||
$out .= ' /PrintPageRange [' . $PrintPageRangeNum . ' ]';
|
||||
}
|
||||
|
||||
if (isset($vpr['NumCopies'])) {
|
||||
$out .= ' /NumCopies ' . (int) $vpr['NumCopies'];
|
||||
}
|
||||
|
||||
return $out . ' >>';
|
||||
}
|
||||
}
|
||||
3133
vendor/tecnickcom/tc-lib-pdf/src/Output.php
vendored
Normal file
3133
vendor/tecnickcom/tc-lib-pdf/src/Output.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2603
vendor/tecnickcom/tc-lib-pdf/src/SVG.php
vendored
Normal file
2603
vendor/tecnickcom/tc-lib-pdf/src/SVG.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1276
vendor/tecnickcom/tc-lib-pdf/src/Tcpdf.php
vendored
Normal file
1276
vendor/tecnickcom/tc-lib-pdf/src/Tcpdf.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1703
vendor/tecnickcom/tc-lib-pdf/src/Text.php
vendored
Normal file
1703
vendor/tecnickcom/tc-lib-pdf/src/Text.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
vendor/tecnickcom/tc-lib-pdf/src/include/sRGB.icc.z
vendored
Normal file
BIN
vendor/tecnickcom/tc-lib-pdf/src/include/sRGB.icc.z
vendored
Normal file
Binary file not shown.
41
vendor/tecnickcom/tc-lib-pdf/test/TcpdfTest.php
vendored
Normal file
41
vendor/tecnickcom/tc-lib-pdf/test/TcpdfTest.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* TcpdfTest.php
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* This file is part of tc-lib-pdf software library.
|
||||
*/
|
||||
|
||||
namespace Test;
|
||||
|
||||
/**
|
||||
* Tcpdf Pdf class test
|
||||
*
|
||||
* @since 2002-08-03
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2002-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*/
|
||||
class TcpdfTest extends TestUtil
|
||||
{
|
||||
protected function getTestObject(): \Com\Tecnick\Pdf\Tcpdf
|
||||
{
|
||||
return new \Com\Tecnick\Pdf\Tcpdf();
|
||||
}
|
||||
|
||||
public function testDummy(): void
|
||||
{
|
||||
$this->assertEquals(1, 1);
|
||||
}
|
||||
}
|
||||
60
vendor/tecnickcom/tc-lib-pdf/test/TestUtil.php
vendored
Normal file
60
vendor/tecnickcom/tc-lib-pdf/test/TestUtil.php
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* TestUtil.php
|
||||
*
|
||||
* @since 2020-12-19
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*
|
||||
* This file is part of tc-lib-file software library.
|
||||
*/
|
||||
|
||||
namespace Test;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* Test Util
|
||||
*
|
||||
* @since 2020-12-19
|
||||
* @category Library
|
||||
* @package Pdf
|
||||
* @author Nicola Asuni <info@tecnick.com>
|
||||
* @copyright 2015-2025 Nicola Asuni - Tecnick.com LTD
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
|
||||
* @link https://github.com/tecnickcom/tc-lib-pdf
|
||||
*/
|
||||
class TestUtil extends TestCase
|
||||
{
|
||||
public function bcAssertEqualsWithDelta(
|
||||
mixed $expected,
|
||||
mixed $actual,
|
||||
float $delta = 0.01,
|
||||
string $message = ''
|
||||
): void {
|
||||
parent::assertEqualsWithDelta($expected, $actual, $delta, $message);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param class-string<\Throwable> $exception
|
||||
*/
|
||||
public function bcExpectException($exception): void
|
||||
{
|
||||
parent::expectException($exception);
|
||||
}
|
||||
|
||||
public function bcAssertIsResource(mixed $res): void
|
||||
{
|
||||
parent::assertIsResource($res);
|
||||
}
|
||||
|
||||
public function bcAssertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void
|
||||
{
|
||||
parent::assertMatchesRegularExpression($pattern, $string, $message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user