p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   .NET Framework 1.x (http://p2p.wrox.com/forumdisplay.php?f=203)
-   -   implementing indesign files in asp.net (http://p2p.wrox.com/showthread.php?t=62966)

gopsy_25 October 17th, 2007 10:21 AM

implementing indesign files in asp.net
 
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.

In this i am using Adobe Indesign CS2 trial version.
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.PD FExportPresets.LastItem(),InDesign.PDFExportPreset )
objDoc.Export(idExportFormat.idPDFType, cstrOutputFile, False, objInDesign.PDFExportPresets("Press"))

End Sub

End Class


dparsons October 17th, 2007 10:32 AM

Google knows what that error means:
http://www.google.com/search?hl=en&q...+is+denied.%22

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Beginning Visual C# 2008
Professional Search Engine Optimization with ASP.NET
Professional IIS 7 and ASP.NET Integrated Programming
Wrox Blox: Introduction to Google Gears
Wrox Blox: Create Amazing Custom User Interfaces with WPF and .NET 3.0
================================================== =========

Viggneshwar September 23rd, 2009 01:04 PM

For Access Denied Error
 
This error occures when you didnt give permission for indesign in component services from control panel -> Administrative Tools-> Component Services

In that window select the adobe indesign component and select that properties and give user permission then it will works...


All times are GMT -4. The time now is 06:24 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.