printing to pdf problem - content too wide run out of page

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

printing to pdf problem - content too wide run out of page

#1

Postby xren » Fri Sep 04, 2015 3:24 pm

Hi,

I have forms like to print in pdf format, however, the width of the form does not adjust to the size of the pdf.

some of the content run out of the page width.

How can this be fixed?

Thanks
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#2

Postby Steve » Fri Sep 04, 2015 4:22 pm

Hi,

The PDF with has a set width which is usually set to A4. The HTML generated to generate the PDF (this is the same as the rendering to the browser) will honor any width specified in the HTML.

In the designer you can normally see whether the content will fit the PDF page. There is a 'switch to print view' button on the page toolbar. This will overlay grid lined to give you an help grid lines to indicate whether the content will fit onto the PDF.

If you have wide tables and explicit widths set e.g width: 400px;, this can make the content wider than the available width.

Do you have any widths values set in the HTML? Or maybe a table with many columns?

I have suggested to people in the past with wide forms to print the form in landscape mode if that is an acceptable solution?

Kind regards

Steve
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#3

Postby xren » Wed Sep 16, 2015 2:25 pm

Hi Steve,

For my forms, the user prefer not use landscape.

when switch to print view, the form width passed the width of the A4 paper(210), however, the forms do not have a fixed pixel width on any panel or table, etc. The choice are all Maximum (use parent width)

And some of the fields in grid or table can have very long text.


Xiaoli
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#4

Postby Steve » Wed Sep 16, 2015 4:06 pm

Hi,

Are you printing these in report mode?

For the long label texts you could try applying a CSS3 style:

Code: Select all

   white-space: pre-wrap;
I am not sure if this works.

Steve[/code]
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#5

Postby xren » Fri Sep 18, 2015 6:19 pm

How about break a form to pages when print to PDF?

If a form is too long, when I print to pdf, the text in the line can break into part and show on different pdf page.

Is there a quick way to fix this?

Thanks,
Xiaoli
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#6

Postby xren » Fri Sep 18, 2015 9:47 pm

the white-space: pre-wrap seems not working
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#7

Postby Steve » Mon Sep 21, 2015 1:54 pm

Hi,

I think the best thing is to export the form and send it to support@ebasetech.com

I will take a look and see if I can help you with this.

Steve
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#8

Postby xren » Mon Sep 21, 2015 2:07 pm

Hi Steve,

I have send the forms to the support email box.

The text fields printing out of page or one line of text break into two parts to two pages printing problems are our urgent problems need to be fix this week (the go live is next week).

Thank you very much on finding solutions.

Xiaoli
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#9

Postby Steve » Mon Sep 21, 2015 4:25 pm

Hi Xiaoli,

I responded to the email asking you to export all the entities that are associated to the form e.g Presentation Template, Business views etc...

I cannot get the TEST form to run without all these bits. I could write these myself, but that will require more time and guess work with what is in your presentation template.

If you could repackage this for me, that will be great.

Also, in the email could you show me the text you are testing with?

Kind regards

Steve
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#10

Postby xren » Mon Sep 21, 2015 7:38 pm

Hi Steve,

I have sent the two forms to the support email box.

Thanks,
Xiaoli
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#11

Postby Steve » Wed Sep 23, 2015 10:25 am

Hi Xiaoli,

I have sent you an email from support.

Kind regards

Steve
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#12

Postby Steve » Wed Sep 23, 2015 1:24 pm

An A4 PDF is 595 pixels wide.

The problem with the form is that there are 3 panels with explicit widths set on them, these values are:

250px
250px
280px

The width of the 3 panels is greater than the width of the PDF width.

I changed the panel widths to percentages and changed the container panel's layout property to fill the content.

Steve
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#13

Postby xren » Thu Sep 24, 2015 12:50 pm

Hi Steve,

This is replying your email regarding Test form. The CSS is not important.

I just created a test business project and created a test form, then one text area field with maximum length 1024, then a print page - the copy of the first page. then a print button on first page. When click it generate pdf using print page and display.

I input a long text to the text area fields. then click print, the pdf only show part of the text.

Xiaoli
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#14

Postby Steve » Thu Sep 24, 2015 4:11 pm

Hi Xiaoli,

I have tested this myself and I cannot find anything wrong with the PDF. I ran your test form and everything looked fine.

I even filled it up with 1000 characters.

Perhaps you can send me a screen grab of your internet browser page and send me a copy of the PDF?

Kind regards

Steve
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#15

Postby xren » Mon Sep 28, 2015 9:38 pm

Hi Steve,

I know what is wrong with the test form. I need put a panel to the text field and give it a fixed width. Then it is ok.

However, my intake form still have problem with printing.
Some text fields still run out of page even I put it under a panel with fixed width e..g 300px.

I have send you the form to support email box.

Can you take a look?

Thanks,
Xiaoli
0 x


Who is online

Users browsing this forum: No registered users and 9 guests