You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Pedro Serralha <pe...@elegedata.com> on 2014/02/06 13:24:50 UTC

Problems openning PDF file using navigateToURL

Greetings my friends

 

In our Webapplication we have some buttons that open an PDF file.

We are using the navigateToURL method.

 

The problem is that we are using bookmarks within the pdf and to open an
link and point to an bookmark the URL used is something like

 

http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChan
geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal

 

As you see, it accepts non standard characters on the URL as spaces and ç
and õ. 

The link works with this characters if you put it directly on the browser,
but when I open it using the method above mentioned it corrects the invalid
characters.... and the bookmark pointer stops working.

 

http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChan
geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal

 

 

So what I ask is, is there a way to open a link without these correction?

 

Thanks

 

Cumprimentos / Best Regards

Pedro Serralha

 


Re: Problems openning PDF file using navigateToURL

Posted by Marcus Fritze <ma...@googlemail.com>.
This may help you: http://stackoverflow.com/questions/3487479/url-encode-variable-in-as3

Am 06.02.2014 um 13:24 schrieb Pedro Serralha <pe...@elegedata.com>:

> Greetings my friends
> 
> 
> 
> In our Webapplication we have some buttons that open an PDF file.
> 
> We are using the navigateToURL method.
> 
> 
> 
> The problem is that we are using bookmarks within the pdf and to open an
> link and point to an bookmark the URL used is something like
> 
> 
> 
> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChan
> geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal
> 
> 
> 
> As you see, it accepts non standard characters on the URL as spaces and ç
> and õ. 
> 
> The link works with this characters if you put it directly on the browser,
> but when I open it using the method above mentioned it corrects the invalid
> characters.... and the bookmark pointer stops working.
> 
> 
> 
> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChan
> geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal
> 
> 
> 
> 
> 
> So what I ask is, is there a way to open a link without these correction?
> 
> 
> 
> Thanks
> 
> 
> 
> Cumprimentos / Best Regards
> 
> Pedro Serralha
> 
> 
> 


RE: Problems openning PDF file using navigateToURL

Posted by Pedro Serralha <pe...@elegedata.com>.
I've done some tests, based on the findings that you guys did, and for
example disabling the pdf plugin of the chrome and activating the Fox It
Reader viewer and checked that it doesn't support the unencoded url... Based
on this and on your findings it's better to assume that using this method to
point something on an PDF isn't stable on most platforms, so we will abandon
this way and use just the pagenumber way, this one worked on every tests
I've made and it's impossible to have strange characters :)

 

Thank you for your efforts guys

 

Cumprimentos / Best Regards

Pedro Serralha

 

From: Marcus Fritze [mailto:marcus.fritze@googlemail.com] 
Sent: quinta-feira, 6 de Fevereiro de 2014 19:06
To: users@flex.apache.org
Subject: Re: Problems openning PDF file using navigateToURL

 

I see PDFs in Chrome here on my mac. Have you disabled Chrome PDF Viewer in
chrome://plugins/ ? 

 

The URL is working when the URL has the Space and NOT the %20 in the URL.
Actually, when I clear my Browser cache,

Chrome shows only the first page. But when I load it the second time, it
jumps to page 7.

 

Am 06.02.2014 um 19:46 schrieb Julio Carneiro <ju...@4ctv.com>:





I just tried that url here in Safari and the URL does get escaped by Safari,
turning it into:
http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChan
geLog.pdf#pagemode=bookmarks
<http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações%20no%20Portal>
&nameddest=Alterações%20no%20Portal

But, although Safari, IE and Firefox do display the PDF, neither go to page
7. Safari & IE do display the bookmarks, but FF does not.

If I try the same URL on Chrome (mac or win) it simply downloads the PDF,
chrome does not display the pdf.

So, if Marcus test does work, then navigateTuURL seems to do a better job
than the browser.

hth
julio


On Feb 6, 2014, at 4:29 PM, Marcus Fritze <ma...@googlemail.com>
wrote:




This example works without any problems for me and it shows me the PDF on
page 7 (Altera... no Portal):

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
 
xmlns:s="library://ns.adobe.com/flex/spark" 
 
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
            <s:layout>
                        <s:VerticalLayout horizontalAlign="center"
verticalAlign="middle"/>
            </s:layout>
            <fx:Declarations>
                        <!-- Platzieren Sie nichtvisuelle Elemente (z. B.
Dienste, Wertobjekte) hier -->
            </fx:Declarations>
            
            <fx:Script>
                        <![CDATA[
                                   import flash.net.navigateToURL;
                                   
                                   private function openPDF():void
                                   {
                                               var strURL:String =
"http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
ngeLog.pdf#pagemode=bookmarks
<http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal>
&nameddest=Alterações no Portal";
                                               
                                               var urlReq:URLRequest= new
URLRequest(strURL);
                                               
 
navigateToURL(urlReq,"_blank");
                                   }
                                   
                        ]]>
            </fx:Script>
            
            <s:Button label="open pdf" click="{openPDF()}"/>
            
</s:Application>



Am 06.02.2014 um 17:43 schrieb Pedro Serralha
<pe...@elegedata.com>:




My code

                        var strURL:String =
"http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
<http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
%0bngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal> 
ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal"
                                               
                                   var urlReq:URLRequest= new
URLRequest(strURL)
                                   
                                   navigateToURL(urlReq,"_blank");

Cumprimentos / Best Regards
Pedro Serralha

-----Original Message-----
From: Alex Harui [mailto:aharui@adobe.com] 
Sent: quinta-feira, 6 de Fevereiro de 2014 16:34
To: users@flex.apache.org
Subject: Re: Problems openning PDF file using navigateToURL

What are you actually passing into the URLRequest parameter?

On 2/6/14 8:07 AM, "Pedro Serralha" <pe...@elegedata.com> wrote:




Marcus thank you for replying.

But for what I understood, on both links you've sent. They tell how to 
encode parameters on URL and the escape() is to convert a string to a 
URL-encoded format, which is what I don't want.



As you can see

http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
SCh
an
geLog.pdf#pagemode=bookmarks
<http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicI
<http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicI%0bMS
C%0bha%0bngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal> 
MSC
ha
ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal> 
&nameddest=Alterações no Portal



The thing is that the last part of the URL 
#pagemode=bookmarks&nameddest=Alterações no Portal is something 
specific to the PDF readers, and  I don't think it can be considered an 
normal http parameter. I don't know why the reader doesn't decode 
correctly the encoded characters, but only if I could pass the pure 
string without any encoding/ treatment, the thing would work.



Btw still using 4.6sdk on these project.



Cumprimentos / Best Regards

Pedro Serralha



From: Marcus Fritze [mailto:marcus.fritze@googlemail.com]
Sent: quinta-feira, 6 de Fevereiro de 2014 12:34
To: users@flex.apache.org
Subject: Re: Problems openning PDF file using navigateToURL



or maybe easier this:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/pack
age
.h
tml#escape()



Am 06.02.2014 um 13:24 schrieb Pedro Serralha
<pe...@elegedata.com>:





Greetings my friends



In our Webapplication we have some buttons that open an PDF file.

We are using the navigateToURL method.



The problem is that we are using bookmarks within the pdf and to open 
an link and point to an bookmark the URL used is something like



http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
SCh
an
geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal



As you see, it accepts non standard characters on the URL as spaces and 
ç and õ.

The link works with this characters if you put it directly on the 
browser, but when I open it using the method above mentioned it 
corrects the invalid characters.... and the bookmark pointer stops 
working.



http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
SCh
an
geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal





So what I ask is, is there a way to open a link without these correction?



Thanks



Cumprimentos / Best Regards

Pedro Serralha







 

 


--
Julio Carneiro



 


Re: Problems openning PDF file using navigateToURL

Posted by Marcus Fritze <ma...@googlemail.com>.
I see PDFs in Chrome here on my mac. Have you disabled Chrome PDF Viewer in chrome://plugins/ ? 

The URL is working when the URL has the Space and NOT the %20 in the URL. Actually, when I clear my Browser cache,
Chrome shows only the first page. But when I load it the second time, it jumps to page 7.

Am 06.02.2014 um 19:46 schrieb Julio Carneiro <ju...@4ctv.com>:

> I just tried that url here in Safari and the URL does get escaped by Safari, turning it into:
> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChangeLog.pdf#pagemode=bookmarks&nameddest=Alterações%20no%20Portal
> 
> But, although Safari, IE and Firefox do display the PDF, neither go to page 7. Safari & IE do display the bookmarks, but FF does not.
> 
> If I try the same URL on Chrome (mac or win) it simply downloads the PDF, chrome does not display the pdf.
> 
> So, if Marcus test does work, then navigateTuURL seems to do a better job than the browser.
> 
> hth
> julio
> 
> 
> On Feb 6, 2014, at 4:29 PM, Marcus Fritze <ma...@googlemail.com> wrote:
> 
>> This example works without any problems for me and it shows me the PDF on page 7 (Altera... no Portal):
>> 
>> <?xml version="1.0" encoding="utf-8"?>
>> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
>> 			   xmlns:s="library://ns.adobe.com/flex/spark" 
>> 			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
>> 	<s:layout>
>> 		<s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
>> 	</s:layout>
>> 	<fx:Declarations>
>> 		<!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte) hier -->
>> 	</fx:Declarations>
>> 	
>> 	<fx:Script>
>> 		<![CDATA[
>> 			import flash.net.navigateToURL;
>> 			
>> 			private function openPDF():void
>> 			{
>> 				var strURL:String = "http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChangeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal";
>> 				
>> 				var urlReq:URLRequest= new URLRequest(strURL);
>> 				
>> 				navigateToURL(urlReq,"_blank");
>> 			}
>> 			
>> 		]]>
>> 	</fx:Script>
>> 	
>> 	<s:Button label="open pdf" click="{openPDF()}"/>
>> 	
>> </s:Application>
>> 
>> 
>> 
>> Am 06.02.2014 um 17:43 schrieb Pedro Serralha <pe...@elegedata.com>:
>> 
>>> My code
>>> 
>>> 		var strURL:String =
>>> "http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
>>> ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal"
>>> 				
>>> 			var urlReq:URLRequest= new URLRequest(strURL)
>>> 			
>>> 			navigateToURL(urlReq,"_blank");
>>> 
>>> Cumprimentos / Best Regards
>>> Pedro Serralha
>>> 
>>> -----Original Message-----
>>> From: Alex Harui [mailto:aharui@adobe.com] 
>>> Sent: quinta-feira, 6 de Fevereiro de 2014 16:34
>>> To: users@flex.apache.org
>>> Subject: Re: Problems openning PDF file using navigateToURL
>>> 
>>> What are you actually passing into the URLRequest parameter?
>>> 
>>> On 2/6/14 8:07 AM, "Pedro Serralha" <pe...@elegedata.com> wrote:
>>> 
>>>> Marcus thank you for replying.
>>>> 
>>>> But for what I understood, on both links you've sent. They tell how to 
>>>> encode parameters on URL and the escape() is to convert a string to a 
>>>> URL-encoded format, which is what I don't want.
>>>> 
>>>> 
>>>> 
>>>> As you can see
>>>> 
>>>> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>>>> SCh
>>>> an
>>>> geLog.pdf#pagemode=bookmarks
>>>> <http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicI
>>>> MSC
>>>> ha
>>>> ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal> 
>>>> &nameddest=Alterações no Portal
>>>> 
>>>> 
>>>> 
>>>> The thing is that the last part of the URL 
>>>> #pagemode=bookmarks&nameddest=Alterações no Portal is something 
>>>> specific to the PDF readers, and  I don't think it can be considered an 
>>>> normal http parameter. I don't know why the reader doesn't decode 
>>>> correctly the encoded characters, but only if I could pass the pure 
>>>> string without any encoding/ treatment, the thing would work.
>>>> 
>>>> 
>>>> 
>>>> Btw still using 4.6sdk on these project.
>>>> 
>>>> 
>>>> 
>>>> Cumprimentos / Best Regards
>>>> 
>>>> Pedro Serralha
>>>> 
>>>> 
>>>> 
>>>> From: Marcus Fritze [mailto:marcus.fritze@googlemail.com]
>>>> Sent: quinta-feira, 6 de Fevereiro de 2014 12:34
>>>> To: users@flex.apache.org
>>>> Subject: Re: Problems openning PDF file using navigateToURL
>>>> 
>>>> 
>>>> 
>>>> or maybe easier this:
>>>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/pack
>>>> age
>>>> .h
>>>> tml#escape()
>>>> 
>>>> 
>>>> 
>>>> Am 06.02.2014 um 13:24 schrieb Pedro Serralha
>>>> <pe...@elegedata.com>:
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> Greetings my friends
>>>> 
>>>> 
>>>> 
>>>> In our Webapplication we have some buttons that open an PDF file.
>>>> 
>>>> We are using the navigateToURL method.
>>>> 
>>>> 
>>>> 
>>>> The problem is that we are using bookmarks within the pdf and to open 
>>>> an link and point to an bookmark the URL used is something like
>>>> 
>>>> 
>>>> 
>>>> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>>>> SCh
>>>> an
>>>> geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal
>>>> 
>>>> 
>>>> 
>>>> As you see, it accepts non standard characters on the URL as spaces and 
>>>> ç and õ.
>>>> 
>>>> The link works with this characters if you put it directly on the 
>>>> browser, but when I open it using the method above mentioned it 
>>>> corrects the invalid characters.... and the bookmark pointer stops 
>>>> working.
>>>> 
>>>> 
>>>> 
>>>> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>>>> SCh
>>>> an
>>>> geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> So what I ask is, is there a way to open a link without these correction?
>>>> 
>>>> 
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>>> Cumprimentos / Best Regards
>>>> 
>>>> Pedro Serralha
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>> 
> 
> --
> Julio Carneiro
> 
> 


Re: Problems openning PDF file using navigateToURL

Posted by Julio Carneiro <ju...@4ctv.com>.
I just tried that url here in Safari and the URL does get escaped by Safari, turning it into:
http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChangeLog.pdf#pagemode=bookmarks&nameddest=Alterações%20no%20Portal

But, although Safari, IE and Firefox do display the PDF, neither go to page 7. Safari & IE do display the bookmarks, but FF does not.

If I try the same URL on Chrome (mac or win) it simply downloads the PDF, chrome does not display the pdf.

So, if Marcus test does work, then navigateTuURL seems to do a better job than the browser.

hth
julio


On Feb 6, 2014, at 4:29 PM, Marcus Fritze <ma...@googlemail.com> wrote:

> This example works without any problems for me and it shows me the PDF on page 7 (Altera... no Portal):
> 
> <?xml version="1.0" encoding="utf-8"?>
> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
> 			   xmlns:s="library://ns.adobe.com/flex/spark" 
> 			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
> 	<s:layout>
> 		<s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
> 	</s:layout>
> 	<fx:Declarations>
> 		<!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte) hier -->
> 	</fx:Declarations>
> 	
> 	<fx:Script>
> 		<![CDATA[
> 			import flash.net.navigateToURL;
> 			
> 			private function openPDF():void
> 			{
> 				var strURL:String = "http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChangeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal";
> 				
> 				var urlReq:URLRequest= new URLRequest(strURL);
> 				
> 				navigateToURL(urlReq,"_blank");
> 			}
> 			
> 		]]>
> 	</fx:Script>
> 	
> 	<s:Button label="open pdf" click="{openPDF()}"/>
> 	
> </s:Application>
> 
> 
> 
> Am 06.02.2014 um 17:43 schrieb Pedro Serralha <pe...@elegedata.com>:
> 
>> My code
>> 
>> 		var strURL:String =
>> "http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
>> ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal"
>> 				
>> 			var urlReq:URLRequest= new URLRequest(strURL)
>> 			
>> 			navigateToURL(urlReq,"_blank");
>> 
>> Cumprimentos / Best Regards
>> Pedro Serralha
>> 
>> -----Original Message-----
>> From: Alex Harui [mailto:aharui@adobe.com] 
>> Sent: quinta-feira, 6 de Fevereiro de 2014 16:34
>> To: users@flex.apache.org
>> Subject: Re: Problems openning PDF file using navigateToURL
>> 
>> What are you actually passing into the URLRequest parameter?
>> 
>> On 2/6/14 8:07 AM, "Pedro Serralha" <pe...@elegedata.com> wrote:
>> 
>>> Marcus thank you for replying.
>>> 
>>> But for what I understood, on both links you've sent. They tell how to 
>>> encode parameters on URL and the escape() is to convert a string to a 
>>> URL-encoded format, which is what I don't want.
>>> 
>>> 
>>> 
>>> As you can see
>>> 
>>> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>>> SCh
>>> an
>>> geLog.pdf#pagemode=bookmarks
>>> <http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicI
>>> MSC
>>> ha
>>> ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal> 
>>> &nameddest=Alterações no Portal
>>> 
>>> 
>>> 
>>> The thing is that the last part of the URL 
>>> #pagemode=bookmarks&nameddest=Alterações no Portal is something 
>>> specific to the PDF readers, and  I don't think it can be considered an 
>>> normal http parameter. I don't know why the reader doesn't decode 
>>> correctly the encoded characters, but only if I could pass the pure 
>>> string without any encoding/ treatment, the thing would work.
>>> 
>>> 
>>> 
>>> Btw still using 4.6sdk on these project.
>>> 
>>> 
>>> 
>>> Cumprimentos / Best Regards
>>> 
>>> Pedro Serralha
>>> 
>>> 
>>> 
>>> From: Marcus Fritze [mailto:marcus.fritze@googlemail.com]
>>> Sent: quinta-feira, 6 de Fevereiro de 2014 12:34
>>> To: users@flex.apache.org
>>> Subject: Re: Problems openning PDF file using navigateToURL
>>> 
>>> 
>>> 
>>> or maybe easier this:
>>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/pack
>>> age
>>> .h
>>> tml#escape()
>>> 
>>> 
>>> 
>>> Am 06.02.2014 um 13:24 schrieb Pedro Serralha
>>> <pe...@elegedata.com>:
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Greetings my friends
>>> 
>>> 
>>> 
>>> In our Webapplication we have some buttons that open an PDF file.
>>> 
>>> We are using the navigateToURL method.
>>> 
>>> 
>>> 
>>> The problem is that we are using bookmarks within the pdf and to open 
>>> an link and point to an bookmark the URL used is something like
>>> 
>>> 
>>> 
>>> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>>> SCh
>>> an
>>> geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal
>>> 
>>> 
>>> 
>>> As you see, it accepts non standard characters on the URL as spaces and 
>>> ç and õ.
>>> 
>>> The link works with this characters if you put it directly on the 
>>> browser, but when I open it using the method above mentioned it 
>>> corrects the invalid characters.... and the bookmark pointer stops 
>>> working.
>>> 
>>> 
>>> 
>>> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>>> SCh
>>> an
>>> geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal
>>> 
>>> 
>>> 
>>> 
>>> 
>>> So what I ask is, is there a way to open a link without these correction?
>>> 
>>> 
>>> 
>>> Thanks
>>> 
>>> 
>>> 
>>> Cumprimentos / Best Regards
>>> 
>>> Pedro Serralha
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
> 

--
Julio Carneiro



Re: Problems openning PDF file using navigateToURL

Posted by Marcus Fritze <ma...@googlemail.com>.
This example works without any problems for me and it shows me the PDF on page 7 (Altera... no Portal):

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
	<s:layout>
		<s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
	</s:layout>
	<fx:Declarations>
		<!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte) hier -->
	</fx:Declarations>
	
	<fx:Script>
		<![CDATA[
			import flash.net.navigateToURL;
			
			private function openPDF():void
			{
				var strURL:String = "http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChangeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal";
				
				var urlReq:URLRequest= new URLRequest(strURL);
				
				navigateToURL(urlReq,"_blank");
			}
			
		]]>
	</fx:Script>
	
	<s:Button label="open pdf" click="{openPDF()}"/>
	
</s:Application>



Am 06.02.2014 um 17:43 schrieb Pedro Serralha <pe...@elegedata.com>:

> My code
> 
> 		var strURL:String =
> "http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
> ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal"
> 				
> 			var urlReq:URLRequest= new URLRequest(strURL)
> 			
> 			navigateToURL(urlReq,"_blank");
> 
> Cumprimentos / Best Regards
> Pedro Serralha
> 
> -----Original Message-----
> From: Alex Harui [mailto:aharui@adobe.com] 
> Sent: quinta-feira, 6 de Fevereiro de 2014 16:34
> To: users@flex.apache.org
> Subject: Re: Problems openning PDF file using navigateToURL
> 
> What are you actually passing into the URLRequest parameter?
> 
> On 2/6/14 8:07 AM, "Pedro Serralha" <pe...@elegedata.com> wrote:
> 
>> Marcus thank you for replying.
>> 
>> But for what I understood, on both links you've sent. They tell how to 
>> encode parameters on URL and the escape() is to convert a string to a 
>> URL-encoded format, which is what I don't want.
>> 
>> 
>> 
>> As you can see
>> 
>> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>> SCh
>> an
>> geLog.pdf#pagemode=bookmarks
>> <http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicI
>> MSC
>> ha
>> ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal> 
>> &nameddest=Alterações no Portal
>> 
>> 
>> 
>> The thing is that the last part of the URL 
>> #pagemode=bookmarks&nameddest=Alterações no Portal is something 
>> specific to the PDF readers, and  I don't think it can be considered an 
>> normal http parameter. I don't know why the reader doesn't decode 
>> correctly the encoded characters, but only if I could pass the pure 
>> string without any encoding/ treatment, the thing would work.
>> 
>> 
>> 
>> Btw still using 4.6sdk on these project.
>> 
>> 
>> 
>> Cumprimentos / Best Regards
>> 
>> Pedro Serralha
>> 
>> 
>> 
>> From: Marcus Fritze [mailto:marcus.fritze@googlemail.com]
>> Sent: quinta-feira, 6 de Fevereiro de 2014 12:34
>> To: users@flex.apache.org
>> Subject: Re: Problems openning PDF file using navigateToURL
>> 
>> 
>> 
>> or maybe easier this:
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/pack
>> age
>> .h
>> tml#escape()
>> 
>> 
>> 
>> Am 06.02.2014 um 13:24 schrieb Pedro Serralha
>> <pe...@elegedata.com>:
>> 
>> 
>> 
>> 
>> 
>> Greetings my friends
>> 
>> 
>> 
>> In our Webapplication we have some buttons that open an PDF file.
>> 
>> We are using the navigateToURL method.
>> 
>> 
>> 
>> The problem is that we are using bookmarks within the pdf and to open 
>> an link and point to an bookmark the URL used is something like
>> 
>> 
>> 
>> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>> SCh
>> an
>> geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal
>> 
>> 
>> 
>> As you see, it accepts non standard characters on the URL as spaces and 
>> ç and õ.
>> 
>> The link works with this characters if you put it directly on the 
>> browser, but when I open it using the method above mentioned it 
>> corrects the invalid characters.... and the bookmark pointer stops 
>> working.
>> 
>> 
>> 
>> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>> SCh
>> an
>> geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal
>> 
>> 
>> 
>> 
>> 
>> So what I ask is, is there a way to open a link without these correction?
>> 
>> 
>> 
>> Thanks
>> 
>> 
>> 
>> Cumprimentos / Best Regards
>> 
>> Pedro Serralha
>> 
>> 
>> 
>> 
>> 
>> 
> 


Re: Problems openning PDF file using navigateToURL

Posted by Alex Harui <ah...@adobe.com>.
Is this a web app or AIR app?  If web app, what happens if you try to open
the PDF from JavaScript?

On 2/6/14 8:43 AM, "Pedro Serralha" <pe...@elegedata.com> wrote:

>My code
>
>		var strURL:String =
>"http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSC
>ha
>ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal"
>				
>			var urlReq:URLRequest= new URLRequest(strURL)
>			
>			navigateToURL(urlReq,"_blank");
>
>Cumprimentos / Best Regards
>Pedro Serralha
>
>-----Original Message-----
>From: Alex Harui [mailto:aharui@adobe.com]
>Sent: quinta-feira, 6 de Fevereiro de 2014 16:34
>To: users@flex.apache.org
>Subject: Re: Problems openning PDF file using navigateToURL
>
>What are you actually passing into the URLRequest parameter?
>
>On 2/6/14 8:07 AM, "Pedro Serralha" <pe...@elegedata.com> wrote:
>
>>Marcus thank you for replying.
>>
>>But for what I understood, on both links you've sent. They tell how to
>>encode parameters on URL and the escape() is to convert a string to a
>>URL-encoded format, which is what I don't want.
>>
>> 
>>
>>As you can see
>>
>>http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>>SCh
>>an
>>geLog.pdf#pagemode=bookmarks
>><http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicI
>>MSC
>>ha
>>ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal>
>>&nameddest=Alterações no Portal
>>
>> 
>>
>>The thing is that the last part of the URL
>>#pagemode=bookmarks&nameddest=Alterações no Portal is something
>>specific to the PDF readers, and  I don't think it can be considered an
>>normal http parameter. I don't know why the reader doesn't decode
>>correctly the encoded characters, but only if I could pass the pure
>>string without any encoding/ treatment, the thing would work.
>>
>> 
>>
>>Btw still using 4.6sdk on these project.
>>
>> 
>>
>>Cumprimentos / Best Regards
>>
>>Pedro Serralha
>>
>> 
>>
>>From: Marcus Fritze [mailto:marcus.fritze@googlemail.com]
>>Sent: quinta-feira, 6 de Fevereiro de 2014 12:34
>>To: users@flex.apache.org
>>Subject: Re: Problems openning PDF file using navigateToURL
>>
>> 
>>
>>or maybe easier this:
>>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/pack
>>age
>>.h
>>tml#escape()
>>
>> 
>>
>>Am 06.02.2014 um 13:24 schrieb Pedro Serralha
>><pe...@elegedata.com>:
>>
>>
>>
>>
>>
>>Greetings my friends
>>
>>
>>
>>In our Webapplication we have some buttons that open an PDF file.
>>
>>We are using the navigateToURL method.
>>
>>
>>
>>The problem is that we are using bookmarks within the pdf and to open
>>an link and point to an bookmark the URL used is something like
>>
>>
>>
>>http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>>SCh
>>an
>>geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal
>>
>>
>>
>>As you see, it accepts non standard characters on the URL as spaces and
>>ç and õ.
>>
>>The link works with this characters if you put it directly on the
>>browser, but when I open it using the method above mentioned it
>>corrects the invalid characters.... and the bookmark pointer stops
>>working.
>>
>>
>>
>>http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>>SCh
>>an
>>geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal
>>
>>
>>
>>
>>
>>So what I ask is, is there a way to open a link without these correction?
>>
>>
>>
>>Thanks
>>
>>
>>
>>Cumprimentos / Best Regards
>>
>>Pedro Serralha
>>
>>
>>
>>
>> 
>>
>


RE: Problems openning PDF file using navigateToURL

Posted by Pedro Serralha <pe...@elegedata.com>.
I'm not at the PC right now, so I'll try both things later.
But I've remembered one thing the url field on urlrequest, mantains the
correct URL, so it doesn't encodes it.

Pedro Serralha
No dia 6 de Fev de 2014 16:43, "Pedro Serralha" <
pedro.serralha@elegedata.com> escreveu:

> My code
>
>                 var strURL:String =
> "
> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
> ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal"
>
>                         var urlReq:URLRequest= new URLRequest(strURL)
>
>                         navigateToURL(urlReq,"_blank");
>
> Cumprimentos / Best Regards
> Pedro Serralha
>
> -----Original Message-----
> From: Alex Harui [mailto:aharui@adobe.com]
> Sent: quinta-feira, 6 de Fevereiro de 2014 16:34
> To: users@flex.apache.org
> Subject: Re: Problems openning PDF file using navigateToURL
>
> What are you actually passing into the URLRequest parameter?
>
> On 2/6/14 8:07 AM, "Pedro Serralha" <pe...@elegedata.com> wrote:
>
> >Marcus thank you for replying.
> >
> >But for what I understood, on both links you've sent. They tell how to
> >encode parameters on URL and the escape() is to convert a string to a
> >URL-encoded format, which is what I don't want.
> >
> >
> >
> >As you can see
> >
> >http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
> >SCh
> >an
> >geLog.pdf#pagemode=bookmarks
> ><http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicI
> >MSC
> >ha
> >ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal>
> >&nameddest=Alterações no Portal
> >
> >
> >
> >The thing is that the last part of the URL
> >#pagemode=bookmarks&nameddest=Alterações no Portal is something
> >specific to the PDF readers, and  I don't think it can be considered an
> >normal http parameter. I don't know why the reader doesn't decode
> >correctly the encoded characters, but only if I could pass the pure
> >string without any encoding/ treatment, the thing would work.
> >
> >
> >
> >Btw still using 4.6sdk on these project.
> >
> >
> >
> >Cumprimentos / Best Regards
> >
> >Pedro Serralha
> >
> >
> >
> >From: Marcus Fritze [mailto:marcus.fritze@googlemail.com]
> >Sent: quinta-feira, 6 de Fevereiro de 2014 12:34
> >To: users@flex.apache.org
> >Subject: Re: Problems openning PDF file using navigateToURL
> >
> >
> >
> >or maybe easier this:
> >http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/pack
> >age
> >.h
> >tml#escape()
> >
> >
> >
> >Am 06.02.2014 um 13:24 schrieb Pedro Serralha
> ><pe...@elegedata.com>:
> >
> >
> >
> >
> >
> >Greetings my friends
> >
> >
> >
> >In our Webapplication we have some buttons that open an PDF file.
> >
> >We are using the navigateToURL method.
> >
> >
> >
> >The problem is that we are using bookmarks within the pdf and to open
> >an link and point to an bookmark the URL used is something like
> >
> >
> >
> >http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
> >SCh
> >an
> >geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal
> >
> >
> >
> >As you see, it accepts non standard characters on the URL as spaces and
> >ç and õ.
> >
> >The link works with this characters if you put it directly on the
> >browser, but when I open it using the method above mentioned it
> >corrects the invalid characters.... and the bookmark pointer stops
> >working.
> >
> >
> >
> >http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
> >SCh
> >an
> >geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal
> >
> >
> >
> >
> >
> >So what I ask is, is there a way to open a link without these correction?
> >
> >
> >
> >Thanks
> >
> >
> >
> >Cumprimentos / Best Regards
> >
> >Pedro Serralha
> >
> >
> >
> >
> >
> >
>
>

Re: Problems openning PDF file using navigateToURL

Posted by Julio Carneiro <ju...@4ctv.com>.
Pedro,

Have you tried to monitor the network traffic to view the actual request being sent out by navigateToURL?

Use your browser developer tools/web inspector/firebug/fiddler or whatever it is called in your browser.
Try to monitor both, when you type in the url in your browser and the actual URL sent out by navigate.
Even better if you can use something like wireshark, which is browser independent.

Compare both to see if there is any difference, that might give you a clue as to what the problem is. And maybe how to fix it.

hth
julio

On Feb 6, 2014, at 2:43 PM, Pedro Serralha <pe...@elegedata.com> wrote:

> My code
> 
> 		var strURL:String =
> "http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
> ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal"
> 				
> 			var urlReq:URLRequest= new URLRequest(strURL)
> 			
> 			navigateToURL(urlReq,"_blank");
> 
> Cumprimentos / Best Regards
> Pedro Serralha
> 
> -----Original Message-----
> From: Alex Harui [mailto:aharui@adobe.com] 
> Sent: quinta-feira, 6 de Fevereiro de 2014 16:34
> To: users@flex.apache.org
> Subject: Re: Problems openning PDF file using navigateToURL
> 
> What are you actually passing into the URLRequest parameter?
> 
> On 2/6/14 8:07 AM, "Pedro Serralha" <pe...@elegedata.com> wrote:
> 
>> Marcus thank you for replying.
>> 
>> But for what I understood, on both links you've sent. They tell how to 
>> encode parameters on URL and the escape() is to convert a string to a 
>> URL-encoded format, which is what I don't want.
>> 
>> 
>> 
>> As you can see
>> 
>> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>> SCh
>> an
>> geLog.pdf#pagemode=bookmarks
>> <http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicI
>> MSC
>> ha
>> ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal> 
>> &nameddest=Alterações no Portal
>> 
>> 
>> 
>> The thing is that the last part of the URL 
>> #pagemode=bookmarks&nameddest=Alterações no Portal is something 
>> specific to the PDF readers, and  I don't think it can be considered an 
>> normal http parameter. I don't know why the reader doesn't decode 
>> correctly the encoded characters, but only if I could pass the pure 
>> string without any encoding/ treatment, the thing would work.
>> 
>> 
>> 
>> Btw still using 4.6sdk on these project.
>> 
>> 
>> 
>> Cumprimentos / Best Regards
>> 
>> Pedro Serralha
>> 
>> 
>> 
>> From: Marcus Fritze [mailto:marcus.fritze@googlemail.com]
>> Sent: quinta-feira, 6 de Fevereiro de 2014 12:34
>> To: users@flex.apache.org
>> Subject: Re: Problems openning PDF file using navigateToURL
>> 
>> 
>> 
>> or maybe easier this:
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/pack
>> age
>> .h
>> tml#escape()
>> 
>> 
>> 
>> Am 06.02.2014 um 13:24 schrieb Pedro Serralha
>> <pe...@elegedata.com>:
>> 
>> 
>> 
>> 
>> 
>> Greetings my friends
>> 
>> 
>> 
>> In our Webapplication we have some buttons that open an PDF file.
>> 
>> We are using the navigateToURL method.
>> 
>> 
>> 
>> The problem is that we are using bookmarks within the pdf and to open 
>> an link and point to an bookmark the URL used is something like
>> 
>> 
>> 
>> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>> SCh
>> an
>> geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal
>> 
>> 
>> 
>> As you see, it accepts non standard characters on the URL as spaces and 
>> ç and õ.
>> 
>> The link works with this characters if you put it directly on the 
>> browser, but when I open it using the method above mentioned it 
>> corrects the invalid characters.... and the bookmark pointer stops 
>> working.
>> 
>> 
>> 
>> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>> SCh
>> an
>> geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal
>> 
>> 
>> 
>> 
>> 
>> So what I ask is, is there a way to open a link without these correction?
>> 
>> 
>> 
>> Thanks
>> 
>> 
>> 
>> Cumprimentos / Best Regards
>> 
>> Pedro Serralha
>> 
>> 
>> 
>> 
>> 
>> 
> 

--
Julio Carneiro



RE: Problems openning PDF file using navigateToURL

Posted by Miguel Ferreira <mi...@hotmail.com>.
Hi,
What is the browser that you are using?
In chrome to download/open a file i get some issues to.
Miguel

> From: pedro.serralha@elegedata.com
> To: users@flex.apache.org
> Subject: RE: Problems openning PDF file using navigateToURL
> Date: Thu, 6 Feb 2014 16:43:48 +0000
> 
> My code
> 
> 		var strURL:String =
> "http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
> ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal"
> 				
> 			var urlReq:URLRequest= new URLRequest(strURL)
> 			
> 			navigateToURL(urlReq,"_blank");
> 
> Cumprimentos / Best Regards
> Pedro Serralha
> 
> -----Original Message-----
> From: Alex Harui [mailto:aharui@adobe.com] 
> Sent: quinta-feira, 6 de Fevereiro de 2014 16:34
> To: users@flex.apache.org
> Subject: Re: Problems openning PDF file using navigateToURL
> 
> What are you actually passing into the URLRequest parameter?
> 
> On 2/6/14 8:07 AM, "Pedro Serralha" <pe...@elegedata.com> wrote:
> 
> >Marcus thank you for replying.
> >
> >But for what I understood, on both links you've sent. They tell how to 
> >encode parameters on URL and the escape() is to convert a string to a 
> >URL-encoded format, which is what I don't want.
> >
> > 
> >
> >As you can see
> >
> >http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
> >SCh
> >an
> >geLog.pdf#pagemode=bookmarks
> ><http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicI
> >MSC
> >ha
> >ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal> 
> >&nameddest=Alterações no Portal
> >
> > 
> >
> >The thing is that the last part of the URL 
> >#pagemode=bookmarks&nameddest=Alterações no Portal is something 
> >specific to the PDF readers, and  I don't think it can be considered an 
> >normal http parameter. I don't know why the reader doesn't decode 
> >correctly the encoded characters, but only if I could pass the pure 
> >string without any encoding/ treatment, the thing would work.
> >
> > 
> >
> >Btw still using 4.6sdk on these project.
> >
> > 
> >
> >Cumprimentos / Best Regards
> >
> >Pedro Serralha
> >
> > 
> >
> >From: Marcus Fritze [mailto:marcus.fritze@googlemail.com]
> >Sent: quinta-feira, 6 de Fevereiro de 2014 12:34
> >To: users@flex.apache.org
> >Subject: Re: Problems openning PDF file using navigateToURL
> >
> > 
> >
> >or maybe easier this:
> >http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/pack
> >age
> >.h
> >tml#escape()
> >
> > 
> >
> >Am 06.02.2014 um 13:24 schrieb Pedro Serralha
> ><pe...@elegedata.com>:
> >
> >
> >
> >
> >
> >Greetings my friends
> >
> >
> >
> >In our Webapplication we have some buttons that open an PDF file.
> >
> >We are using the navigateToURL method.
> >
> >
> >
> >The problem is that we are using bookmarks within the pdf and to open 
> >an link and point to an bookmark the URL used is something like
> >
> >
> >
> >http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
> >SCh
> >an
> >geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal
> >
> >
> >
> >As you see, it accepts non standard characters on the URL as spaces and 
> >ç and õ.
> >
> >The link works with this characters if you put it directly on the 
> >browser, but when I open it using the method above mentioned it 
> >corrects the invalid characters.... and the bookmark pointer stops 
> >working.
> >
> >
> >
> >http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
> >SCh
> >an
> >geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal
> >
> >
> >
> >
> >
> >So what I ask is, is there a way to open a link without these correction?
> >
> >
> >
> >Thanks
> >
> >
> >
> >Cumprimentos / Best Regards
> >
> >Pedro Serralha
> >
> >
> >
> >
> > 
> >
> 
 		 	   		  

RE: Problems openning PDF file using navigateToURL

Posted by Pedro Serralha <pe...@elegedata.com>.
My code

		var strURL:String =
"http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal"
				
			var urlReq:URLRequest= new URLRequest(strURL)
			
			navigateToURL(urlReq,"_blank");

Cumprimentos / Best Regards
Pedro Serralha

-----Original Message-----
From: Alex Harui [mailto:aharui@adobe.com] 
Sent: quinta-feira, 6 de Fevereiro de 2014 16:34
To: users@flex.apache.org
Subject: Re: Problems openning PDF file using navigateToURL

What are you actually passing into the URLRequest parameter?

On 2/6/14 8:07 AM, "Pedro Serralha" <pe...@elegedata.com> wrote:

>Marcus thank you for replying.
>
>But for what I understood, on both links you've sent. They tell how to 
>encode parameters on URL and the escape() is to convert a string to a 
>URL-encoded format, which is what I don't want.
>
> 
>
>As you can see
>
>http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>SCh
>an
>geLog.pdf#pagemode=bookmarks
><http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicI
>MSC
>ha
>ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal> 
>&nameddest=Alterações no Portal
>
> 
>
>The thing is that the last part of the URL 
>#pagemode=bookmarks&nameddest=Alterações no Portal is something 
>specific to the PDF readers, and  I don't think it can be considered an 
>normal http parameter. I don't know why the reader doesn't decode 
>correctly the encoded characters, but only if I could pass the pure 
>string without any encoding/ treatment, the thing would work.
>
> 
>
>Btw still using 4.6sdk on these project.
>
> 
>
>Cumprimentos / Best Regards
>
>Pedro Serralha
>
> 
>
>From: Marcus Fritze [mailto:marcus.fritze@googlemail.com]
>Sent: quinta-feira, 6 de Fevereiro de 2014 12:34
>To: users@flex.apache.org
>Subject: Re: Problems openning PDF file using navigateToURL
>
> 
>
>or maybe easier this:
>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/pack
>age
>.h
>tml#escape()
>
> 
>
>Am 06.02.2014 um 13:24 schrieb Pedro Serralha
><pe...@elegedata.com>:
>
>
>
>
>
>Greetings my friends
>
>
>
>In our Webapplication we have some buttons that open an PDF file.
>
>We are using the navigateToURL method.
>
>
>
>The problem is that we are using bookmarks within the pdf and to open 
>an link and point to an bookmark the URL used is something like
>
>
>
>http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>SCh
>an
>geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal
>
>
>
>As you see, it accepts non standard characters on the URL as spaces and 
>ç and õ.
>
>The link works with this characters if you put it directly on the 
>browser, but when I open it using the method above mentioned it 
>corrects the invalid characters.... and the bookmark pointer stops 
>working.
>
>
>
>http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIM
>SCh
>an
>geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal
>
>
>
>
>
>So what I ask is, is there a way to open a link without these correction?
>
>
>
>Thanks
>
>
>
>Cumprimentos / Best Regards
>
>Pedro Serralha
>
>
>
>
> 
>


Re: Problems openning PDF file using navigateToURL

Posted by Alex Harui <ah...@adobe.com>.
What are you actually passing into the URLRequest parameter?

On 2/6/14 8:07 AM, "Pedro Serralha" <pe...@elegedata.com> wrote:

>Marcus thank you for replying.
>
>But for what I understood, on both links you've sent. They tell how to
>encode parameters on URL and the escape() is to convert a string to a
>URL-encoded format, which is what I don't want.
>
> 
>
>As you can see 
>
>http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCh
>an
>geLog.pdf#pagemode=bookmarks
><http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSC
>ha
>ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal>
>&nameddest=Alterações no Portal
>
> 
>
>The thing is that the last part of the URL
>#pagemode=bookmarks&nameddest=Alterações no Portal is something specific
>to
>the PDF readers, and  I don't think it can be considered an normal http
>parameter. I don't know why the reader doesn't decode correctly the
>encoded
>characters, but only if I could pass the pure string without any encoding/
>treatment, the thing would work.
>
> 
>
>Btw still using 4.6sdk on these project.
>
> 
>
>Cumprimentos / Best Regards
>
>Pedro Serralha
>
> 
>
>From: Marcus Fritze [mailto:marcus.fritze@googlemail.com]
>Sent: quinta-feira, 6 de Fevereiro de 2014 12:34
>To: users@flex.apache.org
>Subject: Re: Problems openning PDF file using navigateToURL
>
> 
>
>or maybe easier this:
>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/package
>.h
>tml#escape()
>
> 
>
>Am 06.02.2014 um 13:24 schrieb Pedro Serralha
><pe...@elegedata.com>:
>
>
>
>
>
>Greetings my friends
>
>
>
>In our Webapplication we have some buttons that open an PDF file.
>
>We are using the navigateToURL method.
>
>
>
>The problem is that we are using bookmarks within the pdf and to open an
>link and point to an bookmark the URL used is something like
>
>
>
>http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCh
>an
>geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal
>
>
>
>As you see, it accepts non standard characters on the URL as spaces and ç
>and õ. 
>
>The link works with this characters if you put it directly on the browser,
>but when I open it using the method above mentioned it corrects the
>invalid
>characters.... and the bookmark pointer stops working.
>
>
>
>http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCh
>an
>geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal
>
>
>
>
>
>So what I ask is, is there a way to open a link without these correction?
>
>
>
>Thanks
>
>
>
>Cumprimentos / Best Regards
>
>Pedro Serralha
>
>
>
>
> 
>


RE: Problems openning PDF file using navigateToURL

Posted by Pedro Serralha <pe...@elegedata.com>.
Marcus thank you for replying.

But for what I understood, on both links you've sent. They tell how to
encode parameters on URL and the escape() is to convert a string to a
URL-encoded format, which is what I don't want.

 

As you can see 

http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChan
geLog.pdf#pagemode=bookmarks
<http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSCha
ngeLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal>
&nameddest=Alterações no Portal

 

The thing is that the last part of the URL
#pagemode=bookmarks&nameddest=Alterações no Portal is something specific to
the PDF readers, and  I don't think it can be considered an normal http
parameter. I don't know why the reader doesn't decode correctly the encoded
characters, but only if I could pass the pure string without any encoding/
treatment, the thing would work.

 

Btw still using 4.6sdk on these project.

 

Cumprimentos / Best Regards

Pedro Serralha

 

From: Marcus Fritze [mailto:marcus.fritze@googlemail.com] 
Sent: quinta-feira, 6 de Fevereiro de 2014 12:34
To: users@flex.apache.org
Subject: Re: Problems openning PDF file using navigateToURL

 

or maybe easier this:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/package.h
tml#escape()

 

Am 06.02.2014 um 13:24 schrieb Pedro Serralha
<pe...@elegedata.com>:





Greetings my friends



In our Webapplication we have some buttons that open an PDF file.

We are using the navigateToURL method.



The problem is that we are using bookmarks within the pdf and to open an
link and point to an bookmark the URL used is something like



http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChan
geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal



As you see, it accepts non standard characters on the URL as spaces and ç
and õ. 

The link works with this characters if you put it directly on the browser,
but when I open it using the method above mentioned it corrects the invalid
characters.... and the bookmark pointer stops working.



http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChan
geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal





So what I ask is, is there a way to open a link without these correction?



Thanks



Cumprimentos / Best Regards

Pedro Serralha




 


Re: Problems openning PDF file using navigateToURL

Posted by Marcus Fritze <ma...@googlemail.com>.
or maybe easier this: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/package.html#escape()

Am 06.02.2014 um 13:24 schrieb Pedro Serralha <pe...@elegedata.com>:

> Greetings my friends
> 
> 
> 
> In our Webapplication we have some buttons that open an PDF file.
> 
> We are using the navigateToURL method.
> 
> 
> 
> The problem is that we are using bookmarks within the pdf and to open an
> link and point to an bookmark the URL used is something like
> 
> 
> 
> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChan
> geLog.pdf#pagemode=bookmarks&nameddest=Alterações no Portal
> 
> 
> 
> As you see, it accepts non standard characters on the URL as spaces and ç
> and õ. 
> 
> The link works with this characters if you put it directly on the browser,
> but when I open it using the method above mentioned it corrects the invalid
> characters.... and the bookmark pointer stops working.
> 
> 
> 
> http://portal.beelogicsoftware.com/BeelogicIMS/manuals/pt_PT/BeelogicIMSChan
> geLog.pdf#pagemode=bookmarks&nameddest=Altera%E7%F5es no Portal
> 
> 
> 
> 
> 
> So what I ask is, is there a way to open a link without these correction?
> 
> 
> 
> Thanks
> 
> 
> 
> Cumprimentos / Best Regards
> 
> Pedro Serralha
> 
> 
>