Skip to content
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

automatically call and display the header and footer set in XML #5033

Open
wants to merge 1 commit into
base: 2.1
Choose a base branch
from

Conversation

snsupersharp
Copy link

Remove the lines and content of the default header and footer in TCPDF, automatically call and display the header and footer set in XML, and also automatically call when paging the page content, but the header and footer cannot have too much content beyond the page range.

…F, automatically call and display the header and footer set in XML, and also automatically call when paging the page content, but the header and footer cannot have too much content beyond the page range.
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 88.63636% with 5 lines in your changes missing coverage. Please review.

Project coverage is 31.85%. Comparing base (ae65ee2) to head (d1e7124).
Report is 24 commits behind head on 2.1.

Files with missing lines Patch % Lines
app/Report/ReportPdfImage.php 0.00% 4 Missing ⚠️
app/Report/PdfRenderer.php 96.77% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.1    #5033      +/-   ##
============================================
+ Coverage     31.80%   31.85%   +0.04%     
- Complexity    11425    11431       +6     
============================================
  Files          1174     1174              
  Lines         48084    48107      +23     
============================================
+ Hits          15293    15324      +31     
+ Misses        32791    32783       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fisharebest
Copy link
Owner

Can you give me some background to this change?

What problems does it solve?
Why make the change?
etc.

Thanks,

@snsupersharp
Copy link
Author

I am not a programmer, but I think there is a bug here in 2.1.20. When you define HEADER and FOOTER in the XML of the REPORT, they will be displayed as defined in version 1.7.20, but in 2.1.20, only TCPDF's default lines and page numbers will be displayed。

Part of XML file:



		<SetVar name="fill" value="" />
		<if condition="$sortby=='NAME'"><SetVar name="fill" value="#AAAAAA" /></if>
		<Cell bgcolor="$fill" border="1" width="200" style="label"><var var="I18N::translate('Name')" /></Cell>

		<SetVar name="fill" value="" />
		<if condition="$sortby=='BIRT:DATE'"><SetVar name="fill" value="#AAAAAA" /></if>
		<Cell bgcolor="$fill" border="1" width="100" style="label"><var var="I18N::translate('Date')" /></Cell>

		<Cell border="1" width="150" style="label"><var var="I18N::translate('Place')" /></Cell>
		<Cell border="1" newline="1" style="label"><var var="I18N::translate('Source')" /></Cell>
	</Header>

	......
	
	
	<Footer>
		<Cell align="rightrtl" newline="1" style="date"><Now/></Cell>
	</Footer>
</Doc>

And the pdf report of 1.7.20
1 7 20 report
but ,there will have nothing in 2.1.20
2 1 20 report

Furthermore, I need to define a special HEADER as follows

my report
my report1
my report2

So I made some modifications to implement it, but because I am not a developer, the code is not very standardized and only serves as a suggestion for reference。

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants