I'm working on a document storage / retrieval system in c#. The app
stores faxes in TIF format in SQL Server. I'm having a little trouble
I hope you folks can help me with:
Here's the first issue. When viewing a fax, i pull the data out of
sql server into an Image object and display it in a picture box.
Automatically the first frame (or page) is shown. I've got paging
working properly with First, Prev, Next, Last buttons all invoking
"SelectActiveFrame". Additionally while on any given page I have a
rotate button that works, however after rotating a page I can no
longer change pages. Here's my code that rotates the page. Any idea
why page swapping isn't working?
case "rotate":
thisDocument.RotateFlip(RotateFlipType.Rotate90Fli pNone);
thisDocument.SelectActiveFrame(fd,currPage);
Render(thisDocument);
break;
Second. I'm having trouble with printing. I'm pretty sure I have the
code setup right, but whenever I print it's just printing the first
page n number of times (where n is the number of pages in the tiff
file). Here's my print event code:
private void printDoc_PrintPage(object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
if (pagePrinting <= pageCount)
{
thisDocument.SelectActiveFrame(fd,pagePrinting-1);
e.Graphics.DrawImage(thisDocument,0,0);
e.HasMorePages = true ;
pagePrinting++;
}
else
e.HasMorePages = false ;
}
If anyone could provide some insight on these issues it'd be greatly
appreciated. Thanks,
David