Dear All,

I have searched pdf viewer in the internet. I have found some library and I have tried the code, but it still occured error. Some library is work but it must be on the internet connection.
I want to make the pdf viewer on my web in the local network. I need your help to complete it.

Thanks in advance.

Please explain what tool you are using, and show us (part of) the code that is not working as expected. Do not forget to add what you want to achieve.

Thank you pritaeas.

I use vuzit 2.1 library.
the code is shown below.

 <?php
  include_once "VuzitPHP/lib/vuzit.php";

  Vuzit_Service::setPublicKey('YOUR_PUBLIC_API_KEY');
  Vuzit_Service::setPrivateKey('YOUR_PRIVATE_API_KEY');

  $doc = Vuzit_Document::upload("syntax.pdf");
  echo "Document id: " . $doc->getId();
  ?>

And the error occured is shown below.

Fatal error: Uncaught Vuzit_ClientException: [0]: CURL load failed: "couldn't connect to host" thrown in C:\xampp\htdocs\vuzit\VuzitPHP\lib\document.php on line 204

Are you sure that the cUrl extension is enabled in the PHP.INI of your XAMPP installation ?

CURL load failed: "couldn't connect to host" thrown in C:\xampp\htdocs\vuzit\VuzitPHP\lib\document.php on line 204

What's on that line ?

Yes, I'm sure.

204 $params = self::parametersClean($params);

I doubt my php is incompatible with the library.
Do you have any solution?
Maybe another library on php.

Are you sure your code can find syntax.pdf on the server ?

If it's just for viewing, IIRC Mozilla developed pdf.js

yes. syntax.pdf is available.

I just want to view pdf in web, but it could't be copied and downloaded.

Scribd perhaps?

is it open source?
or it must refer to online source code?

I need an open source, Sir.
I am going to implement in my local network.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.