[Ultimate PDF] Header and Footer - UltimatePDF

Forge Component
(15)
Published on 14 Sep (11 days ago) by Leonardo Fernandes
15 votes
Published on 14 Sep (11 days ago) by Leonardo Fernandes

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 

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

Yes! Repeat is good, and I need it.


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

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

Hello Tuya,

This problem is solved?

I'am stuck in this problem too.

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?

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.

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


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.

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


Hi Roberto. That's great!

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

Thanks.

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

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

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

Can anyone confirm if the new version fixed the problem?

Thanks.

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

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

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.

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.

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

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.

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

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!

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;
}