• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

vbnet webbrowser and embedded pdf

New Here ,
Feb 03, 2016 Feb 03, 2016

Copy link to clipboard

Copied

Good morning, I've developed a vb.net application that uses a webbrowser to display pdf, the file displays in the right way but I need to download the pdf to local pc reading the data from the webbrowser object. Inside the page I'seen that the pdf is an embed object, how can I read the data from this object?

This is the object inside the page, I need to download the 6987306.pdf file

<embed id="plugin" type="application/x-google-chrome-pdf" src="https://www.xxx.it/_iq3/carica_pdf.php" stream-url="blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/75707604-396B-48CE-8736-1FECC6CCD52E" headers="Cache-Control: max-age=0

Connection: close

Content-Disposition: inline; filename=6987306.pdf

Content-Length: 78468

Content-Type: application/pdf

Date: Wed, 03 Feb 2016 17:51:25 GMT

Expires: Thu, 19 Nov 1981 08:52:00 GMT

P3P: policyref=&quot;/w3c/p3p.xml&quot;, CP=&quot;NOI DSP COR NID CUR ADM DEV OUR BUS&quot;

Pragma: Public

Server: Apache

Set-Cookie: lpitgu=10db98ad4808b2091be97560b6877d2f; expires=Sun, 07-Feb-2016 17:51:25 GMT; path=/

" background-color="0xFF525659" top-toolbar-height="56" full-frame="">

Thanks

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 04, 2016 Feb 04, 2016

Copy link to clipboard

Copied

Hi,

I don't use asp or vbnet but I've had some past experience with aspx c#.net. I was very used to running around looking for libraries that would help me do anything the .net framework didn't already do. This is common to all languages as I'd do the same in ActionScript or JavaScript as well. There are many libraries out there that are designed to help deconstruct the PDF format. Have you looked for any yet?

How you're doing it now is assuming the object you're embedding has an API that reaches back to VB.net. From the header, you're using the built-in Chrome PDF reader, which to my knowledge has no real API. You can do things like select a page by appending that to the request but as far as reaching into the PDF I haven't found any API from Google to do that. And you can't depend on your audience having Chrome even if you did find one as many may have Adobe Reader.

I think your best bet, in any language, is to find a library (free or not) that deconstructs PDFs so you can access the parts you want. I did a quick search and found things like RADPDF(.com) but there's so many things out there and I don't know VB.NET enough to suggest anything. You really need to take a look at them. Good luck!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 04, 2016 Feb 04, 2016

Copy link to clipboard

Copied

LATEST

Hi, thanks for your answer, I' use iTextSharp to manage with pdf, but in this page I'm not able to extract the pdf from the embed.

I'm trying to disable the chrome plugin to see what happens to the embedded object and maybe find an api or write a js to extract the data.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines