We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

There is no page numbered '0' in this document.

This is a very strange question.

1. create a PDF document.
static public PdfDocument PrintCarton()
            PdfDocument document = new PdfDocument(); 
            //document.PageSettings.Size = PdfPageSize.A6;
            document.PageSettings.Width = 72 * 6;
            document.PageSettings.Height = 72 * 4;
            document.PageSettings.Orientation = PdfPageOrientation.Landscape;

            PdfPage page = document.Pages.Add();

            return document;

2. open the pdf by PdfViewer
PdfDocument pDoc=PrintCarton();
Stream stmDoc = new MemoryStream();

BUT the pdfViewer show the alert.

Question is:
1. change the size Orientation then it will not show the error.
2. make size double may not show the error. (I try height double or width and height double will not show the error.)
3. save the PdfDocument in file and open it by selection dialog may not the the error.
4. add two page.

3 Replies

US Uthandaraja Selva Sundara Kani Syncfusion Team November 29, 2019 10:06 AM UTC

Hi Reeray, 
Greetings from Syncfusion. 
We are unable to reproduce the mentioned alert in PdfViewerControl with the code snippet provided in our side.  Kindly refer the sample in the below link which we used to reproduce the reported issue.   
Kindly share the following details to analyze more on this and assist you a better solution,    
1.       Simple/Modify sample to reproduce the issue.     
2.       Replication procedure to reproduce the issue    
3.       Syncfusion product version.     
4.       .Net Framework     
5.       Visual Studio version.     
6.       Operating System     
Uthandaraja S

RE ReerayXia December 2, 2019 01:53 AM UTC

I try to show it in another simple application but I am failed.

I have resolved it in my own way.
This happen like this.
In my application. I need a window to generate a pdf file and show it.
Before, I do the generate file function in InitializeComponent.
Now, I add a timer to delay generate the file and show it after the window was shown on screen.
It doesn't throw this error anymore.

US Uthandaraja Selva Sundara Kani Syncfusion Team December 2, 2019 11:23 AM UTC

Hi Reeray, 

We are happy to hear that you have resolved the issue. 

Please let us know if you need further assistance. 

Uthandaraja S 

Live Chat Icon For mobile
Up arrow icon