Click here to Skip to main content
14,268,184 members
   

C#

 
Questionusing c# to copy files from clients to main server Pin
coderz322-Jul-19 12:34
membercoderz322-Jul-19 12:34 
AnswerRe: using c# to copy files from clients to main server Pin
BillWoodruff2-Jul-19 15:35
mveBillWoodruff2-Jul-19 15:35 
QuestionHttpException Pin
indra160230-Jun-19 18:50
memberindra160230-Jun-19 18:50 
AnswerRe: HttpException Pin
Richard Deeming1-Jul-19 0:56
mveRichard Deeming1-Jul-19 0:56 
Questionexception for httpTransportBindingElement Pin
indra160230-Jun-19 17:46
memberindra160230-Jun-19 17:46 
AnswerRe: exception for httpTransportBindingElement Pin
#realJSOP2-Jul-19 2:46
mve#realJSOP2-Jul-19 2:46 
QuestionHTML to PDF conversion Pin
Member 1164896329-Jun-19 23:59
memberMember 1164896329-Jun-19 23:59 
AnswerRe: HTML to PDF conversion Pin
OriginalGriff30-Jun-19 1:53
protectorOriginalGriff30-Jun-19 1:53 
Assuming this is iTestSharp you are using, not IText:
string htmlText = File.ReadAllText(@"D:\Test Data\APage.html");
using (MemoryStream stream = new System.IO.MemoryStream())
    {
    using (StringReader sr = new StringReader(htmlText))
        {
        using (Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 100f, 0f))
            {
            using (PdfWriter writer = PdfWriter.GetInstance(pdfDoc, stream))
                {
                pdfDoc.Open();
                XMLWorkerHelper.GetInstance().ParseXHtml(writer, pdfDoc, sr);
                pdfDoc.Close();
                File.WriteAllBytes(@"D:\Test Data\APage.pdf", stream.ToArray());
                }
            }
        }
    }
Provided your HTML is well formed, that should work fine.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

QuestionFinding many locations of a Bitmap contained inside another Bitmap Pin
IELTS for Beginners29-Jun-19 0:41
memberIELTS for Beginners29-Jun-19 0:41 
AnswerRe: Finding many locations of a Bitmap contained inside another Bitmap Pin
OriginalGriff29-Jun-19 0:46
protectorOriginalGriff29-Jun-19 0:46 
AnswerRe: Finding many locations of a Bitmap contained inside another Bitmap Pin
Richard MacCutchan29-Jun-19 7:24
protectorRichard MacCutchan29-Jun-19 7:24 
AnswerRe: Finding many locations of a Bitmap contained inside another Bitmap Pin
BillWoodruff29-Jun-19 19:05
mveBillWoodruff29-Jun-19 19:05 
SuggestionRe: to Pin
Eddy Vluggen28-Jun-19 13:43
mveEddy Vluggen28-Jun-19 13:43 
AnswerRe: to Pin
BillWoodruff28-Jun-19 15:16
mveBillWoodruff28-Jun-19 15:16 
AnswerRe: to Pin
Dave Kreskowiak28-Jun-19 17:30
mveDave Kreskowiak28-Jun-19 17:30 
AnswerRe: to Pin
OriginalGriff28-Jun-19 19:14
protectorOriginalGriff28-Jun-19 19:14 
GeneralRe: to Pin
Member 1451570728-Jun-19 21:56
memberMember 1451570728-Jun-19 21:56 
GeneralRe: to Pin
OriginalGriff28-Jun-19 22:09
protectorOriginalGriff28-Jun-19 22:09 
RantRe: to Pin
Eddy Vluggen29-Jun-19 1:04
mveEddy Vluggen29-Jun-19 1:04 
AnswerRe: to Pin
Gerry Schmitz29-Jun-19 2:36
mveGerry Schmitz29-Jun-19 2:36 
QuestionLINQ : Unmatched data is coming for inner join Pin
Mou_kol28-Jun-19 9:39
memberMou_kol28-Jun-19 9:39 
AnswerRe: LINQ : Unmatched data is coming for inner join Pin
Eddy Vluggen28-Jun-19 13:44
mveEddy Vluggen28-Jun-19 13:44 
GeneralRe: LINQ : Unmatched data is coming for inner join Pin
Mou_kol1-Jul-19 5:04
memberMou_kol1-Jul-19 5:04 
GeneralRe: LINQ : Unmatched data is coming for inner join Pin
Eddy Vluggen1-Jul-19 5:08
mveEddy Vluggen1-Jul-19 5:08 
GeneralRe: LINQ : Unmatched data is coming for inner join Pin
Mou_kol1-Jul-19 9:35
memberMou_kol1-Jul-19 9:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.