PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jul 14, 2024 10:08 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Thu Sep 30, 2010 2:00 pm 
Offline

Joined: Thu Sep 30, 2010 1:49 pm
Posts: 4
Greetings,

I am working on an APP to batch print CADD drawings from PDFs. While the printing part is not an issue, the part of allowing the user to select the size they would like to "Scale" it to is an issue.

Is there a way to open a PDF, resize from the original, to the new user selected size? I am aware of how to set a page size, however the content remains the same size and simply crops. If I scale up, the drawing appears in the bottom as a small square, and if I scale down, it only shows a limited portion of the original.

Thank-you!


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 30, 2010 3:38 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
With PDFsharp you can do it like the TwoPagesOnOne sample shows.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 30, 2010 4:24 pm 
Offline

Joined: Thu Sep 30, 2010 1:49 pm
Posts: 4
GREAT!

This seems to be working ok, but whenever I run my code (I get the same error from some of the examples)

I get the error:
// If this occurs it is an internal error
Debug.Assert(false, "Object type transformation must not be done with direct objects");


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 04, 2010 7:22 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
It's not an error, it's an assertion. Message won't show in Release builds.
AFAIK you can remove this line without problems.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 12, 2010 7:14 pm 
Offline

Joined: Thu Sep 30, 2010 1:49 pm
Posts: 4
Thomas Hoevel wrote:
It's not an error, it's an assertion. Message won't show in Release builds.
AFAIK you can remove this line without problems.


When I publish my Application, or change the configuration to Release, it is still asserted!

I guess I can remove the code, but I am kind of wondering why it does this, perhaps to prevent it, rather than silent it.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 13, 2010 8:10 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
moosemanca wrote:
When I publish my Application, or change the configuration to Release, it is still asserted!

Debug.Assert does nothing in the Release build (unless you changed the Release build configuration). Don't forget to build and publish.

The author of this Debug.Assert is not sure if it can be safely removed.
In the cases when I got this messages I just ignored it and the documents all looked fine.

I'm sorry for the irritation it causes.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 13, 2010 2:45 pm 
Offline

Joined: Thu Sep 30, 2010 1:49 pm
Posts: 4
Thomas Hoevel wrote:
moosemanca wrote:
When I publish my Application, or change the configuration to Release, it is still asserted!

Debug.Assert does nothing in the Release build (unless you changed the Release build configuration). Don't forget to build and publish.

The author of this Debug.Assert is not sure if it can be safely removed.
In the cases when I got this messages I just ignored it and the documents all looked fine.

I'm sorry for the irritation it causes.


I hate myself. I meant publish/Release build of MY project.... awwwkward....


Thanks Wo/Man!


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 22 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