Hi i am using this code to create PDF from any image, the problem is that when pdf is generated this will be save on download folder on my windows7 OS.
I want to save this PDF to any folder where i want and i do not want to open save dialog.
I am using this Code...
............................................................
// Create a PDF Document
Document document = new Document();
// Specify document as tagged PDF
document.Tag = new TagOptions();
// Create a page and add it to the document
Page page = new Page();
document.Pages.Add(page);
// Create a label and add it to the page
page.Elements.Add(new Label("Mouse over the image to see alternate text", 100, 220, 300, 100, Font.Helvetica, 15f));
// Create an image
// Image image = new Image(Server.MapPath("../Images/BMP_Image1.bmp"), 250f, 350f, 0.24f);
Image image = new Image(Server.MapPath("../Images/images2.bmp"), 250f, 350f, 0.24f);
// Set alternate text to the image
image.AlternateText = "DynamicPDF Logo";
// Image is sized and centered in the rectangle
image.SetBounds(200, 200);
image.VAlign = VAlign.Center;
image.Align = Align.Center;
// Add image to the page
page.Elements.Add(image);
// Outputs the document to the current web page
document.DrawToWeb("Image.pdf",true);
//document.dr
Pdf save by DynamicPDF Core Suite for .NET in • DynamicPDF Generator
Re: Pdf save by DynamicPDF Core Suite for .NET in • DynamicPDF Generator
Support · Sep 4, 2012Hello,
You can save the generated PDF document to disk without any problem using our DynamicPDF Generator for .NET product API. You will need to use Draw method which takes file path as argument instead of using DrawToWeb method. You can also refer Document Output
help topic on our website. Below is the sample code to draw the PDF to disk.
document.Draw(@"C:\MyDocument.pdf");
Thanks,
ceTe Software Support Team.
Re: Pdf save by DynamicPDF Core Suite for .NET in • DynamicPDF Generator
Forum member · Sep 6, 2012Thanks for this reply.
now iam facing another problem I am converting .jpg or .doc or .rtf file to pdf and iam using for this
ceTe.DynamicPDF.Conversion.Converter.Convert(imagePath, @"" + path + "Output.pdf");
method. This method is depend on window service : (DynamicPDFConverter) ceTe.DynamicPDF.Converter.Service.Exe
Can u suggest me any other method to convert jpg,doc,or exl files to PDF.
I am using this DynamicPDFv7.0.1 for .net to PDF conversion.
Thanks,
Krishna Kumar
Re: Pdf save by DynamicPDF Core Suite for .NET in • DynamicPDF Generator
Forum member · Sep 6, 2012Can u suggest me any other method to convert jpg,doc,or exl files to PDF which will not depend on any service.
I am using this DynamicPDFv7.0.1 for .net to PDF conversion.
Thanks,
Krishna Kumar
Re: Pdf save by DynamicPDF Core Suite for .NET in • DynamicPDF Generator
Support · Sep 6, 2012Hello Krishna Kumar,
The version 7 DynamicPDF Core Suite for .NET product allows you to generate PDF documents from scratch, merge existing PDF documents and generate PDF reports using data from database. It is not possible to convert other files types like JPEG,MS Office documents to PDF using our version 7 DynamicPDF Core Suite for .NET product.
You can use our DynamicPDF Converter for .NET product to convert other supported file types
to PDF. The DynamicPDF Converter for .NET product uses DynamicPDF Converter service and DynamicPDF Converter Printer to convert the other file types to PDF. Please note that there is no method to convert other file types to PDF without using the DynamicPDF Converter service.
Thanks,
ceTe Software Support Team.