Welcome Guest Search | Active Topics | Sign In | Register

printfriendly PDF in black and white Options
mieke
Posted: Tuesday, April 2, 2013 9:00:35 AM
Rank: Member
Groups: Member

Joined: 3/19/2013
Posts: 10
Hi,

I use this: idPDF.RenderAsPDF('test.pdf');

The pdf looks exactly like the html-page. But, I would like to present the user a PDF in black and white, so it is more print-friendly. Is that possible? Is it some setting I have to use, or is it possible to disable the stylesheet when the 'renderaspdf' button is clicked? Or is there another way?

thank you,
Mieke
eo_support
Posted: Tuesday, April 2, 2013 9:26:28 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

You can disable CSS but you can't auto convert the contents from color to black white. If you want to disable CSS you can just set your CSS block's visible to false. For example:

Code: HTML/ASPX
<style runat="server" id="styleSheet1">
  ....your css...
</style>

To disable the above CSS block, you can simply do:

Code: C#
styleSheet1.Visible = false;


The basic rule is you do whatever you do as if you were just displaying the page to the screen. So if this is what you do to disable CSS on screen, then this is what you do to disable CSS in the PDF. Obviously there are other possible ways to disable CSS in a web page, but they have nothing to do with the PDF converter at all.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.