|
Rank: Newbie Groups: Member
Joined: 1/23/2012 Posts: 6
|
Hi, i am using aspx to pdf control. i added the code as suggested ASPXToPDF1.RenderAsPDF(); in my button click event on a page. Clicking button results in null and page gives error Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: type
is there any more things which needs to be written in code?
thanks, varun
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
This looks like a bug. Can you post the detailed stack trace of the error?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 1/23/2012 Posts: 6
|
Hi,
Seems there is a depedency with EO.Pdf.dll. i installed complete web components and was using the print pdf function. then after i kept this dll, it worked out.
also, is it necessary to install complete components or i can just use 2 dll;s in my website? i need to use pdf print function in my site
thanks, varun
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Yes. You do need EO.Pdf.dll. That's the real thing here. Internally ASPXToPDF calls EO.Pdf.dll to do the conversion. Also license wise you ONLY need a license for EO.Pdf. You do NOT need a license for EO.Web.
You do not have to install anything on your server. Just reference and keep both DLLs and that should be sufficient for you.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 1/23/2012 Posts: 6
|
HI,
I am newer using eo.pdf.dll. the product is really cool and works nice. just a simple question,each time when i generate page pdf, button also comes in there, Is there any way where i can remove button coming on pdf before it generates it.
thanks, varun
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Just set the Button's Visible to false before calling RenderToPDF. The idea of ASPXToPDF is that you do whatever to get it shows right in your browser window. Once your page looks right in your browser, you call RenderToPDF to turn it into PDF. So for example, if you need to hide a Button in your browser, you set the Button's Visible to false. Thus you do exactly the same with ASPXToPDF.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 1/23/2012 Posts: 6
|
Hi Yeah, it worked for me. thanks,
Is there any settings for orientation also, like landscape/portrait. i saw size but orientation thing i didnt found though.
thanks again, varun
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You will need to do those directly through HtmlToPdf.Options. You can take a look of EO.Pdf documenation and sample first and if you still have any questions, let us know. Note this part no longer has anything to do with ASPXToPDF.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 1/23/2012 Posts: 6
|
Hi,
I was trying to generate page numbers in pdf generated. i set HtmlToPdf.Options.FirstPageNumber = 1; and HtmlToPdf.Options.StartPageIndex = 1; but page number doesnt comes. i didnt found any setting which sets page number true or false. By default its false and page numbers are not visible in footer.
any ideas what can be done?
thanks, varun
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
These two properties are used together with HtmlToPdf.Options.HeaderHtmlFormat and HtmlToPdf.Options.FooterHtmlFormat. So you have to set those properties first.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 1/23/2012 Posts: 6
|
Hi, Can i have landscape/portrait and size options together? Like i checked how to do landscape via htmltopdf, it was done via size. so will it not over ride the size defined? like if i have 2 settings, one for orientation and other for size.
thanks, varun
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You can't have two settings. You have one setting for each conversion, but you can run multiple conversions with the same PdfDocument object with each conversion having different settings.
Thanks!
|
|