🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Ramazan HABER / C# RMOS / pdf to jpeg pdf to jpg

1-) C# RMOS - pdf to jpeg pdf to jpg

 

kaynak : https://www.youtube.com/watch?v=1h5XTxKhJgI

 

Install-Package GroupDocs.Conversion

 

 

2-) sautinsoft.pdffocus ücretli oldugu için üzerinde yazı cıkıyor kullanmadım

 

 PdfFocus f = new PdfFocus();

                f.OpenPdf(neyi);

                if (f.PageCount>0)

                {

                    string fileName = Path.GetFileNameWithoutExtension(neyi);

                    f.ImageOptions.Dpi = 300;

                    string outputPath = nereye + fileName;

 

 

                    for (int i = 1; i < f.PageCount+1; i++)

                    {

                       string yaz =outputPath +"_" + i + ".jpg";

                        Image sa = f.ToDrawingImage(i);

                        sa.Save(yaz, ImageFormat.Jpeg);

                    }

                }

 

3-) devexpress kullanılarak yapıldı en iyisi sayılır....

 

kaynak: https://docs.devexpress.com/OfficeFileAPI/120344/pdf-document-api/examples/export-a-pdf-document-to-an-image/how-to-export-a-pdf-document-to-a-bitmap

 

using DevExpress.Pdf;

using System.Drawing;

 

namespace ExportToBitmap {

    class Program {

 

        static void Main(string[] args) {

 

            int largestEdgeLength = 1000; // BEN 2500 YAPTIM ÇÖZÜNÜRLÜK

 

            // Create a PDF Document Processor.

            using (PdfDocumentProcessor processor = new PdfDocumentProcessor()) {

 

                // Load a document.

                processor.LoadDocument("..\\..\\Document.pdf");

 

                for (int i = 1; i <= processor.Document.Pages.Count; i++) {

 

                    // Export pages to bitmaps.

                    Bitmap image = processor.CreateBitmap(i, largestEdgeLength);

 

                    // Save the bitmaps.

                    image.Save("..\\..\\MyBitmap" + i + ".bmp");

                }

            }

        }

    }

}

 

 

 2021 Ocak 18 Pazartesi
 378