Licensing Issue

Posted by: bashi on 12 September 2019, 4:12 pm EST

    • Post Options:
    • Link

    Posted 12 September 2019, 4:12 pm EST - Updated 29 September 2022, 11:15 pm EST

    I’m using the following code for converting PDF pages to an image (from the documentation - see attached)) and getting an error "Unlicensed copy of GrapeCity Documents for Imaging. The number of GcBitmapGraphics (BitmapRenderer) and GcWicBitmapGraphics (RenderTarget) instances is limited to 10. Contact us.sales@grapecity.com to get your 30-day evaluation key.

    We purchased a license for Documents for PDF and do not want to also purchase a license for Imaging.

    Here’s a copy of the code:

    GcPdfDocument doc = new GcPdfDocument();

                        var fs = new FileStream(newFilePath, FileMode.Open, FileAccess.Read);
                        doc.Load(fs);
    
                        numOfPdfPages = doc.Pages.Count();
    
                        SaveAsImageOptions saveOptions = new SaveAsImageOptions()
                        {
                            BackColor = Color.White,
                            DrawAnnotations = false,
                            DrawFormFields = false,
                            Resolution = 100
                        };
    
                       
    
                        newFilePath = newFilePath.Replace(".pdf", ".jpg");
    
    
                        doc.Pages[0].SaveAsJpeg(newFilePath, saveOptions);
    
                        thumnailUrl = Path.Combine("/opportunitySubmissions/", filename.Replace(".pdf", ".jpg"));
    
                        for(int pgCnt = 0; pgCnt < numOfPdfPages; pgCnt ++)
                        { 
                            string tempFilePath = newFilePath.Replace(".jpg", "_" + pgCnt + ".jpg");
                            doc.Pages[pgCnt].SaveAsJpeg(tempFilePath, saveOptions);
                        }
    
  • Posted 12 September 2019, 4:12 pm EST

    We are setting the pdf license using this code when the app is launched - GcPdfDocument.SetLicenseKey(licenseKey);

  • Posted 12 September 2019, 10:24 pm EST

    Hello,

    Your query has been addressed on the corresponding SupportOne thread (ID: 397799) that you created. Please respond to the same to avoid confusion.

    Thanks.

  • Posted 16 September 2019, 4:37 am EST

    Hi bashi,

    This indeed is a bug in our code, this will be fixed in the next v2 hotfix. The hotfix should appear on NuGet.org within a week or so. I will post here as soon as it’s available.

    Regards,

    Dmitry.

  • Posted 19 September 2019, 2:17 pm EST

    This issue is fixed in build .316 now available from NuGet.org:

    https://www.nuget.org/packages/GrapeCity.Documents.Pdf/

    Thanks.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels