#26 Rendering don't work

closed-rejected
nobody
None
5
2011-12-05
2011-12-04
Anonymous
No

With this code pdf rendering dont work:

openFileDialog1.ShowDialog();
org.pdfclown.files.File file = new org.pdfclown.files.File(openFileDialog1.FileName);
Document document = file.Document;
Pages pages = document.Pages;
int count = 0;
foreach (Page pagina in pages)
{
SizeF imageSize = pagina.Size;
Renderer renderer = new Renderer();
System.Drawing.Image image = renderer.Render(pagina, imageSize);
image.Save(openFileDialog1.FileName.Replace(".pdf","_") + count + ".jpg", ImageFormat.Jpeg);
count++;
}
MessageBox.Show("immagini salvate");
attached pdf file and resulting jpg

Discussion


  • Anonymous
    2011-12-04

    result jpg

     
    Attachments

  • Anonymous
    2011-12-04

    orignin pdf

     
    Attachments

  • Anonymous
    2011-12-04

    the result jpg is blank

     
    • status: open --> closed-rejected
     
  • Why don't you bother to read the accompanying documentation notes?
    It's clearly stated that page rendering is under development (pre-alpha stage)...