/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.3.0
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.chilkatsoft;

public class CkPdf {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected CkPdf(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(CkPdf obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected static long swigRelease(CkPdf obj) {
    long ptr = 0;
    if (obj != null) {
      if (!obj.swigCMemOwn)
        throw new RuntimeException("Cannot release ownership as memory is not owned");
      ptr = obj.swigCPtr;
      obj.swigCMemOwn = false;
      obj.delete();
    }
    return ptr;
  }

  @SuppressWarnings({"deprecation", "removal"})
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        chilkatJNI.delete_CkPdf(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CkPdf() {
    this(chilkatJNI.new_CkPdf(), true);
  }

  public void LastErrorXml(CkString str) {
    chilkatJNI.CkPdf_LastErrorXml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void LastErrorHtml(CkString str) {
    chilkatJNI.CkPdf_LastErrorHtml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void LastErrorText(CkString str) {
    chilkatJNI.CkPdf_LastErrorText(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void put_EventCallbackObject(CkBaseProgress progress) {
    chilkatJNI.CkPdf_put_EventCallbackObject(swigCPtr, this, CkBaseProgress.getCPtr(progress), progress);
  }

  public void get_DebugLogFilePath(CkString str) {
    chilkatJNI.CkPdf_get_DebugLogFilePath(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String debugLogFilePath() {
    return chilkatJNI.CkPdf_debugLogFilePath(swigCPtr, this);
  }

  public void put_DebugLogFilePath(String newVal) {
    chilkatJNI.CkPdf_put_DebugLogFilePath(swigCPtr, this, newVal);
  }

  public boolean get_HasCertificationSig() {
    return chilkatJNI.CkPdf_get_HasCertificationSig(swigCPtr, this);
  }

  public void get_LastErrorHtml(CkString str) {
    chilkatJNI.CkPdf_get_LastErrorHtml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorHtml() {
    return chilkatJNI.CkPdf_lastErrorHtml(swigCPtr, this);
  }

  public void get_LastErrorText(CkString str) {
    chilkatJNI.CkPdf_get_LastErrorText(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorText() {
    return chilkatJNI.CkPdf_lastErrorText(swigCPtr, this);
  }

  public void get_LastErrorXml(CkString str) {
    chilkatJNI.CkPdf_get_LastErrorXml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorXml() {
    return chilkatJNI.CkPdf_lastErrorXml(swigCPtr, this);
  }

  public boolean get_LastMethodSuccess() {
    return chilkatJNI.CkPdf_get_LastMethodSuccess(swigCPtr, this);
  }

  public void put_LastMethodSuccess(boolean newVal) {
    chilkatJNI.CkPdf_put_LastMethodSuccess(swigCPtr, this, newVal);
  }

  public int get_NumEmbeddedFiles() {
    return chilkatJNI.CkPdf_get_NumEmbeddedFiles(swigCPtr, this);
  }

  public int get_NumPages() {
    return chilkatJNI.CkPdf_get_NumPages(swigCPtr, this);
  }

  public int get_NumSignatures() {
    return chilkatJNI.CkPdf_get_NumSignatures(swigCPtr, this);
  }

  public void get_OwnerPassword(CkString str) {
    chilkatJNI.CkPdf_get_OwnerPassword(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String ownerPassword() {
    return chilkatJNI.CkPdf_ownerPassword(swigCPtr, this);
  }

  public void put_OwnerPassword(String newVal) {
    chilkatJNI.CkPdf_put_OwnerPassword(swigCPtr, this, newVal);
  }

  public int get_SigAllocateSize() {
    return chilkatJNI.CkPdf_get_SigAllocateSize(swigCPtr, this);
  }

  public void put_SigAllocateSize(int newVal) {
    chilkatJNI.CkPdf_put_SigAllocateSize(swigCPtr, this, newVal);
  }

  public void get_UncommonOptions(CkString str) {
    chilkatJNI.CkPdf_get_UncommonOptions(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String uncommonOptions() {
    return chilkatJNI.CkPdf_uncommonOptions(swigCPtr, this);
  }

  public void put_UncommonOptions(String newVal) {
    chilkatJNI.CkPdf_put_UncommonOptions(swigCPtr, this, newVal);
  }

  public void get_UserPassword(CkString str) {
    chilkatJNI.CkPdf_get_UserPassword(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String userPassword() {
    return chilkatJNI.CkPdf_userPassword(swigCPtr, this);
  }

  public void put_UserPassword(String newVal) {
    chilkatJNI.CkPdf_put_UserPassword(swigCPtr, this, newVal);
  }

  public boolean get_VerboseLogging() {
    return chilkatJNI.CkPdf_get_VerboseLogging(swigCPtr, this);
  }

  public void put_VerboseLogging(boolean newVal) {
    chilkatJNI.CkPdf_put_VerboseLogging(swigCPtr, this, newVal);
  }

  public void get_Version(CkString str) {
    chilkatJNI.CkPdf_get_Version(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String version() {
    return chilkatJNI.CkPdf_version(swigCPtr, this);
  }

  public boolean AddEmbeddedFiles(CkJsonObject json, String outFilePath) {
    return chilkatJNI.CkPdf_AddEmbeddedFiles(swigCPtr, this, CkJsonObject.getCPtr(json), json, outFilePath);
  }

  public boolean AddEmbeddedFilesBd(CkJsonObject json, CkBinData bd) {
    return chilkatJNI.CkPdf_AddEmbeddedFilesBd(swigCPtr, this, CkJsonObject.getCPtr(json), json, CkBinData.getCPtr(bd), bd);
  }

  public boolean AddSigningCert(CkCert cert) {
    return chilkatJNI.CkPdf_AddSigningCert(swigCPtr, this, CkCert.getCPtr(cert), cert);
  }

  public boolean AddVerificationInfo(CkJsonObject jsonOptions, String outFilePath) {
    return chilkatJNI.CkPdf_AddVerificationInfo(swigCPtr, this, CkJsonObject.getCPtr(jsonOptions), jsonOptions, outFilePath);
  }

  public CkTask AddVerificationInfoAsync(CkJsonObject jsonOptions, String outFilePath) {
    long cPtr = chilkatJNI.CkPdf_AddVerificationInfoAsync(swigCPtr, this, CkJsonObject.getCPtr(jsonOptions), jsonOptions, outFilePath);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean GetDss(CkJsonObject json) {
    return chilkatJNI.CkPdf_GetDss(swigCPtr, this, CkJsonObject.getCPtr(json), json);
  }

  public boolean GetEmbeddedFileBd(int index, CkBinData bd) {
    return chilkatJNI.CkPdf_GetEmbeddedFileBd(swigCPtr, this, index, CkBinData.getCPtr(bd), bd);
  }

  public boolean GetEmbeddedFileInfo(int index, CkJsonObject json) {
    return chilkatJNI.CkPdf_GetEmbeddedFileInfo(swigCPtr, this, index, CkJsonObject.getCPtr(json), json);
  }

  public void GetLastJsonData(CkJsonObject json) {
    chilkatJNI.CkPdf_GetLastJsonData(swigCPtr, this, CkJsonObject.getCPtr(json), json);
  }

  public boolean GetMetadata(CkStringBuilder sb) {
    return chilkatJNI.CkPdf_GetMetadata(swigCPtr, this, CkStringBuilder.getCPtr(sb), sb);
  }

  public boolean GetSignatureContent(int index, CkBinData bd) {
    return chilkatJNI.CkPdf_GetSignatureContent(swigCPtr, this, index, CkBinData.getCPtr(bd), bd);
  }

  public boolean GetSignerCert(int index, CkCert cert) {
    return chilkatJNI.CkPdf_GetSignerCert(swigCPtr, this, index, CkCert.getCPtr(cert), cert);
  }

  public boolean GetUnsignedSigFields(CkJsonObject json) {
    return chilkatJNI.CkPdf_GetUnsignedSigFields(swigCPtr, this, CkJsonObject.getCPtr(json), json);
  }

  public CkJsonObject LastJsonData() {
    long cPtr = chilkatJNI.CkPdf_LastJsonData(swigCPtr, this);
    return (cPtr == 0) ? null : new CkJsonObject(cPtr, true);
  }

  public boolean LoadBd(CkBinData pdfData) {
    return chilkatJNI.CkPdf_LoadBd(swigCPtr, this, CkBinData.getCPtr(pdfData), pdfData);
  }

  public boolean LoadFile(String filePath) {
    return chilkatJNI.CkPdf_LoadFile(swigCPtr, this, filePath);
  }

  public void SetHttpObj(CkHttp http) {
    chilkatJNI.CkPdf_SetHttpObj(swigCPtr, this, CkHttp.getCPtr(http), http);
  }

  public boolean SetSignatureJpeg(CkBinData jpgData) {
    return chilkatJNI.CkPdf_SetSignatureJpeg(swigCPtr, this, CkBinData.getCPtr(jpgData), jpgData);
  }

  public boolean SetSigningCert(CkCert cert) {
    return chilkatJNI.CkPdf_SetSigningCert(swigCPtr, this, CkCert.getCPtr(cert), cert);
  }

  public boolean SetSigningCert2(CkCert cert, CkPrivateKey privateKey) {
    return chilkatJNI.CkPdf_SetSigningCert2(swigCPtr, this, CkCert.getCPtr(cert), cert, CkPrivateKey.getCPtr(privateKey), privateKey);
  }

  public boolean SignPdf(CkJsonObject jsonOptions, String outFilePath) {
    return chilkatJNI.CkPdf_SignPdf(swigCPtr, this, CkJsonObject.getCPtr(jsonOptions), jsonOptions, outFilePath);
  }

  public CkTask SignPdfAsync(CkJsonObject jsonOptions, String outFilePath) {
    long cPtr = chilkatJNI.CkPdf_SignPdfAsync(swigCPtr, this, CkJsonObject.getCPtr(jsonOptions), jsonOptions, outFilePath);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean SignPdfBd(CkJsonObject jsonOptions, CkBinData bd) {
    return chilkatJNI.CkPdf_SignPdfBd(swigCPtr, this, CkJsonObject.getCPtr(jsonOptions), jsonOptions, CkBinData.getCPtr(bd), bd);
  }

  public CkTask SignPdfBdAsync(CkJsonObject jsonOptions, CkBinData bd) {
    long cPtr = chilkatJNI.CkPdf_SignPdfBdAsync(swigCPtr, this, CkJsonObject.getCPtr(jsonOptions), jsonOptions, CkBinData.getCPtr(bd), bd);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean UpdateMetadata(CkStringBuilder sb, String outFilePath) {
    return chilkatJNI.CkPdf_UpdateMetadata(swigCPtr, this, CkStringBuilder.getCPtr(sb), sb, outFilePath);
  }

  public boolean UpdateMetadataBd(CkStringBuilder sb, CkBinData bd) {
    return chilkatJNI.CkPdf_UpdateMetadataBd(swigCPtr, this, CkStringBuilder.getCPtr(sb), sb, CkBinData.getCPtr(bd), bd);
  }

  public boolean VerifySignature(int index, CkJsonObject sigInfo) {
    return chilkatJNI.CkPdf_VerifySignature(swigCPtr, this, index, CkJsonObject.getCPtr(sigInfo), sigInfo);
  }

}
