Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

1 view
Skip to first unread message

Cal Who

unread,
Nov 23, 2009, 3:45:51 PM11/23/09
to
<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

Gregory A. Beamer

unread,
Nov 24, 2009, 12:09:20 PM11/24/09
to
" Cal Who" <CalW...@roadrunner.com> 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! |
*******************************************

Cal Who

unread,
Nov 24, 2009, 2:17:53 PM11/24/09
to

"Gregory A. Beamer" <NoSpamM...@comcast.netNoSpamM> wrote in message
news:Xns9CCD712B...@207.46.248.16...

>" Cal Who" <CalW...@roadrunner.com> 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 asp:DropDownList

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

How would you do that?

Thanks

Cal Who

unread,
Nov 24, 2009, 8:07:10 PM11/24/09
to
I'm using a asp:DropDownList 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


Cal Who

unread,
Nov 25, 2009, 4:38:26 AM11/25/09
to

" Cal Who" <CalW...@roadrunner.com> wrote in message
news:%23F%236y3Hb...@TK2MSFTNGP06.phx.gbl...
Found it. The DropDownList values must be unique!


Gregory A. Beamer

unread,
Nov 25, 2009, 2:40:30 PM11/25/09
to
" Cal Who" <CalW...@roadrunner.com> wrote in
news:ef5TUrTb...@TK2MSFTNGP05.phx.gbl:

> 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 asp:DropDownList
>
> I hope I can figure out how to set the padding on the div from a
> asp:DropDownList 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

Cal Who

unread,
Nov 25, 2009, 5:50:59 PM11/25/09
to

"Gregory A. Beamer" <NoSpamM...@comcast.netNoSpamM> wrote in message
news:Xns9CCE8ACC...@207.46.248.16...

>" Cal Who" <CalW...@roadrunner.com> wrote in
> news:ef5TUrTb...@TK2MSFTNGP05.phx.gbl:
>
>> 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 asp:DropDownList
>>
>> I hope I can figure out how to set the padding on the div from a
>> asp:DropDownList 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


0 new messages