blank page in PDF

This is the place to discuss Help & Manual 4 issues. Please don't post questions on any other versions here!

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Dean Whitlock
Posts: 577
Joined: Thu Sep 01, 2005 5:59 pm
Location: Thetford Center, Vermont USA
Contact:

blank page in PDF

Unread post by Dean Whitlock »

I always put a blank line at the end of each topic (press Enter once to create a single empty paragraph) so there will be a little white space between the last line of text and the bottom browser frame in HTML/BB outputs. This has created a problem in PDF output: a blank page. I have a topic that just fills a single page of PDF output. The following topic is Heading 1 level (Top Level), which is set up to start on a new page. I have turned on the Ignore Blank Pages in PDF file option in the PDF Layout properties, but I am still getting the blank page. If I delete the empty paragraph, I don't get the blank page. I have verified that the blank paragraph doesn't contain any invisible characters. Is this expected, that an empty paragraph is treated as non-blank?

Thanks,
Dean
User avatar
Tim Green
Site Admin
Posts: 23177
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Dean,

Empty paragraphs are used to create space so they always have the full height of the paragraph. If adding an empty paragraph increases the height of your entire page enough so that it extends beyond the page boundary then it is quite possible that the blank paragraph will be placed on a page of its own. You can probably avoid this by using a space after setting in the last paragraph in your topic.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Hasso
Posts: 78
Joined: Wed Feb 01, 2006 8:52 pm

Unread post by Hasso »

Dean,

Couldn't you simply set a bottom padding for your body style?

It's never good practice to manage spacing with empty paragraphs or non breaking spaces ( ) in HTML. CSS provides margin and padding for that purpose.
As I am am teaching MS Word to computer newbies I use to observe the same attitude at my students who did typewriting before. There you only have the method to press the RETURN key to insert space between paragraphs. But in Word (as in HTML/CSS) you can manage those spaces even more precisely with templates.

Just my opinion.
User avatar
Dean Whitlock
Posts: 577
Joined: Thu Sep 01, 2005 5:59 pm
Location: Thetford Center, Vermont USA
Contact:

Unread post by Dean Whitlock »

Hi Hasso,

You're absolutely right, of course. At the time I started using H&M I didn't know how to edit the topic template and so did the quick-and-dirty fix of putting in the extra Return at the end. That leaves me with a backlog of projects and topics that I would have to edit in order to get rid of the extra Return after changing the template. I would also have to adjust my heading styles to put more space above each one, but that's just a simple style change that I can copy from project to project. Eventually I will have to take the time to make things right.

Tim,
Thanks for the suggestion, I'll give it a try.

Dean
User avatar
Dean Whitlock
Posts: 577
Joined: Thu Sep 01, 2005 5:59 pm
Location: Thetford Center, Vermont USA
Contact:

Unread post by Dean Whitlock »

Tim, Hasso, et al,

I decided to update my topic template for HTML/BB outputs and add padding at the bottom of each topic. First I tried adding bottom padding to the body style, but this had no effect that I could see. I am using the non-scrolling header template, so next I added bottom padding to the idcontent style. This fixed IE but not Firefox (to be expected, based on the comments in the topic template). So I also added bottom padding to the innerdiv style. This worked for both IE and Fireox, but seemed to add double-padding (that is, it appeared that the two paddings were being added together). I could be wrong about this, since I don't have a "pixel ruler" to hold up to the screen. :wink: I reduced the two paddings by half and now have a result I'm happy with: I don't get the extra PDF page that was produced by the extra blank paragraph at the end of each topic, while still having the extra white space at the bottom of HTML topics.

Now to adjust my heading styles to add a little space above each one...

Thanks for the help,
Dean
User avatar
Tim Green
Site Admin
Posts: 23177
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Dean,

Playing with the two sets of paddings in the NS-header template is tricky and can have negative results. It's ESSENTIAL not to change any of the 0 values! The code here uses the !important hack to hide values from each group of browsers so that each one only gets the one that make sense for it. If you delete the !important switch or change anything on the 0px lines you will get a mess.

Code: Select all

  /* Set the padding in the OUTER div for MSIE and CHM to prevent the 
      width bug and the horizontal scrollbar bug from activating. */ 

  #idcontent {    
      width: 100%; 
      padding: 0px !important; 
      padding: 10px 15px 5px 10px; 
   } 

/* Set the padding in the INNER div for all other browsers. */ 

  #innerdiv {    
      padding: 10px 5px 5px 10px !important;  
      padding: 0px; 
   } 
In the first block the padding of the outer DIV is set to 0 for all real browsers and to the values in the next line for Internet Exploder. In the second block the first line of text sets the padding for real browsers and the second line sets the padding to 0 for Internet Exploder.

The net result of this is that the active padding is set in the outer DIV for real browsers and the inner DIV for Internet Exploder. Because IE's box model is inherently broken it also needs different padding values.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Dean Whitlock
Posts: 577
Joined: Thu Sep 01, 2005 5:59 pm
Location: Thetford Center, Vermont USA
Contact:

Unread post by Dean Whitlock »

Hi Tim,
Thanks for the warning. Because of the good internal documentation in the template I was able to figure that out, and tested it first on a junk project just to be sure. I changed only the bottom padding value in the lines where there already was one. I try to be very careful when I have to mess around under the hood. I know just enough HTML to do damage, but luckily I also know that's the case. Your message was good reassurance that I had done the right thing.

Hope you didn't get the heavy rains that washed most of England into the sea.

Best,
Dean
User avatar
Dean Whitlock
Posts: 577
Joined: Thu Sep 01, 2005 5:59 pm
Location: Thetford Center, Vermont USA
Contact:

Seeking CSS enlightenment

Unread post by Dean Whitlock »

Hi Tim,

Regarding the change I just made to the padding in the two div sections, can you explain why it is that IE is fixed by one, while the real browsers are fixed by the other?

Code: Select all

   /* Set the padding in the OUTER div for MSIE and CHM to prevent the 
      width bug and the horizontal scrollbar bug from activating. */ 

  #idcontent {    
      width: 100%; 
      padding: 0px !important; 
      padding: 10px 15px 20px 10px; 
   } 

/* Set the padding in the INNER div for all other browsers. */ 

  #innerdiv {    
      padding: 10px 5px 20px 10px !important;  
      padding: 0px; 
   }
I assume it has something to do with the order in which the padding statements are arranged (IE only reads the last one), combined with the !important comment. (IE ignores it, while the real browers take note and override the rule about applying only the last statement). I couldn't find any reference to it in my CSS documentation, which I admit is slim and out of date.

Thanks,
Dean
User avatar
Tim Green
Site Admin
Posts: 23177
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Dean,

There's no documentation on this because it's one of the many "hacks" that are necessary to make the deeply broken Internet Explorer work at all. In this case it relies on the fact that IE up to Version 6, and also Version 7 in "quirks mode", which is activated by the doctype used by Help & Manual, doesn't understand the !important directive, which gives a CSS definition priority even if the same element is redefined later in the style definitions.

Normally, the last definition is always the one that is used, but !important gives a specific definition priority over all others. Since IE doesn't understand this you can juggle with it to apply one setting for normal browsers and another for IE.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Dean Whitlock
Posts: 577
Joined: Thu Sep 01, 2005 5:59 pm
Location: Thetford Center, Vermont USA
Contact:

Unread post by Dean Whitlock »

Thanks, Tim, that's what it looked like, but it's good to know for sure. CSS: never a dull moment! :roll:
Post Reply