WebHTMLViewer

Ciao a tutti!
Ho un’applicazione Web CGI che gira su server Linux. Ho un PDF di due pagine che vorrei visualizzare utilizzando WebHTMLViewer.
Questo il codice che lo carica nel WebHTMLViewer (fPDF il FolderItem che punta al mio file PDF; FileDownload una propriet della page di tipo WebFile)

// Visualizzazione PDF in anteprima (HTMLViewer)
If fPDF.Exists Then
  FileDownload = WebFile.Open(fPDF, True)  
  FileDownload.Filename = PDFName
  FileDownload.MIMEType = "application/pdf"
  FileDownload.ForceDownload = False
  FileDownload.UseCompression = False
  HTMLViewer1.URL = ""
  HTMLViewer1.URL = FileDownload.URL
End If

Funziona tutto, tranne il fatto che viene visualizzata sempre e solo la prima pagina.

Cosa sto sbagliando?

Grazie mille!

Nessuno ha qualche indicazione da darmi?

MimeType shouldn’t have spaces before or after the /.

Once you have the WebFile try this:

WebHTMLViewer.URL = WebFile.URL

[quote=426109:@Hal Gumbert]MimeType shouldn’t have spaces before or after the /.

Once you have the WebFile try this:

WebHTMLViewer.URL = WebFile.URL

Thank you, Hal. There are no spaces before and after the / in the MIMEType property.
HTMLViewer1 is an instance of WebHTMLViewer and FileDownload is a WebFile….but it doesn’t work…I can see only the first page
of the PDF file.

Try this html as a way to display the PDF.

dim theHTML as string theHTML = "<html><head><style>body { background: #FFFFFF; margin: 0px; padding: 0px; }</style></head><body><embed src='" + WebFile.URL + "' type='application/pdf' width='100%' height='" + HTMLViewer1.height.ToText + "px' /></body></html>" HTMLViewer1.LoadPage( theHTML )

Thank you, Hal, but the problem still remains.
I forgot to say that I have the problem when I try to display the PDF on an iPhone device, while on a PC (Windows or Mac) everything is ok.
A solution is not using a WebHTMLViewer, but using ShowUrl; when I use a WebHTMLViewer only the firtst page is displayed.