Donnez vie à vos documents numériques !
 

Répondre à : Problématique annotations partagées – Reader XI

abracadabraPDF Forums PDF – Général Problématique annotations partagées – Reader XI Répondre à : Problématique annotations partagées – Reader XI

#59356
tchern
Membre

Salut,

app.execMenuItem(« ShowHideToolbarCommenting »);
–> ça me renvoi « undefined »
J’ai essayé plusieurs chose mais impossible d’afficher la barre par défaut :/

Mais je me demande si j’ai bon dans les droits qui je positionne sur le pdf, je m’explique :

J’ai donc un fichier .fdf que j’ouvre avec IE qui contient un lien vers mon pdf.
Le pdf est autorisé via livecycle (8.2), j’ai mis tous les droits possible, je vous met le code java :

Code:
    private InputStream extendedPermission(File fichierPdfAHabiliter) throws ReaderExtensionsException, DSCException, FileNotFoundException
    {
        // Set connection properties required to invoke LiveCycle ES2 using SOAP mode
        Properties connectionProps = new Properties();
        connectionProps.setProperty(ServiceClientFactoryProperties.D SC_DEFAULT_SOAP_ENDPOINT, « http://XXXXXXXX.XXXXXX.XXXXXX:8080 »);
        connectionProps.setProperty(ServiceClientFactoryProperties.D SC_TRANSPORT_PROTOCOL, ServiceClientFactoryProperties.D SC_SOAP_PROTOCOL);
        connectionProps.setProperty(ServiceClientFactoryProperties.D SC_SERVER_TYPE, « JBoss »);
        connectionProps.setProperty(ServiceClientFactoryProperties.D SC_CREDENTIAL_USERNAME, « XXXXXXXXXX »);
        connectionProps.setProperty(ServiceClientFactoryProperties.D SC_CREDENTIAL_PASSWORD, « XXXXXXXX »);

        // Create a ServiceClientFactory object
        ServiceClientFactory myFactory = ServiceClientFactory.createInsta nce(connectionProps);

        // Create a ReaderExtensionsServiceClient object
        ReaderExtensionsServiceClient reClient = new ReaderExtensionsServiceClient(myFactory);

        // Retrieve the PDF document to which to apply usage rights
        FileInputStream fileInputStream = new FileInputStream(fichierPdfAHabiliter);
        Document inputPDF = new Document(fileInputStream);

        // Create a UsageRight object and specify specific usage rights
        UsageRights useRight = new UsageRights();
        useRight.setEnabledComments(true);
        useRight.setEnabledCommentsOnlin e(true);
        useRight.setEnabledEmbeddedFiles(true);
        useRight.setEnabledFormDataImpor tExport(true);
        useRight.setEnabledOnlineForms(true);
        useRight.setEnabledSubmitStandal one(true);
        useRight.setEnabledBarcodeDecodi ng(true);
        useRight.setEnabledDigitalSignat ures(true);
        useRight.setEnabledDynamicFormFi elds(true);
        useRight.setEnabledDynamicFormPa ges(true);
        useRight.setEnabledFormFillIn(true);

        // Create a ReaderExtensionsOptions object
        ReaderExtensionsOptionSpec reOptions = new ReaderExtensionsOptionSpec();
        reOptions.setModeFinal(false);

        // Set the usage rights
        reOptions.setUsageRights(useRight);
        reOptions.setMessage(« This is a Rights-Enabled PDF Document »);

        // Apply usage rights to a PDF document
        Document rightsEnabledPDF = reClient.applyUsageRights(
                        inputPDF,
                        « XXXXXXXXXXXXXXXXXXXXX »,
                        null,
                        reOptions);

        String contentType = rightsEnabledPDF.getContentType();

        return rightsEnabledPDF.getInputStream();
    }

Dans mon fichier FDF j’ai inséré le script suivant :

Code:
function callService(value)
{
  console.println(« Call : callService(« +value+ ») »);
  SOAP.wireDump=false;
  var cWSURL = « http://XXXXXXXX.XXXXX.XXXXXXXXX:9800/ged-annotation-web/services/testAdobeWsService?wsdl »;
  var mynamespace = « http://ws.web.XXXXXXX.domaine.XXXXXXXXX.com/: »;
 
  //construction objet d’appel
  var sendRequest = {};
  sendRequest[mynamespace+ »test »] = {essaiDto:{annotationDto:value}};
 
  //appel service
  var result = Net.SOAP.request ({
      cURL: cWSURL,
      oRequest: sendRequest
  });

  console.println(« nOUTValue : « +result[mynamespace+ »testResponse »][« return »]);
}

Quand j’ouvre tous ça dans IE avec adobe reader DC j’ai le message suivant dans la console :

Code:
NotAllowedError: Not allowed Error: Security settings prevent access to this property or method

Normalement j’ai bien mis tous les droits, je comprend pas pourquoi cela ne fonctionne pas, quand j’essai avec acrobat forcément ça fonctionne :/