| | |
Open PDF files at a certain page
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Mar 2008
Posts: 42
Reputation:
Solved Threads: 0
Hi Prabakar,
What I've found out is GetDesktopWindow() works a bit different in Vista: it does not accept the directory info in the third parameter. So you have to indicate the directory in the fifth parameter. Kind of an ugly solution, as I will have to place the PDF files in the same directory where the reader exe is. Not good, but this is the only solution I could find for the moment.
Thanks very much for your help!!
What I've found out is GetDesktopWindow() works a bit different in Vista: it does not accept the directory info in the third parameter. So you have to indicate the directory in the fifth parameter. Kind of an ugly solution, as I will have to place the PDF files in the same directory where the reader exe is. Not good, but this is the only solution I could find for the moment.
Thanks very much for your help!!
Same directory as the reader? Why not give the full address fo the file?
Like this,
Like this,
c Syntax (Toggle Plain Text)
ShellExecute(NULL, "open", "\"D:\\program files\\Adobe Reader 9.exe\"", "/A page=45 \"C:\\Documents and Settings\\Prabakar\\My Documents\\Downloads\\How to Do Everything _ Ubuntu (McGraw-Hill).pdf\"", NULL, SW_SHOWNORMAL);
That's what I always do, but, it looked like the OP was not satisfied with it.
What if he can't move it from a particular folder? ( happens often when it is a shared computer)
Copying the pdf and pasting it on a specific directory just to make your program work is not a good option
And adding the program to that directory might be irritating. It will be annoying to see a document in my songs folder.
Sometimes we need to use full address, or at least to use environment variables.
What if he can't move it from a particular folder? ( happens often when it is a shared computer)
Copying the pdf and pasting it on a specific directory just to make your program work is not a good option
And adding the program to that directory might be irritating. It will be annoying to see a document in my songs folder.
Sometimes we need to use full address, or at least to use environment variables.
Last edited by Prabakar; Feb 14th, 2009 at 5:45 am.
![]() |
Similar Threads
- Read number of pages in PDF files (Python)
- Help with make CD with more then 400 .pdf? (Computer Science)
- how to count pages of .pdf files? (VB.NET)
- Internet Explorer v6 - Blank Page (Viruses, Spyware and other Nasties)
- Cant open certain links in a web page... (Viruses, Spyware and other Nasties)
- problem with dialogbox save/open/cancel jsp in IE (JSP)
- How to write the new line existing pdf file using php (PHP)
- Default program to open *.pdf (Mac Software)
Other Threads in the C Forum
- Previous Thread: Dynamicaly defining a structure in C
- Next Thread: What method is better?
Views: 2148 | Replies: 13
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays bash binarysearch centimeter char convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory drawing dynamic executable fflush file fork frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hardware highest homework i/o inches infiniteloop initialization interest km lazy linked linkedlist linux linuxsegmentationfault list locate logical_drives match matrix meter microsoft motherboard multi mysql open opendocumentformat opensource openwebfoundation owf pattern pdf performance pointer pointers posix power problem probleminc program programming pyramidusingturboccodes read recursion recv repetition scanf scheduling segmentationfault send shape socketprograming spoonfeeding stack standard strchr string strings structures student suggestions system systemcall test testautomation unix user voidmain() wab win32 win32api windows.h





