You need to sign in to do that
Don't have an account?

Visualforce Component overlap
Hi All,
I need to create a PDF that must show two copies of the same document: one copy for the customer and one copy for the company.
These two documents are the same except for the header: into the header is specified if the copy is for the customer or for the company.
During my fisrt attempt I structured the page in this way:
But in this way the header it's the same for all the pages.
So, I created a Visualforce Component with a dynamic header, like this:
Then I modified the visualforce page like this:
Now the header it's correct, but the two components result overlapped.
Does anyone have a solution for my problem?
Thanks in advance
I need to create a PDF that must show two copies of the same document: one copy for the customer and one copy for the company.
These two documents are the same except for the header: into the header is specified if the copy is for the customer or for the company.
During my fisrt attempt I structured the page in this way:
<apex:page renderAs="pdf"> <div class="header"></div> <div class="content"> <!-- content for the customer's copy --> <div style="page-break-after: always;"></div> <!-- same content for the company's copy --> </div> <div class="footer"></div> </apex:page>
But in this way the header it's the same for all the pages.
So, I created a Visualforce Component with a dynamic header, like this:
<apex:component> <apex:attribute name="isCustomerCopy" description="Specify if this copy is for the Customer" type="Boolean" required="true"/> <div class="header> <apex:outputLabel value="Customer's copy" rendered="{!isCustomerCopy}"/> <apex:outputLabel value="Company's copy" rendered="{!NOT(isCustomerCopy)}"/> <div> <div class="content"> <!-- content only once --> </div> <div class="footer"></div> </apex:component>
Then I modified the visualforce page like this:
<apex:page renderAs="pdf"> <c:MyComponent isCustomerCopy="true"/> <c:MyComponent isCustomerCopy="false"/> </apex:page>
Now the header it's correct, but the two components result overlapped.
Does anyone have a solution for my problem?
Thanks in advance
How are you determining the user type? Profile, Role, email address, etc?