Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Sometimes requires temporary admin permissions for rasterizing HTML with images #11344

Closed
togakangaroo opened this issue May 22, 2013 · 1 comment
Labels

Comments

@togakangaroo
Copy link

We experienced this with one of our projects which uses PhantomJs to rasterize Html to a pdf. The website is in Asp.Net Mvc running on IIS 7 (Windows 2008 R2). It shells out to a local copy of phantom using a simple command-line wrapper to launch it in cmd.exe.

What we're seeing is that images in the html will occasionally not be transferred properly to Phantom and will appear blank (and collapsed) in the rasterized output.

The solution seems to be

  • Trigger the rasterization operation - notice the image does not come across.
  • Identify the user (identity) the Application Pool for the site runs under
  • Grant this user Administrator privileges.
  • Recycle, stop, and start the Application Pool.
  • Trigger the rasterization operation again - the image comes across now.
  • Revoke the user's Administrator privileges.
  • Recycle, stop, and start the Application Pool.
  • Trigger the rasterization operation again - the image comes across still.

Our best guess is that Phantom needs to configure a temp directory or something that it requires admin permissions for to pull down certain types of images. Once that has been done once the permissions can be revoked.

Can anyone confirm/deny that is the case or provide any insight at all?

@stale stale bot added the stale label Dec 27, 2019
@stale
Copy link

stale bot commented Dec 30, 2019

Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this as completed Dec 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant