Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8346819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:08:55+00:00 2026-06-09T07:08:55+00:00

How to change the size of column in DataExport for PDF i have create

  • 0

How to change the size of column in DataExport for PDF

i have create DataTable using following code

 <p:dataTable id="tb1" var="user" value="#{userManagedBean.searchUsersResults}"
        selection="#{userManagedBean.selectedUser}" selectionMode="single"
        dynamic="true"
        onRowSelectUpdate="userUpdateForm"
        onRowUnselectUpdate="userUpdateForm"
        rowSelectListener="#{userManagedBean.onUserSelect}"
        rowUnselectListener="#{userManagedBean.onUserUnselect}"
        paginator="true" rows="5" style="width: 700" >
        <p:column sortBy="#{user.userId}" filterBy="#{user.userId}" >
            <f:facet name="header">
            <h:outputText value="Id" />
            </f:facet>
            <h:outputText value="#{user.userId}" />
        </p:column>
        <p:column sortBy="#{user.username}" filterBy="#{user.username}" >
            <f:facet name="header">
            <h:outputText value="Name" />
            </f:facet>
            <h:outputText value="#{user.username}" />
        </p:column>
        <p:column sortBy="#{user.emailId}" filterBy="#{user.emailId}">
            <f:facet name="header">
            <h:outputText value="Email" />
            </f:facet>
            <h:outputText value="#{user.emailId}" />
        </p:column>
        <p:column parser="date" sortBy="#{user.dob}" filterBy="#{user.dob}">
            <f:facet name="header">
            <h:outputText value="DOB" />
            </f:facet>
            <h:outputText value="#{user.dob}" >
                <f:convertDateTime pattern="MM/dd/yyyy" />
            </h:outputText>
       </p:column>



    </p:dataTable>

For exporting pdf

    <h:commandLink>  
        <p:graphicImage value="/images/pdf.png" />  
        <p:dataExporter type="pdf" target="j_idt6:tb1" fileName="cars"/>  
    </h:commandLink> 

In pdf it showing all column having same width but I need as i defined.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:08:56+00:00Added an answer on June 9, 2026 at 7:08 am

    You can use preProcessor and postProcessor atrributes in p:dataExporter tag to customize your document.

    On PrimeFaces showcase you can view example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to change the size of a column in sql server using: ALTER
I have a DataTable where I want to modify the font size. The user
I have the following simpl WPf grid, two columns, a button in each column,
I have a rich:dataTable and there i have a rich column with a span.
I'm using Blueprint CSS to create a 3 column layout: LEFT COLUMN: span-6 CENTER
I'm looking to change the font size of a certain column and row in
If I change SuSE's terminfo to 132-column (co#132) and in my Perform .per code
Here is code example: http://jsfiddle.net/gubvw/3/ If you'll slowly change screen size by dragging sizer
How to change the column size of the salary column in the employee table
I'm having trouble to change size of fielddefs in a TClientDataSet after i use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.