Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

using indesign files in asp.net

New Here ,
Oct 19, 2007 Oct 19, 2007
hi friends,

I am building an application in asp.net in which my task is to create a pdf file by using the Adobe Indesign CS2 in asp.net.

I am using the code which is found from the net but on running this is given an error That:

"System.UnauthorizedAccessException: Access is denied."

now tell me about this error and what i have to do to achieve this task. this is really urgent one

atleast reply if u don't know the answer also please.......

Here's my code::

Imports System
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
' Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports InDesign

Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


Dim cstrInddFile As String = Server.MapPath("~/Archieve/yourstory_backcover1.indd")
Dim cstrXMLFile As String = Server.MapPath("~/Archieve/xml1.xml")
Dim cstrOutputFile As String = Server.MapPath("~/Archieve/out.pdf")

Dim indAppType As Type = Type.GetTypeFromProgID("InDesign.Application")
Dim objInDesign As InDesign.Application = DirectCast(Activator.CreateInstance(indAppType, True), InDesign.Application)
Dim objDoc As InDesign.Document = DirectCast(objInDesign.Open(cstrInddFile, False), InDesign.Document)

objDoc.ImportXML(cstrXMLFile)

Dim objPreset As InDesign.PDFExportPreset=DirectCast(objInDesign.PDFExportPresets.LastItem(),InDesign.PDFExportPreset)
objDoc.Export(idExportFormat.idPDFType, cstrOutputFile, False, objInDesign.PDFExportPresets("Press"))

End Sub

End Class
2.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 21, 2007 Nov 21, 2007
Hi Gopal,

this is the dcom config related sequirty related problem.. you need to set access of security...

by command run -> dcomcnfg and find its related dcom and give it ot full access... and also set it to interative user ...

Regards,
Amit
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 07, 2009 Dec 07, 2009

Hi.  I know this is an old thread, but I'm trying to do the same thing the original poster is doing, and I'm wondering what reference has to be added to the .Net project for the "Imports InDesign" line to work?  Can this be done with the client version of InDesign so I can generate a PDF file from an ASP.Net website?

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 20, 2010 Jun 20, 2010
LATEST

Hi did you get the solution. I am not able to run the site on IIS. it's working fine in Asp.net development enviorment.

please reply if you had fixed the issue.

Thanks,

Sahu Vijay

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines