You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2-130Lines changed: 2 additions & 130 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,136 +4,8 @@ All notable changes to this project will be documented in this file.
4
4
This project adheres to [Semantic Versioning](http://semver.org/).
5
5
The format is based on [Keep a Changelog](http://keepachangelog.com/).
6
6
7
-
## Version 1.0.9 - TBD
7
+
## Version 0.1.0 - TBD
8
8
9
9
### Added
10
10
11
-
- License entry
12
-
13
-
### Fixed
14
-
15
-
- Handling of multiple records in one request
16
-
17
-
### Changed
18
-
19
-
- prepare for CDS9 in tests
20
-
21
-
## Version 1.0.8 - 28.03.25
22
-
23
-
### Added
24
-
25
-
- Added @UI.MultiLineText to value fields
26
-
- Added support for Multi-Tenancy
27
-
- Added configuration options to disable tracking of CREATE/UPDATE/DELETE operations on a project level
28
-
29
-
### Fixed
30
-
31
-
- Handling of numeric and boolean fields was faulty, when an initial value of `0` for numeric or `false` for boolean was supplied
32
-
- Decimal values were handled differently for HANA and SQlite
33
-
- Missing UI Label for one attribute (`ChangeLog.ID`) of the Changes UI facet
34
-
- Support for @UI.HeaderInfo.TypeName as fallback for the UI Label of the key
35
-
- Compilation error when an association is used as a key
36
-
- Fixed handling of unmanaged composition of many
37
-
- Proper casing of the operation enum type
38
-
39
-
### Changed
40
-
41
-
- Added warning and mitigation for multi-tenant deployments with MTX
42
-
- Added a disclaimer of upcoming new version having a minimum requirement of CDS 8.6 for multitenancy fix
43
-
- Changed the default limit on non-HANA databases from 255 to 5000 characters for all String values
44
-
- Updated peer dependency from CDS7 to CDS8
45
-
46
-
## Version 1.0.7 - 20.08.24
47
-
48
-
### Added
49
-
50
-
- A global switch to preserve change logs for deleted data
51
-
- For hierarchical entities, a method to determine their structure and a flag to indicate whether it is a root entity was introduced. For child entities, information about the parent is recorded.
52
-
53
-
### Fixed
54
-
55
-
- CDS 8 does not support queries for draft-enabled entities on the application service anymore. This was causing: SqliteError: NOT NULL constraint failed: (...).DraftAdministrativeData_DraftUUID
56
-
- CDS 8 deprecated cds.transaction, causing change logs of nested documents to be wrong, replaced with req.event
57
-
- CDS 8 rejects all direct CRUD requests for auto-exposed Compositions in non-draft cases. This was affecting test cases, since the ChangeView falls into this category
58
-
- req.\_params and req.context are not official APIs and stopped working with CDS 8, replaced with official APIs
59
-
- When running test cases in CDS 8, some requests failed with a status code of 404
60
-
- ServiceEntity is not captured in the ChangeLog table in some cases
61
-
- When modeling an inline entity, a non-existent association and parent ID was recorded
62
-
- Fixed handling, when reqData was undefined
63
-
64
-
### Changed
65
-
66
-
- Peer dependency to @sap/cds changed to ">=7"
67
-
- Data marked as personal data using data privacy annotations won't get change-tracked anymore to satisfy product standards
68
-
- Restructured Documentation
69
-
70
-
## Version 1.0.6 - 29.04.24
71
-
72
-
### Fixed
73
-
74
-
- Storage of wrong ObjectID in some special scenarios
75
-
- Missing localization of managed fields
76
-
- Views without keys won't get the association and UI facet pushed anymore
77
-
78
-
### Added
79
-
80
-
- A method to disable automatic generation of the UI Facet
81
-
82
-
### Changed
83
-
84
-
- Improved documentation of the @changelog Annotation
85
-
86
-
## Version 1.0.5 - 15.01.24
87
-
88
-
### Fixed
89
-
90
-
- Error on HANA when logging Boolean or Numeric Data
91
-
92
-
## Version 1.0.4 - 08.01.24
93
-
94
-
### Added
95
-
96
-
- Side effect annotation now allows automatic refresh after a custom action caused changes
97
-
98
-
### Changed
99
-
100
-
- Added a check to disable change tracking for views with a UNION
101
-
102
-
### Fixed
103
-
104
-
- Handling of associations within change tracked entities
105
-
- Handling of change log when custom actions on child entities are called
106
-
107
-
## Version 1.0.3 - 10.11.23
108
-
109
-
### Added
110
-
111
-
- Added note about using `SAPUI5 v1.120.0` or later for proper lazy loading of the _Change History_ table.
112
-
- In README, add warning about tracking personal data.
113
-
114
-
### Changed
115
-
116
-
- Support cases where parent/child entries are created simultaneously.
117
-
- Allow for lazy loading of change history table (with SAP UI5 release 1.120.0).
118
-
119
-
## Version 1.0.2 - 31.10.23
120
-
121
-
### Changed
122
-
123
-
- In README, use view of the full change-tracking table instead of the customized one for the main image.
124
-
125
-
## Version 1.0.1 - 26.10.23
126
-
127
-
### Changed
128
-
129
-
- Flattened README structure.
130
-
131
-
### Fixed
132
-
133
-
- Labels are looked up from the service entity (not the db entity only).
134
-
135
-
## Version 1.0.0 - 18.10.23
136
-
137
-
### Added
138
-
139
-
- Initial release
11
+
- Initial release that provides out-of-the-box integration with the SAP Print Service.
Copy file name to clipboardExpand all lines: README.md
+27-25Lines changed: 27 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,35 +4,29 @@
4
4
5
5
## About this project
6
6
7
-
CDS plugin for SAP Print service (package `@cap-js/print`) is a CDS plugin providing print service features through integration with [SAP Print Service](https://api.sap.com/api/PRINTAPI/overview).
7
+
The `@cap-js/print` package is a [CDS plugin](https://cap.cloud.sap/docs/node.js/cds-plugins#cds-plugin-packages) that provides print service features through integration with the[SAP Print Service](https://api.sap.com/api/PRINTAPI/overview).
8
8
9
9
## Table of Contents
10
10
11
-
-[About this project](#about-this-project)
12
-
-[Requirements](#requirements)
13
-
-[Setup](#setup)
14
-
15
11
## Requirements and Setup
16
12
17
-
See [Getting Started](https://cap.cloud.sap/docs/get-started) on how to jumpstart your development and grow as you go with SAP Cloud Application Programming Model.
18
-
19
-
Usage of this plugin requires a valid subscription of the [SAP Print Service](https://help.sap.com/docs/SCP_PRINT_SERVICE).
13
+
Using this plugin requires a valid subscription of the [SAP Print Service](https://help.sap.com/docs/SCP_PRINT_SERVICE).
20
14
21
15
## Usage
22
16
23
-
To use this plugin to print documents there are two main steps:
17
+
To use this plugin to print documents, there are two main steps:
24
18
25
-
1.Make sure your CDS model is modelled correctly
19
+
1.Ensure your model meets the requirements
26
20
2. Annotate your CDS model with `@PDF.Printable`
27
21
28
-
### Assumptions of your model
22
+
### Model Requirements
29
23
30
-
- The attribute you want to print is of type `LargeBinary`
31
-
-This attribute has the annotation `@Core.ContentDisposition: fileName`, where `fileName` is the attribute that specifies the file name
24
+
- The attribute(s) you want to print are of type `LargeBinary`
25
+
-Those attributes have the annotation `@Core.ContentDisposition: fileName`, where `fileName` is the attribute that specifies the file name or a hardcoded string with the file name
32
26
33
27
### Annotations in CDS model
34
28
35
-
To use the print plugin, simply annotate your entity with `@PDF.Printable`:
29
+
To use the print plugin, annotate your entity with `@PDF.Printable`:
36
30
37
31
```cds
38
32
@PDF.Printable
@@ -42,16 +36,24 @@ entity Books as projection on my.Books;
42
36
This annotation does the following things in the background:
43
37
44
38
- Adds an action `print` to the annotated entity with the following parameters:
45
-
-`Queue`: Name of the print queue to use
46
-
-`Copies`: Number of copies to print
47
-
-`File`: Only added if the entity has multiple `LargeBinary` attributes. Allows selecting whicn file should be printed. Make sure the `LargeBinary` properties are annotated with `@Common.Label`
39
+
-`Queue`: Name of the print queue to use.
40
+
-`Copies`: Number of copies to print.
41
+
-`File`: Only added if the entity has multiple `LargeBinary` attributes. Allows selecting which file should be printed. Ensure that the `LargeBinary` properties are annotated with `@Common.Label`.
48
42
- This action is added to the UI and a handler is generated to process the print request.
49
43
- An entity `PrintServiceQueues` is added to the service to provide available print queues in a value help.
50
44
- An entity `PrintServiceFiles` is added to the service to provide available files in a value help (only if multiple `LargeBinary` attributes exist).
51
45
52
-
## Manual usage
46
+
## Manual Usage
47
+
48
+
You can also use the print service to print documents manually, i.e., without the `@PDF.Printable` annotations and generated actions and handlers.
49
+
50
+
Use cases for a manual approach could be:
51
+
52
+
- You want to print documents that are not part of your CDS model, i.e., files generated at runtime.
53
+
- Your model does not meet the requirements for the automatic approach.
54
+
- You want to print a file type other than PDF.
53
55
54
-
You can also use the print service to print documents manually, i.e. without the `@PDF.Printable` annotations and generated actions and handlers. For this, you can use the `cds.connect.to`-API of CAP to connect to the print service and invoke the `print` action manually.
56
+
For this, you can use the `cds.connect.to`API of CAP to connect to the print service and invoke the `print` action manually.
It is possible that for LargeBinaries, that you get from the database, the content is provided as a stream. In this case, the stream needs to be converted to base64 before passing it to the print service. For an example, have a look at the sample application in `test/bookshop/`
76
+
It is possible that for LargeBinaries retrieved from the database, the content is provided as a stream. In this case, the stream needs to be converted to base64 before passing it to the print service. For example, see the sample application in `test/bookshop/`
75
77
76
78
## Local Development
77
79
78
-
When running the application locally, i.e. `cds watch`, the print service is mocked. This mock implementation prints the print job details to the console instead of sending it to the actual print service. It also provides a number of sample print queues for selection.
80
+
When running the application locally, the print service is mocked. This mock implementation prints the print job details to the console instead of sending them to the actual print service. It also provides a number of sample print queues for selection.
79
81
80
82
## Hybrid Testing
81
83
82
84
You can also run the application locally with a binding to the cloud print service with CAP profiles. For more information, see [Hybrid Testing](https://cap.cloud.sap/docs/advanced/hybrid-testing#hybrid-testing). You need an instance of the SAP Print Service.
83
85
84
86
### Local
85
87
86
-
As the `hybrid` profile of the plugin uses SAP HANA Cloud to execute integration tests in CI, a profile `local` is added that uses can be used to execute the application locally with a binding to the cloud print service.
88
+
As the `hybrid` profile of the plugin uses SAP HANA Cloud to execute integration tests in CI, a profile `local` is added that can be used to execute the application locally with a binding to the cloud print service.
87
89
88
90
```bash
89
91
# Once as setup
@@ -100,16 +102,16 @@ For CI, the hybrid integration tests are automatically run against a SAP Print S
100
102
101
103
## Support, Feedback, Contributing
102
104
103
-
This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/cap-js/print/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).
105
+
This project is open to feature requests/suggestions, bug reports, etc. via [GitHub issues](https://github.com/cap-js/print/issues). Contributions and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).
104
106
105
107
## Security / Disclosure
106
108
107
-
If you find any bug that may be a security problem, please follow our instructions at[in our security policy](https://github.com/cap-js/print/security/policy) on how to report it. Please do not create GitHub issues for security-related doubts or problems.
109
+
If you find a bug that may be a security problem, please follow the instructions [in our security policy](https://github.com/cap-js/print/security/policy) on how to report it. Please do not create GitHub issues for security-related doubts or problems.
108
110
109
111
## Code of Conduct
110
112
111
113
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](https://github.com/cap-js/.github/blob/main/CODE_OF_CONDUCT.md) at all times.
112
114
113
115
## Licensing
114
116
115
-
Copyright 2025 SAP SE or an SAP affiliate company and print contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/cap-js/print).
117
+
Copyright 2025 SAP SE or an SAP affiliate company and print contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information, including third-party components and their licensing/copyright information, is available [via the REUSE tool](https://api.reuse.software/info/github.com/cap-js/print).
0 commit comments