?
Solved

automated save of pdf document from iwebbrowser2

Posted on 2004-04-08
5
Medium Priority
?
1,891 Views
Last Modified: 2007-12-19
I'm trying to script a save of a pdf doc inside IE.  It seems difficult.  Iwebbrowser2 does not have any apparent access to the acrobat control inside of it that I can get to.  I have experimented with trying to directly send windows messages to the adobe plugin, to no avail (probably can make it work, but its going to take some digging).

ExecWB looked promising, but if you are viewing a pdf file the save/save as is grayed, consequently failes using iwebbrowser2.  Print will work, but I need to print to a file, and that has proven surprisingly hard (most print to file stuff, does conversion, so it slightly blurs the pdf images).

Any ideas?
0
Comment
Question by:fcovely
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 10

Expert Comment

by:Kavar
ID: 10793602
document.execwb(OLECMDID cmdid,  OLECMDEXECOPT cmdopt, var1, var2)
where cmdid=4 and cmdopt=1
this will prompt the user for the filename to save as...

I included the other viable options, var1 and var2 are required based on what options you select but for what I just specified, both should be null
typedef enum  
{
     OLECMDID_OPEN              = 1,
     OLECMDID_NEW               = 2,
     OLECMDID_SAVE              = 3,
     OLECMDID_SAVEAS            = 4,
     OLECMDID_SAVECOPYAS        = 5,
     OLECMDID_PRINT             = 6,
     OLECMDID_PRINTPREVIEW      = 7,
     OLECMDID_PAGESETUP         = 8,
     OLECMDID_SPELL             = 9,
     OLECMDID_PROPERTIES        = 10,
     OLECMDID_CUT               = 11,
     OLECMDID_COPY              = 12,
     OLECMDID_PASTE             = 13,
     OLECMDID_PASTESPECIAL      = 14,
     OLECMDID_UNDO              = 15,
     OLECMDID_REDO              = 16,
     OLECMDID_SELECTALL         = 17,
     OLECMDID_CLEARSELECTION    = 18,
     OLECMDID_ZOOM              = 19,
     OLECMDID_GETZOOMRANGE      = 20
     OLECMDID_UPDATECOMMANDS    = 21
     OLECMDID_REFRESH           = 22
     OLECMDID_STOP              = 23
     OLECMDID_HIDETOOLBARS      = 24
     OLECMDID_SETPROGRESSMAX    = 25
     OLECMDID_SETPROGRESSPOS    = 26
     OLECMDID_SETPROGRESSTEXT   = 27
     OLECMDID_SETTITLE          = 28
     OLECMDID_SETDOWNLOADSTATE  = 29
     OLECMDID_STOPDOWNLOAD      = 30
} OLECMDID;
 
typedef enum  
{
    OLECMDEXECOPT_DODEFAULT        = 0,
    OLECMDEXECOPT_PROMPTUSER       = 1,
    LECMDEXECOPT_DONTPROMPTUSER    = 2,
    OLECMDEXECOPT_SHOWHELP         = 3
} OLECMDEXECOPT
0
 
LVL 10

Expert Comment

by:Kavar
ID: 10793617
if ExecWB fails, your only option is to open the url IN adobe.  (the IE presented Adobe does not have an object model - that I have found anyway)
0
 

Author Comment

by:fcovely
ID: 10800974
Ok, its worse than what I thought.  With Acrobat 6, if you physically do a file|save in IE, it does a Save Copy in A6.  However, if you send a execWB at it for save copy or save as, its ignored.  If you send a save to execwb, it trys to save it as a web page.  So I conclude adobes implementation of whatever is on the other side of execwb fails, or IE6 is hosed up in that regard.  I solved the problem by actualy sending wm_chars to IE to get to the  physical rendition of f10, 'F', 'S'  {File Save}.

0
 
LVL 2

Accepted Solution

by:
Lunchy earned 0 total points
ID: 10836104
Closed, 500 points refunded.
Lunchy
Friendly Neighbourhood Community Support Moderator
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Six Sigma Control Plans
Introduction to Processes

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question