Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: Printing from an asp.net web application
Started by dmcghee at 10-08-2007 18:49. Topic has 1 replies.

Print Search « Previous Thread Next Thread »
  10-08-2007, 18:49
dmcghee is not online. Last active: 10/8/2007 10:33:00 PM dmcghee

Not Ranked
Joined on 12-27-2006
Posts 1
Printing from an asp.net web application
Reply Quote

Help,

Has anyone been able to print from a web application? More specifically convert a .Doc file to a Image (.Tiff) file from a web application.  I've created a desktop application which works just fine.  However the same exact code which executes in the desktop app fails in a web enviornment.  I've added the ASPNET user to my print driver and associated dlls giving it full access. I've also added identity impersonate = "true" in my web config file. 

I'm at a loss of ideas, so anyone's help would be greatly appreciated.

Here's a snippit of code from my method.

'unlock eprint

eprint.UnlockSupport(LPEPCLib.SupportLockConstants.SUPPORT_GENERAL, L_KEY_EPRINT)

'Make sure support is unlocked...

If eprint.IsSupportLocked(LPEPCLib.SupportLockConstants.SUPPORT_GENERAL) Then

Return False

End If

Try

'Start configuring the save options by creating the eprint save object

Dim m_multisaveoptions As New LPEPCLib.EpnMultiSaveOptions

eprint.GetPrinterSaveOptions(sPrinterName, m_multisaveoptions)

m_multisaveoptions.UseSave = True

m_multisaveoptions.SaveElementsCount = 1

With m_multisaveoptions.PrinterSaveOptions(0)

.SaveOptions.DocumentOptions.MultiPageFile = True

.SaveOptions.DocumentType = LPEPCLib.DocumentTypeConstants.FT_SAVE_TYPE_RASTER

.SaveOptions.Format = LPEPCLib.ePrintFileConstants.FILE_TIF

.SaveOptions.RasterOptions.BitsPerPixel = 4

.SaveOptions.RasterOptions.QFactor = 3

.SaveOptions.RasterOptions.MultiPageFile = True

.SaveOptions.RasterOptions.UseFileSize = True

.SaveOptions.RasterOptions.Passes = 2

End With

'save the saveoptions object to eprint

eprint.EnableShowUIEvent(sPrinterName) = True

'to be revised with dynamic letter name

m_multisaveoptions.PrinterSaveOptions(0).SaveOptions.FileName = 'path of output file is declared here

eprint.SetPrinterSaveOptions(sPrinterName, m_multisaveoptions)

eprint.StartDocumentConversion(sPrinterName, 0)

MyConvertDoc(outputfile) 'This is a call to another method which just invokes the printer.

'this method should process the print jobs

eprint.EndDocumentConversion(sPrinterName, 0)

'Next

lblStatus.Text = "Finished!"

Catch ex As Exception

End Try


   Report 
  10-09-2007, 3:03
Qasem Lubani is not online. Last active: 8/27/2008 3:13:14 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,034
Re: Printing from an asp.net web application
Reply Quote

I have not tried using ePrint in a web application before so I'm not sure if the process will succeed.

I would like to test the issue here. Can you create a small working project that shows the issue and I will look at it for you. You can either post the project here or send it to support@leadtools.com.

If you decide to send the files, please put them in a ZIP or RAR file first.


Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
Post
LEAD Support Fo... » Developer » Printing » Re: Printing from an asp.net web application

Powered by Community Server, by Telligent Systems