-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Customizable PDF Metadata in ZugferdDocumentPdfMerger
#208
Comments
Hi @MarkusJLechner, I hope you have a nice day too. I have planned the feature for next year. Thank you for the detailed specification. Kind regards |
Hi @horstoeko,
after doing this:
The document does no more contain any metadata. Not sure if this is related to this topic or if I do something wrong. Thanks & Best regards |
Hi @MarkusJLechner, I have created a PR #212 I've implemented the following:
The templates have four placeholders:
The callback function takes the following parameters
The callback function has a higher priority than the templates. I would ask you to review the pull request and give me feedback as soon as possible Kind regards |
…erEn16931Test::testCustomMetaInformation
looks good to me! |
Hi @MarkusJLechner, OK. Then I'll merge the PR and create a new release later today. Thank you very much. And have a nice day. |
#208 Customizable PDF Metadata -> Added Templates and Callback Function
Describe the feature
Allow setting custom metadata, specifically the title, when generating PDFs using
ZugferdDocumentPdfMerger
. The ability to customize other metadata fields (such as subject) should also be considered.One approach could be to expose the
pdfWriter
instance so future customizations can be made without requiring new feature requests. Alternatively, make the hardcoded strings insidepreparePdfMetadata
customizable, ensuring flexibility.Current Behavior
The current PDF metadata is hardcoded within
preparePdfMetadata
. Example:Expected Behavior
Allow setting a custom title like this:
Alternatively, allow using a customizable format:
Context
Inside
ZugferdDocumentPdfBuilderAbstract
, the title and metadata are collected inpreparePdfMetadata
. The goal is to allow these values to be overridden without modifying core functionality.Screenshots
Current implementation:
After attempting to add
setTitle
:The text was updated successfully, but these errors were encountered: