Html2Pdf.exe hangs in TaskManager and pdf generation takes time in hosted server - html-to-pdf

I'm using Spire.PDF to convert html into pdf.
I have created a .net core 3.1 web application to convert html string into PDF. All working fine on my local machine as well as in the 64 bit server (Hosted in IIS). It just two pages of pdf.
But in the server it always has multiple Html2Pdf.exe in task manager and the converting process is very slow.
I could not find any reason for this. So I requested a trace from IT department when generating the pdf and saw a lot of no successful results. Please take a look at the attached screen shots and advise me what needs to be done to prevent this.

Related

How to get serverside file uploading progress in Perfect

I'm trying to create a web page using Perfect(perfect.org), Where users will browse and upload files. Can anyone tell me how can I get the progress of file upload?
perfect.org-fileUploads
Refer above link and Do as-usual concept following in HTML-JS-PHP or HTML-JS-JSP or other programming
In other words
you can receive response status in percentage from server-side and display it to client or put loder while uploading the file
Thank you
Before an official solution released from PerfectlySoft Inc. for this feature request, you could try splitting the file into small pieces and upload them one by one, then merge them back to the server - since there is no such an industrial standard to apply, all other web servers either provide different solutions or simply stay away from it.

Alfresco PDF thumbnail previews unreadable

Not sure this is the right stackexchange site but seems to be the place with the most question about Alfresco I can find so here goes.
Have Alfresco Community Edition 4.2.d installed on a RHEL5 64bit box (mainly default install bar using MySQL as a database locally). Uploading PDFs to the documentLibrary is fine and thumbnail previews and flash previews are generating. If the PDF has been processed by ABBYY OCR (which we have running on a separate server and is used to OCR scanned PDFs) then the flash preview generates fine but the thumbnail is incredibly dark and looks as if it has been attacked by a can of spray paint.
I initially thought it could be a ghostscript issue but have updated that to 9.14 and still getting this issue. I have also tried playing around with ImageMagik but I can't get a nice clear thumbnail to generate. I am guessing it is a switch in the convert command that Alfresco is using but I am struggling to work out a combination of switches that will work and then where Alfresco would store these parameters. Or indeed what switches are currently being used.
I was wondering if anyone had seen this behaviour before with ImageMagik previews in Alfresco 4.2.d? It seems something unique to PDFs that have been through the OCR process so I am guessing I will need to create a separate transformation for them at a later stage.
EDIT: So it was suggested that a later version of ImageMagick and GS should resolve it. I have therefore installed GS 9.14 and IM 6.8.9-0 (both compiled form source). Running the following from a command line:
convert /root/test1.pdf[0] /root/test1.png
results in a crystal clear image thumbnail preview. Thinking I was on to a winner I have amended the following lines in alfresco-global.properties to point to the system location of GS and IM:
img.root=/usr
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
img.gslib = /usr/local/share/ghostscript/9.14/lib/
and alfresco loads. However the thumbnail preview generated by Alfresco using the new version of IM and GS does not result in nice clean previews.
I am guessing that Alfresco is passing some command line switch during the conversion that is undoing the good work of the later versions of these programs. Does anyone know where the switches for thumbnail creation might be stored in Alfresco?
I guess it's related to transparency and default background black. I didn't find an easy way to add the required parameters to the script except to register a new transformer supporting more parameters like:
-fill white -opaque none

How to present static file results that are generated at different time to client in play 2?

I am writing a web service using play 2.0 in scala.
After getting client's configuration parameters, then the web service will take a while to generate some files. (Note: some files can be short, some other files can take long).
I figured out how to get client's configurations and trigger my computation,
now I need to present the generated files to client side at the end of the session.
So questions are:
How to present the files to client?
I'm thinking about returning a static folder link to client, so that they can go into the folder to
see further what files are there, and so when clicking on the files, the details of the files can be shown, either jpg or text.
But how?
How to not to block client during the generation of the files?
For example, client can still click on the files that are available at that moment.
Then here comes the third question:
How to let the client side know that the long-time computation file is available and listed in the folder?
I'm pretty new to web application, thanks for any suggestion, advice, or little examples are greatly appreciated too!
I would create a web interface to show the created files to your clients and create a background job to for the long computation process. You can create a wait page where a javascript check if the file is created.

Using image resizer in crystal reports

Anyone know how or why the ImageResizer will not work in crystal reports?
If you paste the URL
xxxx.jpg.ashx?width=50 into a browser, works great.
The exact same path shows nothing when used as a image location in crystal reports (Remove the .ashx?width=50 and it immediately works again). So it's as if the image resizer is unable to execute when called from the crystal reports viewer? (I do not understand why since we have verified that any user, even without being authenticated, can reach the path through a browser)
Crystal Reports 2008, Version 12.2.0.290
In terms of diagnosing the issue, in short involving the image resizer process (by including the .ashx?width=50 on the end of the URL) is the only thing that prevents the image from showing. And this only occurs in crystal. Browsers handle the URL just fine.
UPDATE : Testing without the .ashx also proved to not work. The ?width=50 after .jpg is enough for crystal to just display a blank. (No errors, just no image)
UPDATE : Testing using &format=png or &format=jpg also did not work (Blank in crystal, works perfect in browser)
FINAL UPDATE : We ended up placing the image re-sizer software on a stand alone (what used to be a file manager box) away from our web.config, permissions, and web server and then crystal started rendering the images just fine. So we never really figured out WHY crystal could not render the images when the re-sizer software was loaded on our IIS web server\intranet.....(possibly due to integrated windows authentication turned on even though we granted access to the folder the images were in) ......but it did start working just fine when we bypassed all of that stuff.
I suggest trying an alternate URL syntax to determine if Crystal Reports is simply allergic to query strings.
Try the FolderResizeSyntax plugin "folder/resize(50,50)/image.jpg
Try the CloudFront plugin: "folder/image.jpg;width=50"
FINAL UPDATE : We ended up placing the image re-sizer software on a stand alone (what used to be a file manager box) away from our web.config, permissions, and web server and then crystal started rendering the images just fine. So we never really figured out WHY crystal could not render the images when the re-sizer software was loaded on our IIS web server\intranet.....(possibly due to integrated windows authentication turned on even though we granted access to the folder the images were in) ......but it did start working just fine when we bypassed all of that stuff.

IFilter Textreader not working within IIS/ASP.NET?

I need to extract text from DOC, DOCX and PDF files.
I've downloaded two Windows Forms Application demo projects, one here:
http://www.codeproject.com/Articles/31944/Implementing-a-TextReader-to-extract-various-files
the other here:
http://www.codeproject.com/Articles/13391/Using-IFilter-in-C
Both are working just fine within the windows Form Application. But both do not work within my ASP.NET MVC2 application, it gets saying it can't find a filter or throws a method not implemented exception.
Could this be a security error? Like ASP.NET cannot reach the various IFilter's installed on the machine.
DOC files are working by the way.
All is x64 and the files are first saved on disk and have the proper permissions set.
Any help is appreciated.
edit:
PDF error is: The method or operation is not implemented.
DOCX error is: No filter defined
Windows Forms Application both are working. I'm considering getting the output from a Windows Forms/Console application.