LABEL FONDO TRANSPARENTE SOBRE OBJETO CON IMAGEN


label1.Parent = Picturebox1
label1.BackColor = Color.Transparent
label1.Location = New Point(0, 0)'Punto del objeto (en este caso picturebox1)donde se sitúa la etiqueta 

NOMBRE CORTO DE RUTA (C#)


 //Short Path Name -->
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern uint GetShortPathName(
[MarshalAs(UnmanagedType.LPTStr)]
string lpszLongPath,
[MarshalAs(UnmanagedType.LPTStr)]
StringBuilder lpszShortPath,
uint cchBuffer);


[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
       static extern uint GetShortPathName(string lpszLongPath, char[] lpszShortPath, int cchBuffer);
// <-- Short Path Name



 public string ToShortPathName(string longName)
{
    uint bufferSize = 256;
    StringBuilder shortNameBuffer = new StringBuilder((int)bufferSize);
    uint result = GetShortPathName(longName, shortNameBuffer, bufferSize);
    return shortNameBuffer.ToString();
}


public string ShortPath(string longpath)
{
    char[] buffer = new char[256];
    GetShortPathName(longpath, buffer, buffer.Length);
    return new string(buffer);
}

UNIR PDFs usando iTextSharp

'unir documentos usando iTextDoNEt --> http://sourceforge.net/projects/itextdotnet/
'función llamada

  public void combinarPDFs(string basePath, string filePDF1, string filePDF2, string newFilePDF)
{
    PdfMerge newPDF = new PdfMerge();


    newPDF.AddDocument(Path.Combine(basePath, filePDF1));
    newPDF.AddDocument(Path.Combine(basePath, filePDF2));
    newPDF.Merge(basePath + newFilePDF);
}
'Clase
using System;
using System.Collections.Generic;
using System.IO;
using iTextSharp.text;
using iTextSharp.text.pdf;
public class PdfMerge
{
    private BaseFont baseFont;
    private bool enablePagination = false;
    private readonly List documents;
    private int totalPages;
    public BaseFont BaseFont
    {
        get { return baseFont; }
        set { baseFont = value; }
    }
    public bool EnablePagination
    {
        get { return enablePagination; }
        set
        {
            enablePagination = value;
            if (value && baseFont == null)
                baseFont = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
        }
    }
    public List Documents
    {
        get { return documents; }
    }
    public void AddDocument(string filename)
    {
        documents.Add(new PdfReader(filename));
    }
    public void AddDocument(Stream pdfStream)
    {
        documents.Add(new PdfReader(pdfStream));
    }
    public void AddDocument(byte[] pdfContents)
    {
        documents.Add(new PdfReader(pdfContents));
    }
    public void AddDocument(PdfReader pdfDocument)
    {
        documents.Add(pdfDocument);
    }
    public void Merge(string outputFilename)
    {
        Merge(new FileStream(outputFilename, FileMode.Create));
    }
    public void Merge(Stream outputStream)
    {
        if (outputStream == null || !outputStream.CanWrite)
            throw new Exception("OutputStream es nulo o no se puede escribir en éste.");

        Document newDocument = null;
        try
        {
            newDocument = new Document();
            PdfWriter pdfWriter = PdfWriter.GetInstance(newDocument, outputStream);
            newDocument.Open();
            PdfContentByte pdfContentByte = pdfWriter.DirectContent;
            if (EnablePagination)
                documents.ForEach(delegate(PdfReader doc)
                                  {
                                      totalPages += doc.NumberOfPages;
                                  });
            int currentPage = 1;
            foreach (PdfReader pdfReader in documents)
            {
                for (int page = 1; page <= pdfReader.NumberOfPages; page++)
                {
                    newDocument.NewPage();
                    PdfImportedPage importedPage = pdfWriter.GetImportedPage(pdfReader, page);
                    pdfContentByte.AddTemplate(importedPage, 0, 0);
                    if (EnablePagination)
                    {
                        pdfContentByte.BeginText();
                        pdfContentByte.SetFontAndSize(baseFont, 9);
                        pdfContentByte.ShowTextAligned(PdfContentByte.ALIGN_CENTER,string.Format("{0} de {1}", currentPage++, totalPages), 520, 5, 0);
                        pdfContentByte.EndText();
                    }
                }
            }
        }
        finally
        {
            outputStream.Flush();
            if (newDocument != null)
                newDocument.Close();
            outputStream.Close();
        }
    }
    public PdfMerge()
    {
        documents = new List();
    }
}