Beispiel #1
0
        public mapItem[] ExportPDF(BLOB inputDocument, string fileName, string formatType, BLOB settingsDocument)
        {
            object[] results = this.Invoke("ExportPDF", new object[] {
                inputDocument,
                fileName,
                formatType,
                settingsDocument
            });

            return((mapItem[])(results[0]));
        }
Beispiel #2
0
 /// <remarks/>
 public void ExportPDFAsync(BLOB inputDocument, string fileName, string formatType, BLOB settingsDocument, object userState)
 {
     if ((this.ExportPDFOperationCompleted == null))
     {
         this.ExportPDFOperationCompleted = new System.Threading.SendOrPostCallback(this.OnExportPDFOperationCompleted);
     }
     this.InvokeAsync("ExportPDF", new object[] {
         inputDocument,
         fileName,
         formatType,
         settingsDocument
     }, this.ExportPDFOperationCompleted, userState);
 }
Beispiel #3
0
        public mapItem[] CreatePDF(BLOB inputDocument, string fileName, string fileTypeSettings, string pdfSettings, string securitySettings, BLOB settingsDocument, BLOB xmpDocument)
        {
            object[] results = this.Invoke("CreatePDF", new object[] {
                inputDocument,
                fileName,
                fileTypeSettings,
                pdfSettings,
                securitySettings,
                settingsDocument,
                xmpDocument
            });

            return((mapItem[])(results[0]));
        }
Beispiel #4
0
 /// <remarks/>
 public void CreatePDFAsync(BLOB inputDocument, string fileName, string fileTypeSettings, string pdfSettings, string securitySettings, BLOB settingsDocument, BLOB xmpDocument, object userState)
 {
     if ((this.CreatePDFOperationCompleted == null))
     {
         this.CreatePDFOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreatePDFOperationCompleted);
     }
     this.InvokeAsync("CreatePDF", new object[] {
         inputDocument,
         fileName,
         fileTypeSettings,
         pdfSettings,
         securitySettings,
         settingsDocument,
         xmpDocument
     }, this.CreatePDFOperationCompleted, userState);
 }
Beispiel #5
0
        public static DocsPaVO.documento.FileDocumento generatePdfService(DocsPaVO.documento.FileDocumento fileDocumento)
        {
            try
            {
                //Istanzio il servizio
                GeneratePdfService.GeneratePDFServiceService generatePdf = LCServicesManager.getGeneratePdfService();

                if (generatePdf != null)
                {
                    //Popolo il binaryData del BLOB
                    GeneratePdfService.BLOB inDoc = new GeneratePdfService.BLOB();
                    inDoc.binaryData = fileDocumento.content;

                    //Sepcifico le opzioni PDF e Security
                    //String adobePDFSettings = "Standard";
                    //String securitySettings = "No Security";
                    //String fileTypeSettings = "Standard";
                    String adobePDFSettings = "PDFA1b 2005 CMYK";
                    String securitySettings = "No Security";
                    String fileTypeSettings = "Standard PITRE";
                    //String fileTypeSettings = "Standard OCR";
                    byte[] resultBinaryFile = null;

                    //Converto in pdf
                    GeneratePdfService.mapItem[] createPDFResults = generatePdf.CreatePDF(inDoc, fileDocumento.name, fileTypeSettings, adobePDFSettings, securitySettings, null, null);
                    generatePdf.Dispose();

                    //Recupero il file convertito in pdf
                    for (int count = 0; count < createPDFResults.Length; ++count)
                    {
                        //Recupero un elemento dalla mappa
                        GeneratePdfService.mapItem mapEntry = createPDFResults[count];
                        String mapKey = mapEntry.key as String;

                        //La chiave della mappa del documento convertito sarà "ConvertedDoc"
                        if (mapKey.Equals("ConvertedDoc"))
                        {
                            GeneratePdfService.BLOB resultBlob = mapEntry.value as GeneratePdfService.BLOB;
                            resultBinaryFile = resultBlob.binaryData;
                        }
                    }

                    fileDocumento.fullName    = System.IO.Path.GetFileNameWithoutExtension(fileDocumento.fullName) + ".pdf";
                    fileDocumento.name        = System.IO.Path.GetFileNameWithoutExtension(fileDocumento.name) + ".pdf";
                    fileDocumento.contentType = "application/pdf";
                    fileDocumento.content     = resultBinaryFile;

                    //Faillace, segnalazione tiket 266571
                    //Inserita l'estensione e modifica nome file orginale.
                    fileDocumento.estensioneFile = "pdf";
                    if (!String.IsNullOrEmpty(fileDocumento.nomeOriginale))
                    {
                        fileDocumento.nomeOriginale = System.IO.Path.GetFileNameWithoutExtension(fileDocumento.nomeOriginale) + ".pdf";
                    }

                    return(fileDocumento);
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception e)
            {
                logger.Error("Errore in LiveCycle  - LCServices - metodo: generatePdfService()", e);
                return(null);
            }
        }
Beispiel #6
0
 /// <remarks/>
 public void ExportPDFAsync(BLOB inputDocument, string fileName, string formatType, BLOB settingsDocument)
 {
     this.ExportPDFAsync(inputDocument, fileName, formatType, settingsDocument, null);
 }
Beispiel #7
0
 /// <remarks/>
 public void HtmlToPDFAsync(string inputURL, string fileTypeSettings, string securitySettings, BLOB settingsDocument, BLOB xmpDocument, object userState)
 {
     if ((this.HtmlToPDFOperationCompleted == null))
     {
         this.HtmlToPDFOperationCompleted = new System.Threading.SendOrPostCallback(this.OnHtmlToPDFOperationCompleted);
     }
     this.InvokeAsync("HtmlToPDF", new object[] {
         inputURL,
         fileTypeSettings,
         securitySettings,
         settingsDocument,
         xmpDocument
     }, this.HtmlToPDFOperationCompleted, userState);
 }
Beispiel #8
0
 /// <remarks/>
 public void HtmlToPDFAsync(string inputURL, string fileTypeSettings, string securitySettings, BLOB settingsDocument, BLOB xmpDocument)
 {
     this.HtmlToPDFAsync(inputURL, fileTypeSettings, securitySettings, settingsDocument, xmpDocument, null);
 }
Beispiel #9
0
        public mapItem[] HtmlToPDF(string inputURL, string fileTypeSettings, string securitySettings, BLOB settingsDocument, BLOB xmpDocument)
        {
            object[] results = this.Invoke("HtmlToPDF", new object[] {
                inputURL,
                fileTypeSettings,
                securitySettings,
                settingsDocument,
                xmpDocument
            });

            return((mapItem[])(results[0]));
        }
Beispiel #10
0
 /// <remarks/>
 public void CreatePDFAsync(BLOB inputDocument, string fileName, string fileTypeSettings, string pdfSettings, string securitySettings, BLOB settingsDocument, BLOB xmpDocument)
 {
     this.CreatePDFAsync(inputDocument, fileName, fileTypeSettings, pdfSettings, securitySettings, settingsDocument, xmpDocument, null);
 }