Agostinho_ferreira Posted May 18, 2020 at 09:43 PM Report Share #618144 Posted May 18, 2020 at 09:43 PM Boa noite, criei o seguinte código if (openFileDialog1.ShowDialog() == DialogResult.OK) { string abrir = openFileDialog1.FileName; axAcroPDF1.Visible = true; axAcroPDF1.src = abrir; } so que ao executar o programa n consigo que ele me abra o pdf, alguem me podera dar uma ajuda Link to comment Share on other sites More sharing options...
antseq Posted May 19, 2020 at 08:43 AM Report Share #618148 Posted May 19, 2020 at 08:43 AM 10 horas atrás, Agostinho_ferreira disse: so que ao executar o programa n consigo que ele me abra o pdf, alguem me podera dar uma ajuda Nunca trabalhei com o "AcroPDF"... mas onde tem "axAcroPDF1.src = abrir", não deveria ser algo semelhante/do tipo "axAcroPDF1.LoadFile(abrir)"? Link to comment Share on other sites More sharing options...
M6 Posted May 19, 2020 at 09:40 AM Report Share #618154 Posted May 19, 2020 at 09:40 AM Qual é o erro que tens? 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar." Link to comment Share on other sites More sharing options...
Agostinho_ferreira Posted May 19, 2020 at 06:07 PM Author Report Share #618162 Posted May 19, 2020 at 06:07 PM não esta a dar nenhum erro isso e que estou a achar estranho Link to comment Share on other sites More sharing options...
Agostinho_ferreira Posted May 19, 2020 at 06:10 PM Author Report Share #618163 Posted May 19, 2020 at 06:10 PM 9 horas atrás, antseq disse: Nunca trabalhei com o "AcroPDF"... mas onde tem "axAcroPDF1.src = abrir", não deveria ser algo semelhante/do tipo "axAcroPDF1.LoadFile(abrir)"? pelo que li tanto um como outro podem ser usados, eu para ja fiz das duas formas e o resultado final é o mesmo o ficheiro não aparece Link to comment Share on other sites More sharing options...
Agostinho_ferreira Posted May 19, 2020 at 06:12 PM Author Report Share #618164 Posted May 19, 2020 at 06:12 PM 8 horas atrás, M6 disse: Qual é o erro que tens? n esta a dar nenhum erro isso e que estou a achar estranho, a 2 meses testei num outro programa a mesma situação e funcionou sem problemas mas agora não funciona Link to comment Share on other sites More sharing options...
M6 Posted May 20, 2020 at 09:14 AM Report Share #618165 Posted May 20, 2020 at 09:14 AM Experimenta usar o um um caminho em formato URL "file:///c:/caminho/ficheiro.pdf" com o .src e faz o axacroPDF.Show() depois. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar." Link to comment Share on other sites More sharing options...
Agostinho_ferreira Posted May 20, 2020 at 01:14 PM Author Report Share #618169 Posted May 20, 2020 at 01:14 PM 3 horas atrás, M6 disse: Experimenta usar o um um caminho em formato URL "file:///c:/caminho/ficheiro.pdf" com o .src e faz o axacroPDF.Show() depois. fiz o seguinte código mas não funcionou, não aparece nada, consegue dizer uma outra forma de mostrar um ficheiro pdf numa form string caminho= @"file:///C:\Users\Agostinho Ferreira\Desktop\facturas Alimentação\Nova pasta\1.pdf"; // axAcroPDF1.LoadFile(caminho); axAcroPDF1.src=caminho; axAcroPDF1.Show(); axAcroPDF1.Enabled = true; Link to comment Share on other sites More sharing options...
M6 Posted May 20, 2020 at 02:19 PM Report Share #618171 Posted May 20, 2020 at 02:19 PM As barras do caminho estão erradas, têm de ser / e não \. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar." Link to comment Share on other sites More sharing options...
Agostinho_ferreira Posted May 20, 2020 at 02:44 PM Author Report Share #618172 Posted May 20, 2020 at 02:44 PM 20 horas atrás, M6 disse: As barras do caminho estão erradas, têm de ser / e não \. não funciona a mesma Link to comment Share on other sites More sharing options...
M6 Posted May 20, 2020 at 04:44 PM Report Share #618174 Posted May 20, 2020 at 04:44 PM 1 hour ago, Agostinho_ferreira said: não funciona a mesma Tens de rever a documentação (por exemplo versões do PDF suportados) e, no limite, contactar o suporte. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar." Link to comment Share on other sites More sharing options...
Agostinho_ferreira Posted May 20, 2020 at 05:45 PM Author Report Share #618176 Posted May 20, 2020 at 05:45 PM 18 horas atrás, M6 disse: Tens de rever a documentação (por exemplo versões do PDF suportados) e, no limite, contactar o suporte. obrigado pela ajuda também estou a desconfiar que seja esta actualização feita a uma semana Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now