Print Page | Close Window

wants transparent image from pdf page

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=2319
Printed Date: 21 Jan 26 at 9:45AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: wants transparent image from pdf page
Posted By: shilpa
Subject: wants transparent image from pdf page
Date Posted: 28 Jun 12 at 8:38AM
hi,
   i m trying to create .jpg or .png file from pdf page by below method

Dim QP As PDFLibrary=New PDFLibrary("..\..\QuickPDFDLL0816.dll")
LicenseKey = "****" '"...license_key..."
Result = QP.UnlockKey(LicenseKey)
If Result = 1 Then
    Dim strInputFilePath As String = "E:\file.pdf"
    QP.LoadFromFile(strInputFilePath, "")
    Dim FILEHANDLE As Integer = QP.DAOpenFile(strInputFilePath, "")
    Dim iNumPages As Integer = QP.PageCount()
    Dim nPage As Integer = 2
    QP.RenderPageToFile(72, nPage , 5, "D:\page1.png")
End If

as image saved successfully, but image has background color of pdf page (as in my case it is white)
i want to create transparent image from pdf page
i tried method QP.SetTransparency() but it didn't work

how do i get transparent image from pdf page




Replies:
Posted By: Ingo
Date Posted: 29 Jun 12 at 8:33AM
Hi!

You won't get this with QuickPDF.
QP renders the pdf-page like it is ... that's all.
You should try a graphic tool after rendering the pdf-page.
Transparency in QuickPDF means to make different objects shining through if one is over the other.

Cheers and welcome here,
Ingo



Posted By: AndrewC
Date Posted: 02 Jul 12 at 1:26PM
Hello,

Quick PDF Library cannot create transparent images.  The SetTransparency command is used to draw transparent objects on top of objects on the PDF page.  You will need to use some other graphics library to convert the PNG to a transparent version.

Also, you shouldn't mix the standard functions with the DA functions.  - QP.DAOpenFile should only be used with other DA functions such as DAFindPage.  You cannot open a file with QP.DAOpenFile() and then call QP.PageCount().

Andrew.



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