RUN apt-get update \
&& apt-get install -y --allow-unauthenticated \
libc6-dev \
libgdiplus \
libx11-dev |
static void Main(string[] args)
{
Console.WriteLine("Start to convert pdf to image");
PdfRenderer pdf = new PdfRenderer();
// Provide your path here and place the lippdfium in that location
PdfRenderer.ReferencePath = "/home/syncfusion";
pdf.Load("input.pdf");
// get current size
Bitmap org = pdf.ExportAsImage(0);
Size orgSize = org.Size;
// double up the size
Bitmap bitmapToPng = pdf.ExportAsImage(0, new SizeF(orgSize.Width * 2, orgSize.Height * 2), true);
bitmapToPng.Save("output.png");
} |
static void Main(string[] args)
{
Console.WriteLine("Start to convert pdf to image");
PdfRenderer pdf = new PdfRenderer();
// Provide your path here and place the lippdfium in that location
PdfRenderer.ReferencePath = “/usr/lib/ ";
pdf.Load("input.pdf");
// get current size
Bitmap org = pdf.ExportAsImage(0);
Size orgSize = org.Size;
// double up the size
Bitmap bitmapToPng = pdf.ExportAsImage(0, new SizeF(orgSize.Width * 2, orgSize.Height * 2), true);
bitmapToPng.Save("output.png");
}
|
Console.WriteLine("Start to convert pdf to image");
PdfRenderer pdf = new PdfRenderer();
// instead of Syncfusion please provide your user name.
PdfRenderer.ReferencePath = "/home/syncfusion/Documents";
pdf.Load("input.pdf");
// get current size
Bitmap org = pdf.ExportAsImage(0);
Size orgSize = org.Size;
// double up the size
Bitmap bitmapToPng = pdf.ExportAsImage(0, new SizeF(orgSize.Width * 2, orgSize.Height * 2), true);
bitmapToPng.Save("output.png"); |