PDF-A creation

Last post 01-16-2012, 4:46 AM by aspose.notifier. 14 replies.
Sort Posts: Previous Next
  •  12-23-2010, 2:46 PM 275355

    PDF-A creation .NET

    Hi,
    I have Aspose Total license, i want to create PDF-A as below
    1. Saving existing PDF as PDF-A for long term archival
    2. Directly saving content as PDFA.

    Are these possible using Aspose?
    I heard that PDFA component is in Beta..is this true? If so cant i rely on it?

    Thanks,
    Sanjeev
     
  •  12-23-2010, 2:59 PM 275356 in reply to 275362

    PDFA

    HI,

     Need help in creating PDF-A using Aspose PDF Kit of PDF. Is it possible?

    Do i have any constraints in creating fully compliant PDF-A file?

    Is it fully compliant?

    Any idea when this can be released?


    This message was posted using Email2Forum by codewarior.
     
  •  12-23-2010, 4:05 PM 275362 in reply to 275355

    Re: PDF-A creation

    ursanju:
    Hi,
    I have Aspose Total license, i want to create PDF-A as below
    1. Saving existing PDF as PDF-A for long term archival
    Thanks for using our products.
    We have a component named Aspose.Pdf.Kit which is used to edit/manipulate the existing PDF documents. I am afraid the feature of converting existing PDF documents into PDF-A is currently not supported. However, this requirement is already logged in our issue tracking system as PDFKITNET-10208. Our development team is working over this requirement and as soon as the feature becomes available, you will be updated with in this forum thread. Please be patient and spare us little time. We apologize for your inconvenience.
     
    ursanju:
    2. Directly saving content as PDFA.

    Are these possible using Aspose?
    I heard that PDFA component is in Beta..is this true? If so cant i rely on it?

    Thanks,
    Sanjeev

    We have a component named Aspose.Pdf, which is used to generate PDF documents from scratch. From your above question, if you need to generate a new PDF file and want to save it as PDF-A, then I am pleased to inform you that this feature is supported by Aspose.Pdf. For further information, please visit How to create PDF/A-1 with Aspose.Pdf

    This feature is not in Beta phase. Please try using it and in case you encounter any problem, please feel free to contact.


    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  12-23-2010, 8:36 PM 275389 in reply to 275362

    Re: PDF-A creation

                                    We have used two methods for converting pdf to pdfcompliant which are mentioned below, but both are failed.

    Method 1:          

                                     

                                        Aspose.Pdf.License lic = new Aspose.Pdf.License();

                    lic.SetLicense("Aspose.Total.lic");

              

                    Pdf objPDF = new Pdf();

                  

     

                    //Set the conformance property of Pdf class to predefined value

                    objPDF.Conformance = PdfConformance.PdfA1A;

     

                    //Add a section into the pdf document

     

                    Aspose.Pdf.Section section = objPDF.Sections.Add();

     

                   

                    //Save the document

                    objPDF.Save(@"C:\pdfcompliant.pdf");

     

    Result: PDF File save like a Blank  Page.

     

    Method 2:

                                        Aspose.Pdf.License lic = new Aspose.Pdf.License();

                    lic.SetLicense("Aspose.Total.lic");

              

                    Pdf objPDF = new Pdf();

                  

     

                    //Set the conformance property of Pdf class to predefined value

                    objPDF.Conformance = PdfConformance.PdfA1A;

     

                    //Add a section into the pdf document

     

                    Aspose.Pdf.Section section = objPDF.Sections.Add();

          

    //Create an image object in the section

     

                    Aspose.Pdf.Image image = new Aspose.Pdf.Image(section);

     

                    //Add image object into the Paragraphs collection of the section

     

                    section.Paragraphs.Add(image);

     

                    //Set the stream of image file

                   image.ImageInfo.ImageStream = imageStream;

     

                   

                    //Save the document

                    objPDF.Save(@"C:\pdfcompliant.pdf");

     

    Result: Error: Parameter is not valid

     
  •  12-24-2010, 12:06 AM 275397 in reply to 275389

    Re: PDF-A creation

    Attachment: Present (inaccessible)
    ursanju:

                                    We have used two methods for converting pdf to pdfcompliant which are mentioned below, but both are failed.

    Method 1:          

                                     

                                        Aspose.Pdf.License lic = new Aspose.Pdf.License();

                    lic.SetLicense("Aspose.Total.lic");

              

                    Pdf objPDF = new Pdf();

                     //Set the conformance property of Pdf class to predefined value

                    objPDF.Conformance = PdfConformance.PdfA1A;

                    //Add a section into the pdf document

                    Aspose.Pdf.Section section = objPDF.Sections.Add();

                    //Save the document
                   
    objPDF.Save(@"C:\pdfcompliant.pdf");

     

    Result: PDF File save like a Blank  Page.

     

    Hi,

    Thanks for sharing the code snippet. You are getting a blank PDF because you have not placed any paragraph object (Text, Image, Table, Graph, Attachment) inside PDF section. Please add the following code lines to add a text paragraph to resultant PDF.

    [C#]

    // create text paragraph
    Text sampletext = new Text("Hello World");
    // add text paragraph to paragraphs collection of Pdf document
    section.Paragraphs.Add(sampletext);

    ursanju:

    Method 2:

         Aspose.Pdf.License lic = new Aspose.Pdf.License();
       
    lic.SetLicense("Aspose.Total.lic");

       Pdf objPDF = new Pdf();
       
    //Set the conformance property of Pdf class to predefined value
       
    objPDF.Conformance = PdfConformance.PdfA1A;

       //Add a section into the pdf document
       
    Aspose.Pdf.Section section = objPDF.Sections.Add();

       //Create an image object in the section
       
    Aspose.Pdf.Image image = new Aspose.Pdf.Image(section);

       //Add image object into the Paragraphs collection of the section
       
    section.Paragraphs.Add(image);

       //Set the stream of image file
       
    image.ImageInfo.ImageStream = imageStream;

       //Save the document
       
    objPDF.Save(@"C:\pdfcompliant.pdf");

    Result: Error: Parameter is not valid

    I have tested the scenario using following code snippet with Aspose.Pdf for .NET 4.8.0 and I am unable to notice any problem. Can you please make sure that the source Stream is in correct format. However, I have used the following code snippet and the PDF document is properly being generated. I have also attached the resultant PDF that I have generated. We are sorry for your inconvenience.

    [C#]

    // create a FileStream object for image file
    FileStream fs = new FileStream(@"d:/pdftest/Penguins.jpg", FileMode.Open);
    Pdf objPDF = new Pdf
    ();
    //Set the conformance property of Pdf class to predefined value
    objPDF.Conformance = PdfConformance
    .PdfA1A;
    //Add a section into the pdf document
    Aspose.Pdf.Section
    section = objPDF.Sections.Add();

    //Create an image object in the section
    Aspose.Pdf.Image image = new Aspose.Pdf.Image
    (section);
    //Add image object into the Paragraphs collection of the section
    section.Paragraphs.Add(image);
    //Set the stream of image file
    image.ImageInfo.ImageStream = fs;
    //Save the document
    objPDF.Save(@"d:/pdftest/pdfcompliant.pdf"
    );
    fs.Close();


    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  12-25-2010, 1:08 PM 275477 in reply to 275397

    Re: PDF-A creation

    Thank you for your response.
    But our problem is not solved.
    Here is the exact description of our problem with 2 scenarios

                    1)PDF Document to PDF compliant :

                                    As per our requirement we need to convert pdf document(remember.. existing PDF file) to pdfacompliant for that  we have used below method which is not working.

        //create a FileStream object for Pdf file

                    FileStream fs = new FileStream(@"C:\PdfTestFile.Pdf", FileMode.Open);

                    Pdf objPDF = new Pdf();

                    //Set the conformance property of Pdf class to predefined value

                    objPDF.Conformance = PdfConformance.PdfA1A;

                    //Add a section into the pdf document

                    Aspose.Pdf.Section section = objPDF1.Sections.Add();

                    //Create an image object in the section

                    Aspose.Pdf.Image image = new Aspose.Pdf.Image(section);

                    //Add image object into the Paragraphs collection of the section

                    section.Paragraphs.Add(image);

                    //Set the stream of pdf file

                    image.ImageInfo.ImageStream = fs;

                    //Save the document

                    objPDF.Save(@"C:\pdfcomplianttest.pdf");

                    fs.Close ();                              

                                    Result: Error: Parameter is not valid

     

     

                    2)PDF Document page to Image(bmp,jpeg):

     

                                    Converting Pdf page to image(bmp,jpeg) for that we have used below method, which not working for all the pdf files,It gives blank page or symbols or images .

    It does not extracting text.

     

    byte [] yFullImage = null;

     

    Aspose.Pdf.Kit.License lic = new Aspose.Pdf.Kit.License();

    lic.SetLicense("Aspose.Total.lic");

     

    //Create File Editor object

    PdfFileEditor pdfEditor = new PdfFileEditor();

    //Create file pdf stream object

    using (FileStream inputStream = new FileStream(C:\PDFDocument.pdf", FileMode.Open))

     {

      using (MemoryStream msOutStream = new MemoryStream())

      {

         //Extract Pdf page from pdf file and assign to MemoryStream Object

         bool bsuccess = pdfEditor.Extract(inputStream, 1, 1, msOutStream);

     

    // Create converter object for converting pdf page to jpeg

         PdfConverter pdfConverter = new PdfConverter();

         pdfConverter.BindPdf(msOutStream);

         pdfConverter.DoConvert();

         if(pdfConverter.HasNextImage())

         {

           using (MemoryStream msOutPutImage = new MemoryStream())

           {

               pdfConverter.GetNextImage(msOutPutImage,System.Drawing.Imaging.ImageFormat.Jpeg);

     

    //Memory stream converting byte array

    yFullImage = msOutPutImage.ToArray();

     

                  msOutStream.Close();

            }

          }

            pdfConverter.Close();

                           

        }

       } 

    Result: white page/ some symbols/some images ……… Totally fail to extracting text.

     
  •  12-27-2010, 10:26 PM 275684 in reply to 275477

    Re: PDF-A creation

    ursanju:
    Thank you for your response.
    But our problem is not solved.
    Here is the exact description of our problem with 2 scenarios

                    1)PDF Document to PDF compliant :

                                    As per our requirement we need to convert pdf document(remember.. existing PDF file) to pdfacompliant for that  we have used below method which is not working.

        //create a FileStream object for Pdf file

                    FileStream fs = new FileStream(@"C:\PdfTestFile.Pdf", FileMode.Open);

                    Pdf objPDF = new Pdf();

                    //Set the conformance property of Pdf class to predefined value

                    objPDF.Conformance = PdfConformance.PdfA1A;

                    //Add a section into the pdf document

                    Aspose.Pdf.Section section = objPDF1.Sections.Add();

                    //Create an image object in the section

                    Aspose.Pdf.Image image = new Aspose.Pdf.Image(section);

                    //Add image object into the Paragraphs collection of the section

                    section.Paragraphs.Add(image);

                    //Set the stream of pdf file

                    image.ImageInfo.ImageStream = fs;

                    //Save the document

                    objPDF.Save(@"C:\pdfcomplianttest.pdf");

                    fs.Close ();                              

                                    Result: Error: Parameter is not valid

     

    Hi,

    Thanks for the information and the code snippet. Aspose.Pdf is a component which offers the capability to generate PDF documents from scratch. However, in order to edit/manipulate existing PDF documents, you need to try using Aspose.Pdf.Kit which provides the feature of working with existing PDF files. As per your requirement on converting existing PDF file into PDF-A compliant format, I am afraid this feature is currently not supported. However, for the sake of correction, this requirement has already been logged in our issue tracking system as PDFKIENET-10208. Our development team is working over this requirement and once we have some definite news regarding its resolution, we would be pleased to update you with the status of correction. We apologize for your inconvenience.

     

    ursanju:

    2)PDF Document page to Image(bmp,jpeg):

     

                                    Converting Pdf page to image(bmp,jpeg) for that we have used below method, which not working for all the pdf files,It gives blank page or symbols or images .

    It does not extracting text.

     

    byte [] yFullImage = null;

     

    Aspose.Pdf.Kit.License lic = new Aspose.Pdf.Kit.License();

    lic.SetLicense("Aspose.Total.lic");

     

    //Create File Editor object

    PdfFileEditor pdfEditor = new PdfFileEditor();

    //Create file pdf stream object

    using (FileStream inputStream = new FileStream(C:\PDFDocument.pdf", FileMode.Open))

     {

      using (MemoryStream msOutStream = new MemoryStream())

      {

         //Extract Pdf page from pdf file and assign to MemoryStream Object

         bool bsuccess = pdfEditor.Extract(inputStream, 1, 1, msOutStream);

     

    // Create converter object for converting pdf page to jpeg

         PdfConverter pdfConverter = new PdfConverter();

         pdfConverter.BindPdf(msOutStream);

         pdfConverter.DoConvert();

         if(pdfConverter.HasNextImage())

         {

           using (MemoryStream msOutPutImage = new MemoryStream())

           {

               pdfConverter.GetNextImage(msOutPutImage,System.Drawing.Imaging.ImageFormat.Jpeg);

     

    //Memory stream converting byte array

    yFullImage = msOutPutImage.ToArray();

     

                  msOutStream.Close();

            }

          }

            pdfConverter.Close();

                           

        }

       } 

    Result: white page/ some symbols/some images ……… Totally fail to extracting text.

    For this particular issue, I have asked my fellow colleague to look into the details of this matter and soon you will be updated with the status of correction. However, I would request you to please share the source PDF document that is causing an issue so that we can test the scenario at our end. We are sorry for the delay and inconvenience.


    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  12-28-2010, 1:02 AM 275695 in reply to 275684

    Re: PDF-A creation

    Hi Sanjeev,

    First off, please download the latest version of Aspose.Pdf.Kit for .NET and try the PDF to image conversion with that. If it doesn't resolve your issue then please share the input PDF file (PDFDocument.pdf) with us, so we could test the issue at our end. You'll be updated with the results accordingly.

    We're sorry for the inconvenience.
    Regards,



    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  12-29-2010, 12:53 AM 275797 in reply to 275695

    Re: PDF-A creation

    Attachment: Present (inaccessible)
    Hi,
    The problem(Pdf page to Image) not resolved with Latest Version of Aspose.Pdf.Kit(5.0.0.1 Date:8
    th Dec 2010) , here attached pdf documents please look into it.

    Thanks,
    Sanjeev
     
  •  12-29-2010, 8:15 AM 275840 in reply to 275797

    Re: PDF-A creation

    Hi Sanjeev,

    I have tested this issue using your sample files with the latest version but could not reproduce this problem. I would like to share that the latest version is Aspose.Pdf.Kit for .NET 5.1.0. You may download it from this link. If you still find the same issue at your end then please share some more details regarding your working environment i.e. OS, .NET version etc.

    We're sorry for the inconvenience and looking forward to help you out.
    Regards,

    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  05-04-2011, 8:58 AM 301322 in reply to 275362

    Re: PDF-A creation

    codewarior:
    Thanks for using our products.
    We have a component named Aspose.Pdf.Kit which is used to edit/manipulate the existing PDF documents. I am afraid the feature of converting existing PDF documents into PDF-A is currently not supported. However, this requirement is already logged in our issue tracking system as PDFKITNET-10208. Our development team is working over this requirement and as soon as the feature becomes available, you will be updated with in this forum thread. Please be patient and spare us little time. We apologize for your inconvenience.
     


    Hello,

    We have a Aspose Total License and we need the PDF to PDF/A conversion feature. Can you inform me on the status of this issue PDFKITNET-10208?

    We need this feature very soon (within a week), so if this feature is not available yet, maybe there is a beta version we can test?

    Thanks in advance.
     
  •  05-05-2011, 1:00 AM 301419 in reply to 301322

    Re: PDF-A creation

    Hi Vincent,

    I'm sorry to inform you that this feature is not supported yet. Our team is working on this feature and it is expected at the end of June or early July 2011. I'm afraid, it is not feasible for us to provide this feature in a week or so. Please spare us some time for the implementation and testing of this feature. You'll be notified via this forum thread once it is supported.

    We're sorry for the inconvenience and appreciate your cooperation.
    Regards,

    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  05-16-2011, 10:31 AM 303659 in reply to 301419

    Re: PDF-A creation

    Hi shahzad.latif,

    Are any updates about PDF to PDF/A conversion? Is release of this feature still scheduled on June/July of 2011 year?

    Best regards,
    Alex Shloma
     
  •  05-17-2011, 2:08 AM 303874 in reply to 303659

    Re: PDF-A creation

    Hi Alex,

    Yes, this release is still scheduled for early July 2011. I hope this helps. If you have any further questions, please do let us know.

    Regards,



    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  01-16-2012, 4:46 AM 355370 in reply to 275355

    Re: PDF-A creation

    The issues you have found earlier (filed as PDFNEWNET-10208;PDFNEWNET-10208;PDFNEWNET-10208) have been fixed in this update.


    This message was posted using Notification2Forum from Downloads module by aspose.notifier.
    (15)
     
View as RSS news feed in XML