499
Views
22
Comments
[Ultimate PDF] Header and Footer - UltimatePDF
Question
Forge component by Leonardo Fernandes
15
Published on 08 Jan 2021

Hi!

I use UltimatePDF to show a report. In the header i have a webblock(this web block contains a img and txt) and a title. In the first page is ok. (look pic1)




But when i see others pages, the header is upping (look pic2).

And the same occur to the footer. In the footer i have pagecounter and page number. 




In pic 2 the webblock and title must stay at the top. But is down to the previously page.

What can I do to fix this problems?




OBS: the blur in images is for security 

Champion
Rank: #101

Are you using v1.0.2 this comes with RepeatHeading web block

Rank: #13848

Yes! Repeat is good, and I need it.


But ... When move to other pages, the header is moved up and to other pages.

mvp_badge
MVP
Rank: #5

Hi Tuya. Is it possible that you could share the code containing your PDF screen?

Rank: #26071

Hello Tuya,

This problem is solved?

I'am stuck in this problem too.

Rank: #594

I have the same problem. And so far I figure it out that the problem only happens when I use the Web page counter and page count. Can someone help me with this?

mvp_badge
MVP
Rank: #5

Hi Eduardo and Rui. Can I ask you to share one of your reports?

Please create a screen simulating your reports and static/mock data (e.g. nothing that depends on the database), so I can easily reproduce the error. Until I have that, I cannot be sure that I have fixed your issue.

Rank: #26071

leonardo.fernandes wrote:

Hi Eduardo and Rui. Can I ask you to share one of your reports?

Please create a screen simulating your reports and static/mock data (e.g. nothing that depends on the database), so I can easily reproduce the error. Until I have that, I cannot be sure that I have fixed your issue.

Hello Leonardo,
When i tried to create a simple example, with static data, I could not reproduce the error. I'll keep to trying to reproduce the error in the simple app or solve in the original application.
Thanks


mvp_badge
MVP
Rank: #5

Ok Eduardo, thanks for the effort.

Another alternative is if you provide me some URL so I can open your report in the browser, or save the web page (complete with images and CSS) and send it to me in a zip file.

Rank: #2142

leonardo.fernandes wrote:

Ok Eduardo, thanks for the effort.

Another alternative is if you provide me some URL so I can open your report in the browser, or save the web page (complete with images and CSS) and send it to me in a zip file.

Hi Leonardo. I have the same problem and could isolate it with this tips to replicate it

1. We are using OutsystemsUI and it seems there is a conflict with the BaseTheme on  /* $4.7.2 - Patterns - Structure - Columns */. It Works fine with Silk.

2. The problem shows up with reports with more tan 5 pages using the OutsystemsUIWeb\Structure\Columns* component with pagination (on header or footer, with current page or total num pages).

As a workaround I replace all Structure components with Tables; and then it work.

Hope this helps you to fix it !!!

RD


mvp_badge
MVP
Rank: #5

Hi Roberto. That's great!

But can you please share some code that reproduces the problem?

Thanks.

mvp_badge
MVP
Rank: #5

Nevermind, I reproduced the problem and I'm planning to fix it soon.

mvp_badge
MVP
Rank: #5

A new version has been published which supposedly fixes this problem.

If you continue to have similar issues, let me know.

mvp_badge
MVP
Rank: #5

Can anyone confirm if the new version fixed the problem?

Thanks.

Rank: #1394

Hi,


Can you help me on how to use the repeating heading to have a header and footer on every page of the pdf?



Thanks,


Majoy

Staff
Rank: #145

Ma. Joy Aropon wrote:

Hi,


Can you help me on how to use the repeating heading to have a header and footer on every page of the pdf?



Thanks,


Majoy

Hello Majoy.

You should be able to do it by having the header and footer with position:fixed;.

Ricardo

mvp_badge
MVP
Rank: #5

Ma. Joy Aropon wrote:

Can you help me on how to use the repeating heading to have a header and footer on every page of the pdf?


Majoy, you can use the PrintLayout web block for that. Please download and install the demo, and have a look at SampleReport01 or SampleScreenToPDF screens.

Rank: #3840

Leonardo Fernandes wrote:

Ma. Joy Aropon wrote:

Can you help me on how to use the repeating heading to have a header and footer on every page of the pdf?


Majoy, you can use the PrintLayout web block for that. Please download and install the demo, and have a look at SampleReport01 or SampleScreenToPDF screens.

Hi, 

I downloaded the demo called UltimatePDFReaciveSample but it does not contain neither the SampleReport01 nor the SampleScreenToPDF.

I'm creating a traditional webapp with OS11, using the UltimatePDF plugin and need to add to the footer the PageNumbers and PageCounters web blocks to my generated PDFs..... but when I go to ManageDependencies -> UltimatePDF and try to import the UIFlows components (PageCount & PageNumber) the checkbox next to those components is missing. Only the checkbox next to "UIFlows" exist, but if I check it, and then hit "Apply", it does nothing, open dependencies again and the box remains unchecked:



Ok, so I can´t seem to work with the sample. Then I went to my project where I'm using the UltimatePDF and did the same, and the checkboxes next to PageCount & PageNumber do exist!, if I check them, these webblocks become available in my project. But the another problem arises:

a) If I use them using Pagination\RepeatHeading, Then I see the weblock with no numbers. I only see the "/" but it shows in the correct place (header or footer) every time in every page. Why are the numbers not showing?


b) If I use them without the pagination\RepeatHeading then the numbers do show. But, they are not in the correct place. In the first page they are ok, then in the second they appear somewhere in the middle of the page and so on... it keeps moving =(


Any help will be appreciated! Thank you.

Rank: #836

Ulises Amaya wrote:

Leonardo Fernandes wrote:

Ma. Joy Aropon wrote:

Can you help me on how to use the repeating heading to have a header and footer on every page of the pdf?


Majoy, you can use the PrintLayout web block for that. Please download and install the demo, and have a look at SampleReport01 or SampleScreenToPDF screens.

Hi, 

I downloaded the demo called UltimatePDFReaciveSample but it does not contain neither the SampleReport01 nor the SampleScreenToPDF.

I'm creating a traditional webapp with OS11, using the UltimatePDF plugin and need to add to the footer the PageNumbers and PageCounters web blocks to my generated PDFs..... but when I go to ManageDependencies -> UltimatePDF and try to import the UIFlows components (PageCount & PageNumber) the checkbox next to those components is missing. Only the checkbox next to "UIFlows" exist, but if I check it, and then hit "Apply", it does nothing, open dependencies again and the box remains unchecked:



Ok, so I can´t seem to work with the sample. Then I went to my project where I'm using the UltimatePDF and did the same, and the checkboxes next to PageCount & PageNumber do exist!, if I check them, these webblocks become available in my project. But the another problem arises:

a) If I use them using Pagination\RepeatHeading, Then I see the weblock with no numbers. I only see the "/" but it shows in the correct place (header or footer) every time in every page. Why are the numbers not showing?


b) If I use them without the pagination\RepeatHeading then the numbers do show. But, they are not in the correct place. In the first page they are ok, then in the second they appear somewhere in the middle of the page and so on... it keeps moving =(


Any help will be appreciated! Thank you.

A solution for (b) is to write some css to set the position to fixed and make sure your container use that class.


SyntaxEditor Code Snippet

.PageFooter {
    position: fixed;
    bottom: 0px;
    left: 80px;
}


Staff
Rank: #145

Hello Ulises.

The Demos of the versions 1.04 and 1.05 are only valid for reactive.

Reactive web apps can't use traditional web components and vice-versa.

I believe the Demo you are looking for is the Demo of the version 1.0.2

Please see if with that you can solve your problem.


Thank you,

Ricardo Costa

Rank: #3840

Thanks Ricardo,

The demo works well, but inside my project I don't see the numbers. I modify directly in the UltimatePDF project adding a table inside the footer like in the demo,then publish the UltimatePDF plugin, then update the referencies to UltimatePDF inside my project and publish, but when I generate the PDF it does not show..... I simply don´t know why.

Staff
Rank: #145

Good morning Ulises.

The structure that you are showing is completely different than the one in the sample.

I believe that's why it's not working.

Please use the PrintLayout as is being used in the sample.

You have placeholders there and the structure is very simple.

The structure you are showing is full of containers.

Ricardo Costa

Rank: #3840

Thank you very much Ricardo, 

You where right, the main thing was to have the correct structure, I'm attaching a picture of how I have it now that it works in case it is helpful for someone else.


Thanks again!