태워먹음.. 무슨날이냐..
'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글
앵무새 보러 갔는데 (0) | 2020.12.06 |
---|---|
지치는 토요일 (0) | 2020.12.05 |
귀찮아!!! (0) | 2020.10.18 |
평온한.. 하루? (0) | 2020.10.16 |
오늘은 운전을 하면 안되는 날이구만 (0) | 2020.10.10 |
태워먹음.. 무슨날이냐..
앵무새 보러 갔는데 (0) | 2020.12.06 |
---|---|
지치는 토요일 (0) | 2020.12.05 |
귀찮아!!! (0) | 2020.10.18 |
평온한.. 하루? (0) | 2020.10.16 |
오늘은 운전을 하면 안되는 날이구만 (0) | 2020.10.10 |
+
2020.11.13
컨트롤 추가를 투명하게 하려는 컨트롤에 해주어야 한다.
그리고 좌표는 부모(?) 컨트롤에 상대적으로 적용된다.
pictureBox7.Controls.Add(pictureBox8); << 이 부분이 핵심이고
pictureBox8.Location = Point(0,0); << 이 부분이 두번째 핵심이다.
public Form1()
{
InitializeComponent();
pictureBox7.Controls.Add(pictureBox8);
pictureBox8.Location = new Point(0, 0);
pictureBox8.BackColor = Color.Transparent;
}
[링크 : https://stackoverflow.com/questions/19910172/how-to-make-picturebox-transparent]
---
[링크 : https://stackoverflow.com/questions/36099017/how-to-make-two-transparent-layer-with-c]
[링크 : https://stackoverflow.com/questions/12138892/picturebox-with-transparent-background]
[링크 : https://stackoverflow.com/questions/4144371/a-picturebox-problem]
c# 멀티 모티터 사용 시 스크린의 순서 (0) | 2020.10.26 |
---|---|
C# form 동적 컨트롤 생성 (0) | 2020.10.26 |
자식에서 부모창의 자원 접근하기 (0) | 2020.10.23 |
c# winform 자식 다이얼로그에서 F4 막기 (0) | 2020.10.23 |
markdig custom markdown (0) | 2020.10.22 |
form2.Owner = this;
라고 부모에서 자신을 소유자로 등록하면
하위 폼인 form2 에서 ((Form1)(this.Owner)).parent_variable; 식으로 접근이 가능해진다.
다만 이벤트 핸들러 도 어떻게 영향을 받는지
alt-f4를 막아놨더니 부모도 창이 안 닫히는 문제가 발생했다.
[링크 : https://idgaf.tistory.com/3]
C# form 동적 컨트롤 생성 (0) | 2020.10.26 |
---|---|
c# winform picturebox 끼리는 투명 적용 되지 않음 (0) | 2020.10.23 |
c# winform 자식 다이얼로그에서 F4 막기 (0) | 2020.10.23 |
markdig custom markdown (0) | 2020.10.22 |
pdfsharp , migradoc (0) | 2020.10.22 |
예전 MFC 보다 많이 편해진 느낌?
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;
}
[링크 : https://stackoverflow.com/questions/14943/how-to-disable-alt-f4-closing-form]
c# winform picturebox 끼리는 투명 적용 되지 않음 (0) | 2020.10.23 |
---|---|
자식에서 부모창의 자원 접근하기 (0) | 2020.10.23 |
markdig custom markdown (0) | 2020.10.22 |
pdfsharp , migradoc (0) | 2020.10.22 |
itext7 (0) | 2020.10.22 |
visual studio community 에서 코드 정리하기 (0) | 2020.09.14 |
---|---|
비쥬얼 스튜디오 다국어 문자열 추가하기 - Visual Studio multilingual Project (0) | 2010.09.27 |
Visual Studio 2010 프로그램 스택 사이즈 변경하기 (0) | 2010.09.27 |
VS2010 실행 버튼이 헷갈려! ㅠ.ㅠ (0) | 2010.09.14 |
헉! VS2010 MFC 다이얼로그 에디터에 컨트롤들 어디로 간거야! (2) | 2010.09.14 |
돌려는 봤는데 어렵네 ㅠㅠ
어떻게 파서를 짜야하려나?
[링크 : https://www.cyotek.com/blog/writing-custom-markdig-extensions]
[링크 : https://www.cyotek.com/downloads/view/MarkdigMantisLink.zip/]
[링크 : https://odetocode.com/blogs/scott/archive/2020/01/23/a-custom-renderer-extension-for-markdig.aspx]
+ 2020.10.29
원래 구현하고자 하는 것은
[ ]
[x]
을 받으면 HTML의 input type=checkbox 로 변환하는 건데
MantisLink 예제를 따라해보니 [는 걸려지지 않는다.
아무래도 링크로 연관되어 [는 이미 처리되어버리기 때문에 걸러내질 못하는 듯..
그러면 github 등에서 어떻게 구현을 해서 쓰고 있는걸까?
자식에서 부모창의 자원 접근하기 (0) | 2020.10.23 |
---|---|
c# winform 자식 다이얼로그에서 F4 막기 (0) | 2020.10.23 |
pdfsharp , migradoc (0) | 2020.10.22 |
itext7 (0) | 2020.10.22 |
c# pdf itextsharp -> itext7 (0) | 2020.10.22 |
MIT license
[링크 : http://www.pdfsharp.net/Licensing.ashx]
다만 html 을 pdf로 변환하는 기능은 없다고 -_ㅠ
Can I use PDFsharp to convert HTML or RTF to PDF?¶ No, not "out of the box", and we do not plan to write such a converter in the near future. Yes, PDFsharp with some extra code can do it. But we do not supply that extra code. On NuGet and other sources you can find a third party library "HTML Renderer for PDF using PdfSharp" that converts HTML to PDF. And there may be other libraries for the same or similar purposes, too. Maybe they work for you, maybe they get you started. |
[링크 : https://stackoverflow.com/questions/48759671/convert-html-string-to-pdf-with-migradoc]
+
HtmlRenderer.RdfSharp 라는게 가장 위에 나오는데
BSD 3 clause 라이센스..
c# winform 자식 다이얼로그에서 F4 막기 (0) | 2020.10.23 |
---|---|
markdig custom markdown (0) | 2020.10.22 |
itext7 (0) | 2020.10.22 |
c# pdf itextsharp -> itext7 (0) | 2020.10.22 |
c# print 하기 (0) | 2020.10.19 |
HtmlConverter.ConvertToPdf()
는 하나의 HTML을 pdf로 변환하고 close 하기 때문에
merger를 이용해서 합쳐야 하는 듯 하고
HtmlConverter.ConvertToDocument()
는 pdf로 변환하지만 ConvertToPdf()와는 다르게 div()를 정상적으로 처리하지 못한다.
private void button2_Click(object sender, EventArgs e)
{
String DEST = "hello_world.pdf";
FileInfo file = new FileInfo(DEST);
file.Directory.Create();
PdfWriter writer = new PdfWriter(DEST);
PdfDocument pdf = new PdfDocument(writer);
Document document = new Document(pdf, PageSize.A4.Rotate());
document.SetMargins(20, 20, 20, 20);
PdfMerger pdfMerger = new PdfMerger(pdf);
document.Add(new Paragraph("Hello World!"));
String[] SRC = {
@"d:\test1.html",
@"d:\test2.html",
@"d:\test3.html",
@"d:\test4.html" };
foreach (var html in SRC)
{
MemoryStream baos = new MemoryStream();
PdfDocument temp = new PdfDocument(new PdfWriter(baos));
temp.SetDefaultPageSize(PageSize.A4.Rotate());
HtmlConverter.ConvertToPdf(System.IO.File.ReadAllText(html), temp, new ConverterProperties());
ReaderProperties rp = new ReaderProperties();
baos = new MemoryStream(baos.ToArray());
temp = new PdfDocument(new PdfReader(baos, rp));
pdfMerger.Merge(temp, 1, temp.GetNumberOfPages());
temp.Close();
}
pdfMerger.Close();
}
pdf 특성상 붙이는 파일의 용지 방향을 지정해 주어야 한다.
[링크 : https://stackoverflow.com/questions/54347293/how-to-set-orientation-to-landscape-in-itext-7]
markdig custom markdown (0) | 2020.10.22 |
---|---|
pdfsharp , migradoc (0) | 2020.10.22 |
c# pdf itextsharp -> itext7 (0) | 2020.10.22 |
c# print 하기 (0) | 2020.10.19 |
c# printer 사용하기 - printer enumeration (0) | 2020.10.19 |
iTextSharp
pdf 파일에 직접 내용을 만들어 넣기(Paragraph 등으로)
[링크 : http://www.csharpstudy.com/Practical/Prac-pdf.aspx]
[링크 : https://stackoverflow.com/questions/11307749/creating-multiple-page-pdf-using-itextsharp]
[링크 : https://www.nuget.org/packages/iTextSharp/]
iTextSharp에 HTML 내용을 넣기
[링크 : https://jujun.tistory.com/118]
iTextSharp
Docuement.NewPage()
한페이지 추가하기
[링크 : https://stackoverflow.com/questions/4124106/add-a-page-to-pdf-document-using-itextsharp]
private void button2_Click(object sender, EventArgs e)
{
Document doc = new Document(iTextSharp.text.PageSize.A4);
PdfWriter wr = PdfWriter.GetInstance(doc, new FileStream("simple.pdf", FileMode.Create));
doc.Open();
doc.AddTitle("Simple PDF 생성 예제");
doc.AddAuthor("Alex");
doc.AddCreationDate();
// 영문쓰기
doc.Add(new Paragraph("English : How are you?"));
doc.Add(new Paragraph("국문: 어때요?"));
doc.NewPage();
StyleSheet styles = new StyleSheet();
HtmlWorker hw = new HtmlWorker(doc);
String html_data = System.IO.File.ReadAllText(@"d:\test.html");
hw.Parse(new StringReader(html_data));
doc.NewPage();
String html_data2 = System.IO.File.ReadAllText(@"d:\test2.html");
hw.Parse(new StringReader(html_data2));
hw.EndDocument();
hw.Close();
doc.Close();
}
---
using iText.Kernel.Pdf;
using iText.Layout;
using iText.Layout.Element;
using iText.Html2pdf;
using iText.Html2pdf.Attach.Impl;
using iText.Layout.Font;
private void button2_Click(object sender, EventArgs e)
{
String DEST = "hello_world.pdf";
FileInfo file = new FileInfo(DEST);
file.Directory.Create();
PdfWriter writer = new PdfWriter(DEST);
PdfDocument pdf = new PdfDocument(writer);
Document document = new Document(pdf);
document.Add(new Paragraph("Hello World!"));
HtmlConverter.ConvertToPdf(new FileStream(@"d:\test2.html", FileMode.Open), pdf);
document.Close();
}
[링크 : https://kb.itextpdf.com/home/it7kb/examples/pdfhtml-accessible-pdf-creation]
[링크 : https://github.com/itext/itextsharp]
[링크 : https://github.com/itext/itext7-dotnet]
+
document.Add(new AreaBreak());
[링크 : https://stackoverflow.com/questions/17198337/how-can-i-make-a-page-break-using-itext]
[링크 : https://www.tutorialspoint.com/itext/itext_adding_areabreak.htm]
+
ConverToPdf() 메소드는 호출 이후 document를 close() 해버린다고.. -_-
The convertToPdf()/ConvertToPdf() methods create a complete PDF file. Any File, FileInfo, OutputStream, PdfWriter (Java/.NET), or PdfDocument (Java/.NET) that is passed to the convertToPdf()/ConvertToPdf() method is closed once the input is parsed and converted to PDF. This might not always be what you want. In some cases, you want to add some extra information to the Document(Java/.NET), or maybe you don't want to convert the HTML to a PDF file, but to a series of iText objects you can use for a different purpose. That's what the convertToDocument()/ConvertToDocument() and convertToElements()/ConvertToElements() methods are about. In the C01E07_HelloWorld.java example, we convert our Hello World HTML to a Document (Java/.NET) because we want to add some extra content after we've done parsing the HTML: |
[링크 : https://kb.itextpdf.com/.../itext-7-converting-html-to-pdf-with-pdfhtml/chapter-1-hello-html-to-pdf]
pdfsharp , migradoc (0) | 2020.10.22 |
---|---|
itext7 (0) | 2020.10.22 |
c# print 하기 (0) | 2020.10.19 |
c# printer 사용하기 - printer enumeration (0) | 2020.10.19 |
c# dialog dual screen (0) | 2020.10.15 |
ubuntu 18.04를 쓰는데
우분투에서 관리하는 xournal++은 프린트가 안되는 문제가 있다.
Version 1.0.16버전에서는 프린트시 파일로 저장하기 밖에 안뜨는데
PPA로 설치하니 1.1.0+dev 버전으로 설치되고 프린트에 정상적으로 목록이 출력된다.
[링크 : https://xournalpp.github.io/installation/]
짧은 영어로 올린다고 힘들었는데 너무 싱겁게 해결!
xournal++ (0) | 2020.09.16 |
---|---|
xournal 획 삭제 기본값으로 설정하기 (0) | 2019.06.03 |