Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9098813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:27:11+00:00 2026-06-17T00:27:11+00:00

In my website I am using ABCpdf to generate a pdf dynamically from HTML.

  • 0

In my website I am using ABCpdf to generate a pdf dynamically from HTML.
I have two conditions:

  1. User is logged in, is shown page one and drawn page one as pdf
  2. User is not logged in shown page two and drawn page two as pdf

My code is like this:

 string url = HttpContext.Current.Request.Url.AbsoluteUri;
        Doc theDoc = new Doc();
        theDoc.AddImageUrl(url);
        theDoc.Save(HttpContext.Current.Server.MapPath("~/media/pdf/1212.pdf"));
        theDoc.Clear();

Now the problem is like this I am able to see the first page when user is logged in but when the PDF is drawn it contains not logged in page (the second page).

I am using inproc session mode to store my login details. As far as I understood even if the user is logged in, when this code executes the server returns not logged in page the request to get the HTML to render the PDF doesnt carry over the session, but creates a new one.

Can any one give me any clue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T00:27:12+00:00Added an answer on June 17, 2026 at 12:27 am

    The reason might be that the way ABCPdf works when rendering HTML is that that it is not the user who access the page to render, but the server and the server wont have the users login session, it will access the page as if you just typed the URL in the browser on the server. So when you access the page via ABCpdf it will act as though the user is not logged in.

    The way I have overcome this issue in the past is to pass a encrypted query string pram to the the page and check for this on the PDF render page and change the displayed result based on that pram value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On our website using Joomla we have duplicate URLs for the same page being
I am developing a website using the Model-View-Controller structure. In my html, I have
I am creating a website using JavaScript/ASP.NET/C#/CSS/HTML/Compact SQL server. I have the majority of
I have developed a website using Razor (Microsoft WebMatrix) and now I want to
I have made a website using( Asp.net, c# ) and its content in English
I am building a website using php and mysql.I have a login that is
I'm building my website using only html and css. I've read several tutorials and
I have created a website using vbulletin i have installed CMS and BLOG modules
I have a website using ASP with an MS Access DB back-end for storing
I have a website using asp.net mvc in which I need to embed a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.