Program.cs 590 B

12345678910111213141516171819202122232425
  1. #region Perparation work
  2. using ComPDFKit.PDFDocument;
  3. Console.WriteLine("Running Url Load test sample…\r\n");
  4. bool statue= SDKLicenseHelper.LicenseVerify();
  5. #endregion
  6. #region Sample 1: Open File With Url
  7. if (statue)
  8. {
  9. string url = "https://www.compdf.com/webviewer/example/developer_guide_web.pdf";
  10. CPDFDocument pdfDoc = CPDFDocument.InitWithUrl(url);
  11. if(pdfDoc != null)
  12. {
  13. Console.WriteLine("Load File With Url Done.");
  14. pdfDoc.Release();
  15. }
  16. }
  17. #endregion
  18. Console.WriteLine("Done.");
  19. Console.WriteLine("--------------------");
  20. Console.ReadLine();