Hi, I want to keep the layout and just to a link_to_remote to update the=20 div id ''main'' Using this in the controller action send_file "public/pdf/my.pdf", :type =3D> ''application/pdf'', :disposition=20 =3D> ''inline'', :stream =3D> false I get this. The raw pdf code sent replacing the main div with : =00%=00P=00D=00F=00-=001=00.=004=00 =00%=FF=FD=FF=FD=FF=FD=FF=FD=00 =002=002=002=001=00 =000=00 =00o=00b=00j=00 =00<=00>=00 =00e=00n=00d=00o=00b=00j=00=20 =00x=00r=00e=00f=00 =002=002=002=001=00 =003=005=00 =000=000=000=000=000=000=000=000=001=006=00 =000=000=000=000=000=00 =00n=00=20 =000=000=000=000=000=000=002=001=005=003=00 =000=000=000=000=000=00 =00n=00 =000=000=000=000=000=000=000=009=009=006=00 =000=000=000=000=000=00=20 =00n=00 =000=000=000=000=000=000=002=003=002=002=00 =000=000=000=000=000=00 =00n=00 =000=000=000=000=000=000=002=008=000=002=00=20 =000=000=000=000=000=00 =00n=00 =000=000=000=000=000=000=002=009=001=004=00 =000=000=000=000=000=00 =00n=00=20 =000=000=000=000=000=000=003=000=005=005=00 =000=000=000=000=000=00 =00n=00 =000=000=000=000=000=000=003=001=009=001=00 =000=000=000=000=000=00=20 =00n=00 =000=000=000=000=000=000=003=003=002=009=00 =000=000=000=000=000=00 =00n=00 =000=000=000=000=000=000=003=004=004=003=00=20 =000=000=000=000=000=00 =00n=00 =000=000=000=000=000=000=004=001=000=001=00 =000=000=000=000=000=00 =00n=00=20 =000=000=000=000=000=000=004=001=002=009=00 =000=000=000=000=000=00 =00n=00 =000=000=000=000=000=000=004=001=005=007=00 =000=000=000=000=000=00=20 =00n=00 =000=000=000=000=000=000=004=007=008=000=00 =000=000=000=000=000=00 =00n=00 =000=000=000=000=000=000=005=001=007=001=00=20 =000=000=000=000=000=00 =00n=00 =000=000=000=000=000=000=005=001=009=009=00 =000=000=000=000=000=00 =00n=00=20 =000=000=000=000=000=000=005=009=005=009=00 =000=000=000=000=000=00 =00n=00 =000=000=000=000=000=000=006=006=002=009=00 =000=000=000=000=000=00=20 =00n=00 =000=000=000=000=000=000=007=003=004=009=00 =000=000=000=000=000=00 =00n=00 etc etc etc Any clues? Thanks Bruce
On Apr 27, 2006, at 3:38 PM, bruce davison wrote:> Hi, > I want to keep the layout and just to a link_to_remote to update =20 > the div id ''main'' > > Using this in the controller action > send_file "public/pdf/my.pdf", :type =3D> ''application/=20 > pdf'', :disposition =3D> ''inline'', :stream =3D> false > > I get this. > The raw pdf code sent replacing the main div with : > %PDF-1.4 %=FF=FD=FF=FD=FF=FD=FF=FD 2221 0 obj <> endobj xref 2221 35 0000000016 =20 > 00000 n 0000002153 00000 n 0000000996 00000 n 0000002322 00000 n =20 > 0000002802 00000 n 0000002914 00000 n 0000003055 00000 n 0000003191 =20 > 00000 n 0000003329 00000 n 0000003443 00000 n 0000004101 00000 n =20 > 0000004129 00000 n 0000004157 00000 n 0000004780 00000 n 0000005171 =20 > 00000 n 0000005199 00000 n 0000005959 00000 n 0000006629 00000 n =20 > 0000007349 00000 n > etc etc etc > > Any clues?The browser doesn''t know what kind of data it''s receiving. Try :type =20 =3D> ''application/x-pdf'' Best, jeremy=
You wont be able to ''implant'' a pdf like this into a page. The whole output has to be the pdf file. -Nick On 4/27/06, bruce davison <bruce@yourweb.com.au> wrote:> Hi, > I want to keep the layout and just to a link_to_remote to update the > div id ''main'' > > Using this in the controller action > send_file "public/pdf/my.pdf", :type => ''application/pdf'', :disposition > => ''inline'', :stream => false > > I get this. > The raw pdf code sent replacing the main div with : >
Jeremy, Thanks for the response application/x-pdf doesn''t do it either ... I guess the browser is=20 getting confused with multiple doc types .. maybe iframe could help, or=20 just use Flex as the UI and be done with all of these problems. Bruce On 28/04/2006, at 8:54 AM, Jeremy Kemper wrote: On Apr 27, 2006, at 3:38 PM, bruce davison wrote:> Hi, > I want to keep the layout and just to a link_to_remote to update the=20 > div id ''main'' > > Using this in the controller action > send_file "public/pdf/my.pdf", :type =3D> ''application/pdf'',=20 > :disposition =3D> ''inline'', :stream =3D> false > > I get this. > The raw pdf code sent replacing the main div with : > %PDF-1.4 %=FF=FD=FF=FD=FF=FD=FF=FD 2221 0 obj <> endobj xref 2221 35 0000000016 00000=20 > n 0000002153 00000 n 0000000996 00000 n 0000002322 00000 n 0000002802=20 > 00000 n 0000002914 00000 n 0000003055 00000 n 0000003191 00000 n=20 > 0000003329 00000 n 0000003443 00000 n 0000004101 00000 n 0000004129=20 > 00000 n 0000004157 00000 n 0000004780 00000 n 0000005171 00000 n=20 > 0000005199 00000 n 0000005959 00000 n 0000006629 00000 n 0000007349=20 > 00000 n > etc etc etc > > Any clues?The browser doesn''t know what kind of data it''s receiving. Try :type=20 =3D> ''application/x-pdf'' Best, jeremy_______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails
Ok answer my own question.... the partial _ pdf.rhtml looks like this <OBJECT CLASSID="CLSID:CA8A9780-280D-11CF-A24D-444553540000" WIDTH="800" HEIGHT="600"> <PARAM NAME="src" VALUE="pdf/mypdf.pdf"> </OBJECT> This works! Bruce On 28/04/2006, at 8:55 AM, Nick Stuart wrote: You wont be able to ''implant'' a pdf like this into a page. The whole output has to be the pdf file. -Nick On 4/27/06, bruce davison <bruce@yourweb.com.au> wrote:> Hi, > I want to keep the layout and just to a link_to_remote to update the > div id ''main'' > > Using this in the controller action > send_file "public/pdf/my.pdf", :type => ''application/pdf'', :disposition > => ''inline'', :stream => false > > I get this. > The raw pdf code sent replacing the main div with : >_______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails