.net - ITextSharp Overlay Image?

Mar 15, 2011

I have an instance where I have a logo image as part of some artwork..If a user uploads a new logo I have a form field which is larger than the default logo.I then use that form field to position the new image.

The problem is I need to set the background colour of that form field to white so that it covers the old logo in the event that the new image is smaller than the old logo..

what I have done is:foreach (var imageField in imageReplacements)
{
fields.SetFieldProperty(imageField.Key, "bgcolor", iTextSharp.text.Color.WHITE, null);
fields.RegenerateField(imageField.Key);
PdfContentByte overContent = stamper.GetOverContent(imageField.Value.PageNumber);
float[] logoArea = fields.GetFieldPositions(imageField.Key);

[Code]...

The problem with this is that the background colour of the field is set to white and the image then doesn't appear.. i remove the SetFieldProperty and RegenerateField commands and the image replacement works fine.is there a way to set a stacking order on layers?

View 1 Replies


ADVERTISEMENT

.net - Controlling Image Resolution When Converting A PNG Image Into A PDF Using ITextSharp?

Aug 10, 2010

I have created a PNG image that is 200 DPI, and perfectly sized for a landscape A4 page size. I needed to convert this to a PDF document, so I've used the iTextSharp library with the code below.This all works, however the image quality has degraded.

Public Sub ConvertPNGtoPDF(ByVal inputFile As String, ByVal outputFile As String)
Using fs As New FileStream(outputFile, FileMode.Create, FileAccess.ReadWrite, FileShare.None)
Dim document As New Document(PageSize.A4.Rotate, 0, 0, 0, 0)

[code]....

View 1 Replies

Itextsharp: Getting Coordinates Of Image?

Dec 15, 2009

in vb.net is it possible to get the coordinates of an image like if i do a

document.add (jpeg_image)
x_coordinate = jpeg_image.xcoordinate???????

View 1 Replies

Itextsharp: Getting Height Of Image

Dec 15, 2009

i need to add a data table right after an image on a PDF in vb.net

[Code]...

i highlighted broccoli, buckwheat, butter, cabbage. these are all part of a data table that is supposed to go after the bottom SEVERE word because the entire thing that you see is one image called jpg2

View 1 Replies

Extract An Image From A Pdf File Using ITextSharp?

Jul 9, 2010

I'm currently trying to extract an image from a pdf file using iTextSharp.

The pdf is made from a scanner: it has a single page that contains one big image.

When looking at the file I find the following:

<< /Type /XObject /Subtype /Image /Name /Obj3 /Width 2480 /Height 3507 /ColorSpace /DeviceGray /BlackIs1 true /BitsPerComponent 1 /Length 5 0 R /Filter /CCITTFaxDecode /DecodeParms << /K -1 /Columns 2480 >> >> stream

[Code].....

But, that doesn't work as I get one big black tiff file with different shades of gray on top.

Does anyone know a way how I can decode those CCITTFaxDecode images?

View 2 Replies

Itextsharp: Place An Image All The Way At The Bottom?

Dec 18, 2009

i have an image that i just want to place all the way at the bottom of the page. how do i do this?

View 2 Replies

.net - Itextsharp: Setting Dimensions Of Image Manually?

Oct 21, 2009

the user will pick an image on their hardrive and i will put it on a pdf file using itextsharp with vb.net. how do i manually set the dimensions of the picture?

View 1 Replies

ITextSharp - How To Input Image (PNG) From Project Resource

Aug 3, 2010

I have iTextSharp creating a pdf for me in VB.net. Everything was working famously, except now I want to embed an image. I tried this:

Dim test = My.Resources.MyImage
Dim logo = Image.GetInstance(test)

This an error though:

'GetInstance' cannot be called with these arguments

It appears as though it expects a path, and is getting a System.Drawing.Bitmap type.

Is there any way that I can add a project resource image to my PDF?

View 1 Replies

ITextSharp Renders Image With Poor Quality In PDF?

Mar 26, 2010

I'm using iTextSharp to print a PDF document. Everything goes ok until I have to print the company logo in it. First I noticed that the logo had poor quality, but after testing with several images, I realize that was the iTextSharp rendering it poorly.The test I did to say this was to print the PDF using my code and then edit the document with Acrobat 8.0 and I drew an image. Then printed the two documents and saw the noticeable difference.My question is that if anyone know if this can be due to a scaling problem where I'm failing to tell iTextSharp how it must render the image or is an iTextSharp limitation.

[Code]...

View 3 Replies

VS 2010 Itextsharp Image Move On Next Page For No Reason

Jun 3, 2012

I am placing and image using this [code]It works perfectly however when my document is extended to second or third page.. it does not stays on the first page.. it stays on same position however moves to the last page

View 1 Replies

ITextSharp - Calling AddImageToPage() With The The Optional Pages Parameter Will Add The Image To All Pages Though?

Dec 20, 2011

I am using Stanav's PdfManipulation2.AddImageToPage(..., Pages) for iTextSharp library (v5.1.3) and was not able to add the image to specific pages: e.g. to add to only page 1 and 3 of a five pages PDF

Dim Pages() As Integer
Pages = New Integer() {1, 3}
PdfManipulation2.AddImageToPage(..., Pages)

Calling AddImageToPage() with the the optional Pages parameter will add the image to all pages though.

View 14 Replies

Picture Box Overlay?

Apr 2, 2010

I have a picturebox in a Windows VB.NET form (not web based). I will be placing images into it from an image control. (Not a problem) I need to paint graphically a tiny solid circle (a colored circle) in a location (varies) on top of this picturebox. I am not finding how to do this in your indexes. I would some instruction on how to do this.

View 1 Replies

C# - Overlay Text On Some Else's Window - HUD?

Jun 19, 2009

I have a form with some text boxes bound to a dataset using the binding source component I'd like to change one of the unbound fields in the current record programmatically before posting any changes from the bound controls

View 13 Replies

How Simulate Imagelist.Overlay()?

Dec 4, 2009

Is a way to get the same in VB.net?I've tryed with DrawImage but it doesn't work.

View 1 Replies

Overlay Line On PictureBox?

Jan 12, 2010

I have connected a serial tilt sensor to the PC,The sensor returns angle of tilt ,i need to represent the angle of tilt pictorially,When i move sensor the corresponding movement should be represented in a graph (Like a clock minute hand)For this i started with Picture box with back ground image,But when i draw the line according to tilt ,the line is not getting displayed on top of Picturebox,

View 5 Replies

Overlay Text On A Textbox?

Dec 14, 2009

I need to overlay the word 'VOID' over a textbox but in a semi transparent way so the text in the textbox underneath 'VOID' can still be seen.

I have tried using various controls with no luck and there is no paint event for the textbox.

View 2 Replies

Dynamically Create An Overlay Over PictureBox?

Mar 17, 2011

I have a VB.Net PictureBox floorPlanImage on a form form1.

I load a picture into the picturebox[code]....

How can I modify my onclick function to correctly overlay the rectangle over my PictureBox?

View 1 Replies

PictureBox With Transparent Overlay Picture?

Jan 14, 2010

I'm working on a UserControl which has two PictureBoxes.One has the picture I want to display to the user and the other has a picture that I use as an overlay.The overlay PictureBox uses a PNG image with a transparent background. However, every time I run the UserControl, the overlay does not display the transparent parts of the PNG image as transparent (It appears white).

View 4 Replies

VS 2010 Transparent Black Overlay?

Feb 3, 2012

When the dialog pops up, the screen dims down almost as if they overlapped the screen with a transparent black layer of some sort. This is easily accomplish able by creating a black form and having its opacity set to half and starting it maximized-which I'm already doing. The problem with this though is I need to do this within a form, so using a panel or anything is out of the questions since transparency really grabs the background image and not the actual controls underneath. Plus I feel if adding a form to another forms controls depletes it's ability to use it's opacity property.The form I need this in is my cash register. It is full screen but if my menu auto hides it still resizes. It has two parts, the order(panel to the left) and the payments(panel to the right). As you could imagine I want the payments portion blacked out until the order is capable of accepting payments(the payment due is greater than 0). Or I'm thinking it fallows the mouse, you mouse over the payments and the orders panel blacks out, and vice verse.

Plus I have tried googling this but no one seems to have the answer on other forums.. Everyone gets confused and the thread ends short with no solution. Apparently though experts-exchange has the answer, but wants me to pay... so no. Wish their site would stop showing up in my google results.But did have an idea of what I could do. My best guess was I could take a snap shot of just the panel I want to black out. Set it as the background image for that panel THEN use my overlay panel(back color sent to black) overlapping the appropriate section with it's transparency set to half.. But still I'm not sure how to take a snap shot of just a particular.control..

View 8 Replies

.net - Opaque Form Overlay Without Covering Task Bar?

Aug 10, 2010

Using Visual Studio 2008 and VB.NET ...

I've created a form (OpaqueForm), which is an intermediary form between other forms which I will open with ShowDialog. The idea is that when I want to show a form using .ShowDialog, this OpaqueForm, with an opacity other than 100%, sits in between the main form and the dialog form, effectively "greying out" the underlying main form.

The OpaqueForm has the FormBorderStyle property set to None, and accepts in the constructor a Form object on which it invokes .ShowDialog. The effect works fine, but there is one caveat. The task bar is also covered by the OpaqueForm; I am assuming because it has a FormBorderStyle of None and a WindowState of Maximized.

I don't want the OpaqueForm to cover the Task Bar, because it would be impolite to have my modal form lock out a user from switching between tasks. How could I go about preventing OpaqueForm from covering the Task Bar, too, while still using a FormBorderStyle of None?

View 3 Replies

Overlay DirectX Full Screen Games .Net

Feb 21, 2010

I have a wonderful program which needs to be overlay-ed over my full screen directX game, the only problem is I can't seem to find any way of doing this with .net coding

things that don't work are, these are not overlays and will not work over a full screen directX game. I posted this so hopefully no one gives me that answer by mistake.

HTML

timer1.interval = 1
if timer1.enabled = true then
me.topmost = true
end if

the only thing I can seem to find is this example and source C# overlay maker however it's pretty old and it's for C# but maybe someone could convert it somehow to .net or something, I really need to find a way to do the overlaying tho been trying for months now...

View 4 Replies

VS 2008 Creating An Interactive Overlay Over A Game?

Jun 14, 2009

creating an interactive overlay over a game (such as the way xfire lets you chat with people ingame).

View 1 Replies

VS 2008 Drawing On The Screen With An Overlay Window

Apr 9, 2011

I have a bit of an issue here. I made a "Colour picker" dialog in my program with which you can pick the colour at the mouse. It is a simple topmost form with an OnPaint handler used to draw a coloured border around the cursor:

It uses a transparency key to make the non-drawn parts of the form transparent.

It uses the following code to prevent the mouse from clicking through the screen:

Window.FromControl(Me).ExStyle(Window.ExStyles.Layered) = True
Window.FromControl(Me).ExStyle(Window.ExStyles.Transparent) = False

It sets Layered to True and Transparent to False. This works in Windows 7, but on a XP machine it fails. When moving the mouse the event does not go to the forms' event handler and you can just click through. For a screen region selector I simply made a screenshot, but I want the Colour Picker to remain updated. (just in case you want to get the colour of an animated control)

How can I get this to work on a Windows XP machine?

View 22 Replies

C# - Good 3rd Party GridView With Merge/overlay Features

May 2, 2011

Are there any datagridview controls from a 3rd party component companies, such as Telerik, that have a feature for merging cells or overlaying cells into one?

View 2 Replies

Make A OpenGL Overlay With VB 2008 Express Edition?

Sep 28, 2011

make a openGL overlay so for an examplei play a game and when i click shift + tab then the game will fade and my application will be seen but without minimizing the game

View 3 Replies

Make A Touchscreen Overlay For Our Crappy POS Software At Work?

Aug 25, 2010

I'm about to lose my mind. I'm trying to make a touchscreen overlay for our crappy POS software at work. It is a simple DOS program. I had built an autohotkey script and gui but I just didn't like the look and lack of advanced menus. All I want is to replicate the CONTROLSEND ability of autohotkey. I tried the autohotkey.dll but I have no idea how to add it to my project. I was hoping VB2010 had something built in that can send a string of keystrokes to the DOS program underneath. I have searched all sorts of forum posts for a SIMPLE snippet of code. Seems anyone seeking this is out for nefarious purposes though, and little help is offered. If you worry about this please PM me so I can prove to you my good intentions.

Let me repeat, all I want is a simple snippet of code that when a button is pushed, a specific string (characters and function keys) is sent to a specific out of focus dos box.

View 2 Replies

Overlay Or Watermark A Picture In Windows Media Player?

Jan 14, 2009

I working on a distributed mediaplayer that uses the windows media player component.Now the customer asks me if its possible to have their logo overlayed on the media played instead of them having to render every movie with the logotype.I have google it and it seems like I can use a directshow filter to do this, but I havent found any good information on how to do it yet.If anyone here know If I can do this programatically, with a plugin, filter or some other way it would be nice to know. Its fine if its a plugin that costs money too. What I want is to be able to use a jpg/png as watermark/overlay to the running movie in Windows Media Player 11

View 1 Replies

Overlay Text, Bitmap With Diff Effects (alpha) Using DX?

Feb 6, 2011

I need to overlay the text, a movie or bitmap over a video.It would be possible to use VMR9 filters, but at playing of a wide video, for limits of a black square, it is impossible to overlay in out of video square range.

View 5 Replies

VS 2008 - Overlay Small Bar Over Fullscreen DirectX Games

Jul 25, 2009

I need to overlay a small bar along the top of the screen over a fullscreen DirectX game. I have searched for a while but I have not found any code examples for VB.NET 2008 (I've never used any previous version). How can I do this? Would this involve learning DirectX programming?

View 2 Replies

VS 2008 Drag Drop "overlay Picture"

Feb 18, 2010

In windows when you drag from explorer there is a custom "picture" when the items are dragged ... how can i do this in vb.net?

I know how to do drag drop but not with the picture...

also note: I DO NOT just want to change the cursor icon ... in explorer the drag picture can be bigger than 32x32 and i need it to be in my project also

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved