Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

File size increasing while converting from pdf to pdf/A

$
0
0
Hi,
      When I am converting PDF to PDF/A, the size is increasing from 14 KB to 1859 KB, we are using License version "9.4.0.0",
Attached are  the Image

Please find My Code Snippet

 public static string ConvertPdfToPdfA(string file, string fileName, string destinationFolder)
        {
            try
            {
                var pdfADoc = new Aspose.Pdf.Document(file);
                pdfADoc.Convert("log.xml", PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);

                pdfADoc.OptimizeResources(new Document.OptimizationOptions()
                {
                    RemoveUnusedObjects = true,
                    RemoveUnusedStreams = true,
                    CompressImages = true,
                    UnembedFonts = false,
                    LinkDuplcateStreams = false,
                    ImageQuality = 10
                });
                pdfADoc.Save(destinationFolder + "\\" + fileName + ".pdf");
                return destinationFolder + "\\" + fileName + ".pdf";
            }
            catch (Exception exception)
            {

                return string.Empty;
            }

        }


Regards

Srikant Bal

Viewing all articles
Browse latest Browse all 3131

Trending Articles