Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

how to implement preview for autocad file
rijeshtk
#1 Posted : Thursday, 12 January 2012 4:23:10 AM(UTC)
Rank: Member

Joined: 12/01/2012(UTC)
Posts: 5
Location: India

hai Roger,
when I tried to view .dwg files it showing a message like “Your browser cannot display this media object, but you can download it by clicking the download link in the toolbar.”
would you please help me to implement preview for .dwg files.(I want to view it as PDFs file preview).
Roger Martin
#2 Posted : Thursday, 12 January 2012 8:30:53 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

I don't know if dwg files will render in a browser as easily as pdf files, but if you want to try, run this SQL to insert a browser template to handle dwg files:

Code:
INSERT INTO [gs_BrowserTemplate] ([MimeType],[BrowserId],[HtmlTemplate],[ScriptTemplate])
VALUES ('image/vnd.dwg', 'default','<p><a href="{MediaObjectUrl}">Enlarge DWG to fit browser window</a></p><iframe src="{MediaObjectUrl}" frameborder="0" style="width:680px;height:600px;border:1px solid #000;"></iframe>', '')


Then restart the IIS application pool to purge the cache and view a dwg file in the gallery. The file will be set as the source of an iframe, which is the same thing GSP does with pdf files.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rijeshtk
#3 Posted : Friday, 13 January 2012 12:48:38 AM(UTC)
Rank: Member

Joined: 12/01/2012(UTC)
Posts: 5
Location: India

Hai Roger,
I run the SQL but still it showing the same.
Roger Martin
#4 Posted : Friday, 13 January 2012 8:31:05 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Did you recycle the app pool to clear the cache?
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rijeshtk
#5 Posted : Saturday, 14 January 2012 4:05:41 AM(UTC)
Rank: Member

Joined: 12/01/2012(UTC)
Posts: 5
Location: India

Hello Roger,
I am very thankful for your support.
Yes, I did the same, but still it showing the same message.

Previously you mentioned that rendering a DWG file in a browser is not easy as pdf files, so I had done some experiments and research on internet and explored some interesting facts and results. If we integrate the below solution into GSP application, I thought it might be helpful for gallery server community.

Following are the ways to achieve our goal

WAY 1.
Displaying DWG Files using JAVA API, here I am providing the links for your reference:
1. http://www.cadviewer.com/
2. http://www.cadviewer.com...r/admin_help/index.html
Now! I would like to request you to check the above links and provide me your final feedbacks and instructions, so that I can integrate the API into GSP Codes. If it is not possible through my end then please try to integrate from your side.

See the demo here “http://www.cadviewer.com/cv-pro/CADViewer.html"(we have to wait for 20 to 25 sec for loading the image).

STEPS TO INTIGRATE JAVA API
1.CADViewer software has been installed on your Web server,
2.Creating the Web page (or pages) that offer the CADViewer to site visitors
3.Entering the Java applet code and parameters on these pages
Roger Martin
#6 Posted : Monday, 16 January 2012 9:45:43 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

I think your suggested approach will probably work, but unfortunately I do not have the time to dig into this. The Admin Guide has info about creating your own HTML templates for custom tasks like this, so please take a look at that.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rijeshtk
#7 Posted : Monday, 16 January 2012 11:12:56 PM(UTC)
Rank: Member

Joined: 12/01/2012(UTC)
Posts: 5
Location: India

Hi Roger,

your reply is very helpful to us. I am very willing to work in this issue and if you give me a chance to do some modifications into your code so that i can contribute little bit into GSP community, on your behalf.
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.