The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: trodon on December 18, 2006, 06:28:03 PM

Title: Opening PDF in Masm
Post by: trodon on December 18, 2006, 06:28:03 PM
I just searched litle about pdf files and asm, and cannot find nothing about that
is anyone even try to create simple pdf reader?
and can anyone provide me with some example sources, or hints,documents etc.?
Title: Re: Opening PDF in Masm
Post by: pro3carp3 on December 18, 2006, 06:44:48 PM
You can find a pdf reference here (1200+ pages):

http://partners.adobe.com/public/developer/pdf/index_reference.html

Title: Re: Opening PDF in Masm
Post by: ramguru on December 18, 2006, 06:47:07 PM
I think it's just too complex thing to implement. , it requires damn hard work (image rendering,  jpeg2000, scaling, vector graphics etc).. 
Title: Re: Opening PDF in Masm
Post by: Tedd on December 18, 2006, 06:58:50 PM
ShellExecute("acrord32 <pdf-file>")

..with correct parameters, etc :wink
Title: Re: Opening PDF in Masm
Post by: ramguru on December 18, 2006, 07:43:20 PM
Quote from: Tedd on December 18, 2006, 06:58:50 PM
ShellExecute("acrord32 <pdf-file>")

..with correct parameters, etc :wink

actually:

    fn ShellExecute, hWnd, "open", "C:\help\helpme.pdf", 0, 0, SW_SHOWNORMAL

Meaning no need for acrord32, and pass full path
Title: Re: Opening PDF in Masm
Post by: trodon on December 18, 2006, 09:44:18 PM
Anybodu tryed to make something?
is there any example sources in asm?
Title: Re: Opening PDF in Masm
Post by: ecube on December 19, 2006, 02:50:39 AM
They're c libraries out there that can work with pdf files, sure it wouldn't be that difficult to convert to masm.
Title: Re: Opening PDF in Masm
Post by: noxidsoft on May 02, 2010, 08:37:36 AM
Quote from: ramguru on December 18, 2006, 07:43:20 PM
actually:

    fn ShellExecute, hWnd, "open", "C:\help\helpme.pdf", 0, 0, SW_SHOWNORMAL

Meaning no need for acrord32, and pass full path

Hey, I am looking to open PDF files in my program and collect mouse co-ords from clicking on it, do you know if anyone has done this yet?
Title: Re: Opening PDF in Masm
Post by: Farabi on May 02, 2010, 11:40:25 AM
Quote from: noxidsoft on May 02, 2010, 08:37:36 AM
Quote from: ramguru on December 18, 2006, 07:43:20 PM
actually:

    fn ShellExecute, hWnd, "open", "C:\help\helpme.pdf", 0, 0, SW_SHOWNORMAL

Meaning no need for acrord32, and pass full path

Hey, I am looking to open PDF files in my program and collect mouse co-ords from clicking on it, do you know if anyone has done this yet?

Just like E^Cube said, you will need a third party library.
Title: Re: Opening PDF in Masm
Post by: sysfce2 on May 03, 2010, 07:12:26 PM
Quote from: noxidsoft on May 02, 2010, 08:37:36 AM

Hey, I am looking to open PDF files in my program and collect mouse co-ords from clicking on it, do you know if anyone has done this yet?

Do some searching for COM and OLE.  It is pretty challenging stuff though.
Title: Re: Opening PDF in Masm
Post by: donkey on May 03, 2010, 08:02:24 PM
PDF document format (Portable Document Format) is a language based format that inherits from Postscript, it contains the instructions to render the document. You would first have to render the PDF document to a window then track the mouse position relative to Postscript tags in the script, not a simple task but obviously something that can be done with a bit of research. Most PDF viewers are fairly large and complex, you might try Sumatra which is a light weight open source viewer for examples of rendering PDF files.

http://blog.kowalczyk.info/software/sumatrapdf/index.html

Edgar