PDFsharp & MigraDoc Forum

PDFsharp - A .NET library for processing PDF & MigraDoc - Creating documents on the fly
It is currently Sun Sep 14, 2025 3:52 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules

Also see our new Tailored Support & Services site.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Aug 20, 2015 8:21 am 
Offline

Joined: Thu Aug 20, 2015 7:54 am
Posts: 2
Hi,

I recently came across PdfSharp because I needed a tool that can produce pdf files through my project.

I am using Visual Basic .Net (VS 2013) targeting .NET Framework 4.5. I downloaded the assemblies and added a reference to the PdfSharp.dll in the GDI+ folder. I also imported PdfSharp, PdfSharp.Drawing and PdfSharp.Pdf in the Declarations.

Now, when I start debugging, I am get this exact error message: "'Printing' is ambiguous, imported from the namespaces or types 'PdfSharp.Pdf, System.Drawing'."

This error points to a private sub from a document printpage, which works just fine (I was using it before adding PdfSharp).

I realize that "printing" is a class that is declared in both System.Drawing and PdfSharp.dll but unfortunately I need both of them.

Can anyone help? Thank you all in advance.


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 20, 2015 8:26 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3135
Location: Cologne, Germany
Hi!
JohnK wrote:
Can anyone help?
I am no VB.NET expert and without an SSCCE there is nothing I can do.

Is it a run-time error or a compile-time error?
Try to replace "Printing" with "System.Drawing.Printing" in that "private sub" and see if that makes a difference.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 20, 2015 9:01 am 
Offline

Joined: Thu Aug 20, 2015 7:54 am
Posts: 2
Wow, that was an extremely quick response. Thanx.

I forgot to mention that I downloaded the PDFSharp assemblies version 1.31 a couple of days ago. That's the version that I use. Also, the error that I get is a compile time error.

And as you proposed, changing to "System.Drawing.Printing" at the sub did the job. I am a bit of a "newbie" so please forgive me for not thinking this earlier.

Thumbs up to the PDFSharp team. Thank you very much and keep up the good work.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 149 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group