This is a migrated thread and some comments may be shown as answers.
PDFProcessing Demo and the Size property
5 Answers 29 Views
This is a migrated thread and some comments may be shown as answers.
rootberg
Top achievements
Rank 2
rootberg asked on 17 Mar 2015, 02:23 PM
I was attempting to replicate the PdfProcessing demo at http://demos.telerik.com/aspnet-ajax/pdfprocessing/overview/defaultcs.aspx, and I am continually getting an error about  the "Size" property for "RadFixedPage.Size". It says "The type 'System.Window.Size' is defined in an assembly that is not referenced."

I am also experiencing a similar problem with the property "Point"

5 Answers, 1 is accepted

Sort by
0
rootberg
Top achievements
Rank 2
answered on 17 Mar 2015, 07:06 PM
Well, I don't see this in the documentation anywhere, but once I include a reference to "WindowsBase", it appears to work.
0
Kostadin
Telerik team
answered on 20 Mar 2015, 12:02 PM
Hello Yael,

I am afraid we miss to add this information in our documentation. Nevertheless after the next uploading of the documentation the missing information will be included in each Getting Started help article in Assembly References section.

Regards,
Kostadin
Telerik
0
Ken
Top achievements
Rank 1
answered on 23 Jun 2016, 03:50 PM

I am also having the same issue.  I did not get an error relating to windowsbase but I do get an error telling me that: Type 'Size' is not defined.  I am trying to mimic the demo code.  I have the following imports:

Imports Telerik.Windows.Documents.Fixed
Imports Telerik.Windows.Documents.Core
Imports Telerik.Windows.Zip
Imports Telerik.Windows.Documents.Fixed.FormatProviders.Pdf
Imports Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export
Imports Telerik.Windows.Documents.Fixed.Model
Imports Telerik.Windows.Documents.Fixed.Model.ColorSpaces
Imports Telerik.Windows.Documents.Fixed.Model.Editing
Imports Telerik.Windows.Documents.Fixed.Model.Editing.Flow
Imports Telerik.Windows.Documents.Fixed.Model.Fonts
Imports Telerik.Windows.Documents.Fixed.Model.Graphics

Overkill - but trying to narrow down the problem. The problem occurs when I try to set the page size as follows:

Dim document As New RadFixedDocument()
Dim page As RadFixedPage = document.Pages.AddPage()
page.Size = New Size(600, 750)

Can you help me past this issue?

Thanks, Ken

0
Kostadin
Telerik team
answered on 28 Jun 2016, 07:56 AM
Hi Ken,

Here is a list with all namespaces used in demo.
using System;
using System.IO;
using System.Windows;
using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf;
using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export;
using Telerik.Windows.Documents.Fixed.Model;
using Telerik.Windows.Documents.Fixed.Model.ColorSpaces;
using Telerik.Windows.Documents.Fixed.Model.Editing;
using Telerik.Windows.Documents.Fixed.Model.Editing.Flow;
using Telerik.Windows.Documents.Fixed.Model.Fonts;
using Telerik.Windows.Documents.Fixed.Model.Graphics;

I assume the cause for this exception is that you did not include System.Windows namespace in your case. Could you please try using them and let me know about the result?

Regards,
Kostadin
Telerik
0
Ken
Top achievements
Rank 1
answered on 28 Jun 2016, 04:31 PM
Thanks Kostadin!  I don't know how I missed that reference.  I added it in and everything is working great now.
Asked by
rootberg
Top achievements
Rank 2
Answers by
rootberg
Top achievements
Rank 2
Kostadin
Telerik team
Ken
Top achievements
Rank 1
Share this question
or