Question

We print pdf provided by the company and merged it with data from our C# ASP.Net 3.5 Web application using iTextSharp. This works well but we have been asked to either print the form with or without the company logo depending on the user preference.

Should I use a pdf with the logo and hide it or use a pdf without the logo and add the logo to it?

I have found numerous way to add a logo to a pdf but nothing on hiding images. Because the logo could be having different size and be in a different location I would prefer to hide it when needed instead of adding it. Can we hide images from pdf without removing it? What would be easier?

Or should we just use 2 versions of each forms, one with the logo and another without?

UPDATE: In a nutshell I just want to have your opinion to what way would be best. Use a form without a logo and add it when needed or use a form with the logo and hide it when needed. Thanks

FINAL UPDATE: Some people gave good answer but I see no way to accept their answer. Can someone help me?

Was it helpful?

Solution

Because no one answered my question I selected one of the comment as "the" answer. Thanks mkl!

You can store data private to your application in PDFs, e.g. logo size and location in the case at hand (cf. this answer on PieceInfo structures). I would, therefore, recommend that you create the PDFs without the logo but store the size and location for a logo in such a PieceInfo dictionary. If adding a logo is required later-on, use that information to properly place the logo

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top