PDF flickers if you set some properties

The PDF Creator .NET Library enables you to create secure PDF documents on the fly and to view, print and process existing PDF documents. If you have any questions about PDF Creator .Net, please post them here.
Post Reply
Cooperson
Posts: 5
Joined: Mon Dec 24 2007

PDF flickers if you set some properties

Post by Cooperson »

Hi,

I am using the .NET PDF Creator (acPDFCreatorLib.Net.dll and acPDFCreator.Net.dll; Version 4.5.2.9).

If you set one of this property the PDF flickers

.Document.MinimumGap = 0;
.Document.ScaleToWindow = IacScaleType.acScaleHorizontal;
.Document.ZoomFactor = 70;

If you combine some properties, you get flickering for each property. And the function Open(ex) set the ZoomFactor always to the default value (140 %).

Is it possible to prevent flickering or drawing the PDF until the properties are assigned.

I tried the current 5 Version. In this version the ZoomFactor do not change if you call the Open(ex) function; one flicker less.


Best regards
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Re: PDF flickers if you set some properties

Post by Jose »

Hi,

I suggest that you look at the AutoRefresh() property of the document object.

In the code snippet below the screen is only refreshed after the object is created. I believe this is what you are looking for.

Code: Select all

private int pdfCreator2_FireMouseUp(object sender, IacEventArgs e)
{
    endX = e.x;
    endY = e.y;


    //AutoRefresh
    //When set to True, the control is refreshed each time a property is modified.

    //do not refresh control
    pdfCreator2.Document.AutoRefresh = false;

    //Create highlight object
    using (Amyuni.PDFCreator.IacObject oPDF = pdfCreator2.Document.GetPage(1).CreateObject(IacObjectType.acObjectTypeHighlight, "ObjectTypeHighlight"))
    {
        oPDF.AttributeByName("Highlight Left").Value = startX;
        oPDF.AttributeByName("Highlight Top").Value = startY;
        oPDF.AttributeByName("Highlight Right").Value = endX;
        oPDF.AttributeByName("Highlight Bottom").Value = endY;  
        oPDF.AttributeByName("BackColor").Value = 192;
    }


    pdfCreator2.Refresh();  
    //refresh control     
    pdfCreator2.Document.AutoRefresh = true;
    return 0;
}

Thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite
Cooperson
Posts: 5
Joined: Mon Dec 24 2007

Re: PDF flickers if you set some properties

Post by Cooperson »

Hi Jose,

the property AutoRefresh works fine. Thanks a lot.

best regards
Post Reply