feat: adds pdf export with imprintor
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
496e2e438f
commit
f6b35f03a5
16 changed files with 1962 additions and 70 deletions
|
|
@ -116,4 +116,30 @@ defmodule Mv.Config do
|
|||
defp parse_and_validate_integer(_value, default) do
|
||||
default
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns the maximum number of rows allowed in PDF exports.
|
||||
|
||||
Reads the `row_limit` value from the PDF export configuration.
|
||||
|
||||
## Returns
|
||||
|
||||
- Maximum number of rows (default: 5000)
|
||||
|
||||
## Examples
|
||||
|
||||
iex> Mv.Config.pdf_export_row_limit()
|
||||
5000
|
||||
"""
|
||||
@spec pdf_export_row_limit() :: pos_integer()
|
||||
def pdf_export_row_limit do
|
||||
get_pdf_export_config(:row_limit, 5000)
|
||||
end
|
||||
|
||||
# Helper function to get PDF export config values
|
||||
defp get_pdf_export_config(key, default) do
|
||||
Application.get_env(:mv, :pdf_export, [])
|
||||
|> Keyword.get(key, default)
|
||||
|> parse_and_validate_integer(default)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue