PC Review


Reply
Thread Tools Rate Thread

How can I set the padding to zero if the document is pdf?

 
 
Cal Who
Guest
Posts: n/a
 
      23rd Nov 2009
<li><a href="Doc1.pdf" target="DocFrame">Doc1</a></li>

<li><a href="Doc2.htm" target="DocFrame">Doc2</a></li>

I have statements like the above.

DocFrame is an iFrame element that is inside a Div with nonzero padding set.

For an html document that looks like a letter this put white space around
the text that looks like the margin you normally would see in a letter.

But for a pdf document it does not look good.

How can I set the padding to zero if the document is pdf?

I have no idea how to even start trying so any helpful hint would be
appreciated.



Thanks











 
Reply With Quote
 
 
 
 
Gregory A. Beamer
Guest
Posts: n/a
 
      24th Nov 2009
" Cal Who" <(E-Mail Removed)> wrote in news:#F#6y3HbKHA.1596
@TK2MSFTNGP06.phx.gbl:

> But for a pdf document it does not look good.
>
> How can I set the padding to zero if the document is pdf?
>
> I have no idea how to even start trying so any helpful hint would be
> appreciated.


You have to do more than simply target the iFrame in these cases. You will
have to actually set some values for the iFrame to get rid of the padding.

One question I have is why do you have to have an iFrame? Is this something
where a user is going to thumb through multiple docs on a single page?

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Reply With Quote
 
Cal Who
Guest
Posts: n/a
 
      24th Nov 2009

"Gregory A. Beamer" <(E-Mail Removed)> wrote in message
news:Xns9CCD712B7F534gbworld@207.46.248.16...
>" Cal Who" <(E-Mail Removed)> wrote in news:#F#6y3HbKHA.1596
> @TK2MSFTNGP06.phx.gbl:
>
>> But for a pdf document it does not look good.
>>
>> How can I set the padding to zero if the document is pdf?
>>
>> I have no idea how to even start trying so any helpful hint would be
>> appreciated.

>
> You have to do more than simply target the iFrame in these cases. You will
> have to actually set some values for the iFrame to get rid of the padding.
>
> One question I have is why do you have to have an iFrame? Is this
> something
> where a user is going to thumb through multiple docs on a single page?


yes

>
> Peace and Grace,
>
> --
> Gregory A. Beamer (MVP)
>


As I said it is the div (containg the iframe) that contains the padding that
puts a white margin around the iframe.

Where I am now is I'm trying a aspropDownList

I hope I can figure out how to set the padding on the div from a
aspropDownList event.

How would you do that?

Thanks





 
Reply With Quote
 
Cal Who
Guest
Posts: n/a
 
      25th Nov 2009
I'm using a aspropDownList and almost have it working.

However, in my SelectedIndexChanged event handler I always get 2 for the
DropDownList SelectedIndex.

I see from the Internet that this is a constant problem but found no
solution.

Do you know what my problem might be from?



Thanks

ps I do have
AutoPostBack="true" runat="server"

on the DDL




 
Reply With Quote
 
Cal Who
Guest
Posts: n/a
 
      25th Nov 2009

" Cal Who" <(E-Mail Removed)> wrote in message
news:%23F%(E-Mail Removed)...
> <li><a href="Doc1.pdf" target="DocFrame">Doc1</a></li>
>
> <li><a href="Doc2.htm" target="DocFrame">Doc2</a></li>
>
> I have statements like the above.
>
> DocFrame is an iFrame element that is inside a Div with nonzero padding
> set.
>
> For an html document that looks like a letter this put white space around
> the text that looks like the margin you normally would see in a letter.
>
> But for a pdf document it does not look good.
>
> How can I set the padding to zero if the document is pdf?
>
> I have no idea how to even start trying so any helpful hint would be
> appreciated.
>

Found it. The DropDownList values must be unique!


 
Reply With Quote
 
Gregory A. Beamer
Guest
Posts: n/a
 
      25th Nov 2009
" Cal Who" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> As I said it is the div (containg the iframe) that contains the
> padding that puts a white margin around the iframe.
>
> Where I am now is I'm trying a aspropDownList
>
> I hope I can figure out how to set the padding on the div from a
> aspropDownList event.
>
> How would you do that?


I was understanding you did not want to take a roundtrip to the server.
If you are taking a roundtrip, programmatically set the padding based on
what action is being taken. Just have the DIV runat=server and
programatically set the padding.

If you want every thing to happen on the client side, you cannot merely
href target the iFrame. you have to use javascript. You can set the
padding of the DIV in the JavaScript routine. You will then open the
page using JavaScript in the targeted "window".

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Reply With Quote
 
Cal Who
Guest
Posts: n/a
 
      25th Nov 2009

"Gregory A. Beamer" <(E-Mail Removed)> wrote in message
news:Xns9CCE8ACCEC78Agbworld@207.46.248.16...
>" Cal Who" <(E-Mail Removed)> wrote in
> news:(E-Mail Removed):
>
>> As I said it is the div (containg the iframe) that contains the
>> padding that puts a white margin around the iframe.
>>
>> Where I am now is I'm trying a aspropDownList
>>
>> I hope I can figure out how to set the padding on the div from a
>> aspropDownList event.
>>
>> How would you do that?

>
> I was understanding you did not want to take a roundtrip to the server.
> If you are taking a roundtrip, programmatically set the padding based on
> what action is being taken. Just have the DIV runat=server and
> programatically set the padding.
>
> If you want every thing to happen on the client side, you cannot merely
> href target the iFrame. you have to use javascript. You can set the
> padding of the DIV in the JavaScript routine. You will then open the
> page using JavaScript in the targeted "window".
>
> Peace and Grace,
>
> --
> Gregory A. Beamer (MVP)
>

When I first posted I had no idea how to proceed.

Thanks for your interest


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Padding BruceM Microsoft Access 2 28th Jul 2009 04:20 PM
Re: Padding BruceM Microsoft Access Reports 2 28th Jul 2009 04:20 PM
Re: Padding Keith Wilby Microsoft Access 0 27th Jul 2009 09:02 AM
Re: Padding Keith Wilby Microsoft Access Reports 0 27th Jul 2009 09:02 AM
padding ? =?Utf-8?B?dmJhc3RhcnRlcg==?= Microsoft Excel Misc 2 7th Mar 2006 12:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:01 AM.