Print Page | Close Window

Can't add a background image

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=1986
Printed Date: 04 Apr 26 at 11:04PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Can't add a background image
Posted By: juanfrand
Subject: Can't add a background image
Date Posted: 05 Oct 11 at 7:53PM
Hi,

I'm having problems to add a background image to my pdf. The problem is that the original pdf has a white background/image/filled-rectangle (I don't know wich one is it) that doesn't let me see the image at the back.

Only to make you understand what I'm saying, if the problem were in Word, I could solve it by pressing "Send it to the back" button.

Thank you,

Regards,

Juan D'Angelo



Replies:
Posted By: Ingo
Date Posted: 05 Oct 11 at 8:56PM
Hi Juan!

Please read in the online reference about Optional Content Groups here:
http://www.quickpdflibrary.com/help/quickpdf/ContentStreamsAndOptionalContentGroups.php
and try the layer-functions like CombineLayers, DeleteLayer, LayerCount and MoveLayer.
With MoveLayer(from as long, to as long) you can push disliked layers to the background.

Cheers and welcome here,
Ingo



Posted By: juanfrand
Date Posted: 05 Oct 11 at 9:57PM
Hi Ingo!

Thank you for your quick reponse.

I'm having troubles to find "MoveLayer" command in QP.

I've recently adquired the QuickPDFDLL0811.dll version with QuickPDFDLL0811.vb and it doesn't seem to have it...

Do you know what can i do?

Thank you in advance,

Juan F.


Posted By: juanfrand
Date Posted: 05 Oct 11 at 10:34PM
I've read the link. I've figured out the 'layers' are now 'contentstreams'.

Now, the problem I have is that I have text and background in the same contentstream...

How can i make to separate them??

Thank you,

Juan F.


Posted By: AndrewC
Date Posted: 06 Oct 11 at 3:45AM
There is a function called SplitPageText that will split the graphics and text into separate layers.  This would be a good start and hopefully will help solve your problem.    I have never used this function  before.

Andrew.


Posted By: juanfrand
Date Posted: 07 Oct 11 at 12:08AM
Andrew,

Thank you so much! The function have worked great!

If anyone is experimenting the same problem here's the solution:

To erase the background and leave only text: 

            QP.LoadFromFile(sourcePDF, "")
            QP.SelectPage(1)
            QP.SetOrigin(1)
            QP.SplitPageText(0)
            QP.SelectContentStream(1)
            QP.DeleteContentStream()
            QP.SaveToFile(sourcePDF)

Cya!



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