how Export documents to image using JavaScript

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

arjunaugust
User
Posts: 7
Joined: Fri Jul 10, 2009 3:54 am

how Export documents to image using JavaScript

Post by arjunaugust »

I am trying to export document to Image format. These are my code:

var activeDocId = document.all.PXCV.Property("Documents.Active", 0);
document.all.PXCV.SetProperty("Export.Image.RangeType", "Exactly", 0);
document.all.PXCV.SetProperty("Export.Image.Resolution","72", 0);
document.all.PXCV.SetProperty("Export.Image.Type", "TIFF", 0);
document.all.PXCV.SetProperty("Export.Image.Mode", "AllToOneMultiImage", 0);
document.all.PXCV.SetProperty("Export.Image.Background", -1, 0);
document.all.PXCV.SetProperty("Export.Image.RangeReverse", 0, 0);
document.all.PXCV.SetProperty("Export.Image.RangeText", "10-14", 0); //Use for specific parge range.
document.all.PXCV.SetProperty("Export.Image.FolderName", "C:\Users\arjun_kumar\Desktop\New Folder", 0);
document.all.PXCV.SetProperty("Export.Image.FileName", "image_<File Name>_<Page Number>", 0);
document.all.PXCV.ExportDocument(activeDocId, 0);

It executes successfully but not getting the output in specified folder. Is anything wrong in this code? Please help me, to solve this problem.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: how Export documents to image using JavaScript

Post by Ivan - Tracker Software »

Are you executing this script into JS Console?
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
arjunaugust
User
Posts: 7
Joined: Fri Jul 10, 2009 3:54 am

Re: how Export documents to image using JavaScript

Post by arjunaugust »

No, I am using .net console.
And i have solved my problem.
Thanks for your interests.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: how Export documents to image using JavaScript

Post by Corwin - Tracker Sup »

Hi, arjunaugust.
I have tried your code - all works fine. Only problems that in JS instead of
"C:\Users\arjun_kumar\Desktop\New Folder"
you should use
"C:\\Users\\arjun_kumar\\Desktop\\New Folder".
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: how Export documents to image using JavaScript

Post by John - Tracker Supp »

Also - if you are using the Develolpers kit - you should be posting here please :

https://forum.pdf-xchange.com/ ... m.php?f=36

thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com