Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
N

nccs1234

@nccs1234
About
Posts
4
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Clearing header using Response
    N nccs1234

    You can use Response.ClearHeaders()

    ASP.NET html tutorial

  • PDF Download Error.
    N nccs1234

    I also tried that but the result is same. This code works when I used it on same Block where i generate the pdf.But when i pass the Pdf file name in session and used it in the Button click event this error throws.

    ASP.NET help adobe sysadmin tutorial question

  • PDF Download Error.
    N nccs1234

    I have Created a pdf file by using pdfSharp and save in a location.but when i want to open that pdf file on the link button click event down load dialogue box is appear and when i clicked the open button.Adobe Reader throws the Strange Error message.the Error Message is Adobe Reader couldn't open "invoice__2009[1].pdf because it is either not supported file type or because the file has been damaged(for example it was sent as an email attachment and wasn't correctly decoded) (my filename is only invoice__2009 but [1] is extra comming in the message) can you help me for this matter? My code sample is string inv = Session["invN0"].ToString(); Response.Clear(); Response.ClearHeaders(); Response.ContentType = "application/pdf"; Response.AppendHeader("Content-Disposition", "attachment; filename=" + inv); Response.TransmitFile(Server.MapPath(("~/") + "Shopping/pdfInvoice/" + inv)); Response.End(); Thank You Pawan

    ASP.NET help adobe sysadmin tutorial question

  • PDFSharp Not Working
    N nccs1234

    Hellow Expert, I am using PDFSharp for Create PDF file in my Application It works fine and Generate the PDF file and save it in the specified location in Local host but when i upload this in WEB Server it is not working nor throwing any error please suggest me My code is ---------- if (main_id > 0) { dtInvdata = BLObjectTrans.selectInvoiceMasterfromInvNO(invNO, main_id); } string filename1 = "invoice.pdf"; File.Copy(Path.Combine(Server.MapPath("template_bank_debit_pdf/"), filename1), Path.Combine(Directory.GetCurrentDirectory(), filename1), true); //open pdf document filename1 = Path.Combine(Server.MapPath("template_bank_debit_pdf/"), filename1); PdfDocument inputDocument1 = PdfReader.Open(filename1, PdfDocumentOpenMode.Import); PdfDocument OutPutDoc = new PdfDocument(); int count = inputDocument1.PageCount; if (count > 0) { PdfPage pageOut = OutPutDoc.AddPage(inputDocument1.Pages[0]); XGraphics gfx = XGraphics.FromPdfPage(pageOut); XTextFormatter tf = new XTextFormatter(gfx); XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always); XFont font = new XFont("Times New Roman", 9, XFontStyle.Italic, options); XFont font1 = new XFont("Times New Roman", 9, XFontStyle.Regular, options); XFont font2 = new XFont("Times New Roman", 10, XFontStyle.Regular, options); XFont font3 = new XFont("Times New Roman", 10, XFontStyle.Bold, options); XFont font4 = new XFont("Times New Roman", 20, XFontStyle.Underline, options); gfx.DrawString("SUBSCRIPTION INVOICE NUMBER:" + dtInvdata.Rows[0]["inv_no"].ToString(), font4, XBrushes.Black, new XRect(0, 175, pageOut.Width, pageOut.Height), XStringFormats.TopCenter); gfx.DrawString("MEMBERSHIP NUMBER:", font3, XBrushes.Black, new XRect(57, 320, pageOut.Width, pageOut.Height), XStringFormats.TopLeft); gfx.DrawString("DATE:", font3, XBrushes.Black, new XRect(57, 300, pageOut.Width, pageOut.Height), XStringFormats.TopLeft); gfx.DrawString("MEMBERSHIP TYPE:", font3, XBrushes.Black, new XRect(80, 320, pageOut.Width, pageOut.Height), XStringFormats.TopCenter); gfx.DrawString("SUBSCRIPTION AMOUNT:", font3, XB

    ASP.NET sysadmin help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups