pdf xcange viewer in asp.net

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

sivakl2001
User
Posts: 10
Joined: Tue Oct 19, 2010 5:16 am

pdf xcange viewer in asp.net

Post by sivakl2001 »

hi can i use the pdf xchange viewer in my asp.net website
if i open windows application xchange tools appear on toolbox
if i open aspx page i couldn't find xchange tool on toolbox
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: pdf xcange viewer in asp.net

Post by Corwin - Tracker Sup »

Hi,

For Viewer ActiveX, you may find an example at:
"Viewer SDK directory\Examples\WebExamples\ASPNETbasic\"
sivakl2001
User
Posts: 10
Joined: Tue Oct 19, 2010 5:16 am

Re: pdf xcange viewer in asp.net

Post by sivakl2001 »

Hi there is no aspnetExamples in the viewer SDK Directory

C:\Program Files\Tracker Software\PDF-XChange Viewer SDK\Examples

I m using PDF-Xchange Viewer
Version : 2.0.45.0
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: pdf xcange viewer in asp.net

Post by Vasyl - PDF-XChange »

Hi,

Look to the attached archive. We will include web-examples from it to the next build of SDK.
Sorry for misunderstanding...

Note: your existing copy of SDK is too old, you may update it to the latest version (v2.5.0.190).

HTH.
You do not have the required permissions to view the files attached to this post.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
sivakl2001
User
Posts: 10
Joined: Tue Oct 19, 2010 5:16 am

Re: pdf xcange viewer in asp.net

Post by sivakl2001 »

hi if the client does not has pdfXchange viewer how to give the location of the cab file in the ActiveX object in the html
<object id="PDFView" classid="CLSID:FE36F0F3-F082-41B7-9EED-772505A7C054" width="100%" height="90%"></object>

how to show hide thumbunails through javascript

how to fix to width first time loaded

how to give location of the pdf file to open throught javascript
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: pdf xcange viewer in asp.net

Post by Corwin - Tracker Sup »

Hello,

For now we do not provide any cab file for ActiveX.
how to give location of the pdf file to open throught javascript
document.all.PDFView.OpenDocument("your path here", 0, 0, 0);
how to fix to width first time loaded
You can change this by modifying "width" property in "object" tag.
how to show hide thumbunails through javascript
docID = document.all.PDFView.Property("Documents.Active", 0);
document.all.PDFView.SetProperty("Documents[#"+docID+"].View.Panes[\"Thumbnails\"].Visible", 1);

HTH
sivakl2001
User
Posts: 10
Joined: Tue Oct 19, 2010 5:16 am

Re: pdf xcange viewer in asp.net

Post by sivakl2001 »

hi Corwin thank u for ur great help
i need to hide the Print and Export to image button in the thumbulails pane cs of secuity
how to hide this buttons

and i need to show oni following tools in the toolbox

1.Zoom
2.Page Fit
3. Find Text

and i need to disable right click menu on the document
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: pdf xcange viewer in asp.net

Post by Corwin - Tracker Sup »

Hi sivakl2001,

You may use next properties:

Code: Select all

document.all.PDFView.SetProperty("General.DenyAllContextMenus", "true", 0);
- This willl deny all context menus in Viewer

Code: Select all

document.all.PDFView.SetProperty("General.DenyAllExportOperations", "true", 0);
- This will disable export ability

Code: Select all

document.all.PDFView.SetProperty("General.DenyAllPrintOperations", "true", 0);
- This will deny all print operations for all documents.

Also you may be interested in creation of your own toolbar in stand-alone viewer (or your app), export your settings to dat file (using 'Menu->Edit->Export All Settings to Data File' menu-command), and then import this file to your viewer control (using "LoadSettings" function).
sivakl2001
User
Posts: 10
Joined: Tue Oct 19, 2010 5:16 am

Re: pdf xcange viewer in asp.net

Post by sivakl2001 »

Hi Mr.Corwin u r my hero..................
Last question
1. i need to hide the close button in the thumbunails

This is my code
document.all.PDFView.OpenDocument(path, 0, 0, 0);
docID = document.all.PDFView.Property("Documents.Active", 0);
document.all.PDFView.LoadSettings(spath + "FT.dat");
document.all.PDFView.SetProperty("General.DenyAllContextMenus", "true", 0);
document.all.PDFView.SetProperty("General.DenyAllPrintOperations", "true", 0);
document.all.PDFView.SetProperty("General.DenyAllExportOperations", "true", 0);
document.all.PDFView.SetProperty("View.LockAllBars", 1, 0)
Each time i execute this code through the pdf document is downloaded in the My Documents location automatically
how to avoide this

I load the pdf file in the viewer if the page postback the contol automatically close the document and blank
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: pdf xcange viewer in asp.net

Post by Stefan - PDF-XChange »

Hello sivakl2001,

It is Christmas for Corwin and the rest of the dev team today, so I am afraid that we will be able to answer your question on Monday.

Please excuse this delay.

Best,
Stefan
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: pdf xcange viewer in asp.net

Post by Corwin - Tracker Sup »

Hi,

You can specify your own folder for download, by setting "Documents.DownloadFolder" property.
1. i need to hide the close button in the thumbunails
Try to set "View.Locked" property to true.

HTH.
sivakl2001
User
Posts: 10
Joined: Tue Oct 19, 2010 5:16 am

Re: pdf xcange viewer in asp.net

Post by sivakl2001 »

Hi corwin
When i view the pdf file through Xchange Viewer in the Browser("http://localhost/Files/Test/Test.aspx") the Xchange Viewer download the file in the local drive
can i prevent this download
if can't hw to specify the download path last time u replied
You can specify your own folder for download, by setting "Documents.DownloadFolder" property
but i dun know how to set

2. if i use local path like "E:\Test\Test.pdf" the i could see selected Menu Items and Thumbunail bar
but If i use server path like this "http://localhost/Files/Test/Test.aspx"
I could view the file but the Selected Menu Items and Thumbunail bar Hided automatically
Can i cnahge this behaviour

https://sites.google.com/site/sivakltech/xcahngeviewer
Please Help me
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: pdf xcange viewer in asp.net

Post by Corwin - Tracker Sup »

Hello sivakl2001,

I'm afraid, that there is no way to prevent file download to local drive.
You may set folder for download by using this code:

Code: Select all

document.all.PDFView.SetProperty("Documents.DownloadFolder", "E:\Test", 0);
2. if i use local path like "E:\Test\Test.pdf" the i could see selected Menu Items and Thumbunail bar
but If i use server path like this "http://localhost/Files/Test/Test.aspx"
I could view the file but the Selected Menu Items and Thumbunail bar Hided automatically
Do you see menu and thumbnail bar before opening the file?
sivakl2001
User
Posts: 10
Joined: Tue Oct 19, 2010 5:16 am

Re: pdf xcange viewer in asp.net

Post by sivakl2001 »

working cool.............. thanks :D
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: pdf xcange viewer in asp.net

Post by Stefan - PDF-XChange »

Great to hear sivakl2001!

And kudos to Corwin :)

Cheers,
Stefan