Error Reading PDF

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
arturo_lopesoria
Posts: 31
Joined: Tue Sep 09, 2008 3:05 am
Location: Mexico

Error Reading PDF

Post by arturo_lopesoria »

Hola a Todos / Hello All

Estoy intentando leer PDF con el ejemplo DEMO/ACTIVEX.7
Mi primer intento el ejemplo no trabajo. Tuve que cambiar los paths:

Code: Select all

   Win1.Test.Object:src := "c:\hmg\samples\activex\readme.pdf"
Por este otro:

Code: Select all

   Win1.Test.Object:src := "c:\hmg.3.0.25\samples\activex.7\readme.pdf"
Pero ahora tengo este mensaje:
" File does not begin with %pdf "
Luego de eso se muestra una pantalla como si Readme.PDF estuviera en balnco.

Alguna Idea?
Gracas. Saludos

-------------------------------------------------
Im trying DEMO/ACTIVEX.7 (read PDF)

On first try the example do not do anything . I must to change path for my current hmg:

Code: Select all

   Win1.Test.Object:src := "c:\hmg\samples\activex\readme.pdf"
To This.

Code: Select all

   Win1.Test.Object:src := "c:\hmg.3.0.25\samples\activex.7\readme.pdf"
Bou now I have this runtime message:

" File does not begin with %pdf "

and then Readme.pdf shows as an empty file..

Any Idea?
Regards.
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: Error Reading PDF

Post by Roberto Lopez »

arturo_lopesoria wrote:Hola a Todos / Hello All

Estoy intentando leer PDF con el ejemplo DEMO/ACTIVEX.7
Mi primer intento el ejemplo no trabajo. Tuve que cambiar los paths:

Code: Select all

   Win1.Test.Object:src := "c:\hmg\samples\activex\readme.pdf"
Por este otro:

Code: Select all

   Win1.Test.Object:src := "c:\hmg.3.0.25\samples\activex.7\readme.pdf"
Pero ahora tengo este mensaje:
" File does not begin with %pdf "
Luego de eso se muestra una pantalla como si Readme.PDF estuviera en balnco.

Alguna Idea?
Gracas. Saludos

-------------------------------------------------
Im trying DEMO/ACTIVEX.7 (read PDF)

On first try the example do not do anything . I must to change path for my current hmg:

Code: Select all

   Win1.Test.Object:src := "c:\hmg\samples\activex\readme.pdf"
To This.

Code: Select all

   Win1.Test.Object:src := "c:\hmg.3.0.25\samples\activex.7\readme.pdf"
Bou now I have this runtime message:

" File does not begin with %pdf "

and then Readme.pdf shows as an empty file..

Any Idea?
Regards.
It is working fine here. You must only use the correct full path.

It depends on the location of your HMG installation.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: Error Reading PDF

Post by Roberto Lopez »

Roberto Lopez wrote:
It is working fine here. You must only use the correct full path.

It depends on the location of your HMG installation.

Please, try this modified sample:

Code: Select all

/*
 * HMG - Harbour Win32 GUI library Demo
 *
 * Copyright 2002-2010 Roberto Lopez <mail.box.hmg@gmail.com>
 * http://sites.google.com/site/hmgweb/
 * Activex Sample: Inspired by Freewin Activex inplementation by 
 * Oscar Joel Lira Lira (http://sourceforge.net/projects/freewin).
*/

#include "hmg.ch"

FUNCTION Main()

	DEFINE WINDOW Win1 ;
		AT 0,0 ;
		WIDTH 800 ;
		HEIGHT 500 ;
		TITLE 'HMG ActiveX Support Demo' ;
		MAIN 

		DEFINE MAIN MENU
			POPUP "Test"
				MENUITEM "Open File" ACTION Test()
			END POPUP 			
		END MENU

		DEFINE ACTIVEX Test
			ROW 10
			COL 50
			WIDTH 700  
			HEIGHT 400  
			PROGID "AcroPDF.PDF.1"  
		END ACTIVEX

	END WINDOW

	Center Window Win1

	Activate Window Win1

RETURN NIL

Procedure Test()

	Win1.Test.Object:src := curdrive() + ':\' + curdir() + '\' + 'readme.pdf'

Return
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
arturo_lopesoria
Posts: 31
Joined: Tue Sep 09, 2008 3:05 am
Location: Mexico

Re: Error Reading PDF

Post by arturo_lopesoria »

Thanks Roberto.
I put your code with dinamic full-path consideration, but Problem Persist:

Message :
File does not begin with '%PDF-'.
then the empty screen.
I thing.. probably problem is PDF reader version instaled on my win-wp?

One more Question: What exatly means PROGID "AcroPDF.PDF.1" ? Do It depends on something like a PDF Reader version installed on my Windows System?
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Error Reading PDF

Post by esgici »

Hola Arturo

Perhaps Roberto is off-line for now :(
arturo_lopesoria wrote: ...
Do It depends on something like a PDF Reader version installed on my Windows System?
Most probably yes !

Please take a look : here

Saludos, regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: Error Reading PDF

Post by Roberto Lopez »

arturo_lopesoria wrote:Thanks Roberto.
I put your code with dinamic full-path consideration, but Problem Persist:

Message :
File does not begin with '%PDF-'.
then the empty screen.
I thing.. probably problem is PDF reader version instaled on my win-wp?

One more Question: What exatly means PROGID "AcroPDF.PDF.1" ? Do It depends on something like a PDF Reader version installed on my Windows System?
It is working fine here, please, reinstall Adobe Reader.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply