Print Page | Close Window

PNG Files to TIFF getting converted to Blank

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3775
Printed Date: 01 May 24 at 5:02PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: PNG Files to TIFF getting converted to Blank
Posted By: rocky1
Subject: PNG Files to TIFF getting converted to Blank
Date Posted: 22 Jan 20 at 8:29AM
Hi ,
I am currently using the DebenuPDFLibraryDLL1011 in my C# application using VS 2017 with .net framework - 4.6.1

I am trying to convert the .png files to tiff  using the Method = "RenderDocumentToFile"
and "  
byte[] bytesPageBitmap = PL.RenderPageToString(renderDPI, intPageIndex, 0);"

but desired output file results into the blank image when I try to saveas a ".tif  image format"

Code -
PDFLibrary PL = new PDFLibrary(strDLLPath);

                if (PL.LibraryLoaded())
                {
                    PL.UnlockKey(PdfTask.DebenuPDFLibraryUnlockKey);
                    var strFileName = @"D:\png files\1.png";
                    PL.LoadFromFile(strFileName, string.Empty);
                    const float renderDPI = 180;

                    int intPageCount = PL.PageCount();

                    for (int intPageIndex = 1; intPageIndex <= intPageCount; intPageIndex++)
                    {
                        // PDF to bitmap
                        int i = PL.RenderDocumentToFile(renderDPI, intPageIndex, 0, 7, @"D:\my.tiff");
                    }
                }




Replies:
Posted By: Ingo
Date Posted: 22 Jan 20 at 11:11AM
Hi Rocky,

please keep in mind that it's a pdf-library you're working with ;-)
You can render a pdf-page to an image format or you can render an image to a pdf-page...
But you can't render one image type to another image type with this library.
If you want this with QuickPDF you have to make two steps:
png to pdf ... and then pdf to tiff.

Cheers and welcome here,
Ingo



-------------
Cheers,
Ingo



Posted By: rocky1
Date Posted: 22 Jan 20 at 2:33PM
Oh Thank you Ingo for the update on this



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk