PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 4:16 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
 Post subject: custom paper size
PostPosted: Thu Sep 20, 2007 1:56 pm 
Offline

Joined: Thu Sep 20, 2007 1:06 pm
Posts: 15
Hi.

I'm just starting to use PDFsharp and I'm going through the examples to test what's posible and not.

it looks like it's posible to change paper size since there are lists of A0-A5 letter etc... but I haven't found an example that implements this, and wherever I try to change sizes I get errors ("An item with the same key has already been added." in migradoc.rendering.formateddocument : line 461 : void IAreaProvider.StoreRenderInfos(ArrayList renderInfos)) or just standard A4 output...

this is just step 1 for me since I then want to expand and be able to specify custom paper sizes outside the standard paper size range.

could someone please point me in the right direction so I can change paper size in my pdf's.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 20, 2007 2:17 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
Hello!

Have a look at the PageSizes sample in this folder:
Samples C#\PageSizes
The solution is in this folder:
Samples C#

I hope that helps!

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 20, 2007 2:33 pm 
Offline

Joined: Thu Sep 20, 2007 1:06 pm
Posts: 15
wtf? :D

where was I looking? thanks a lot!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 21, 2007 1:48 pm 
Offline

Joined: Thu Sep 20, 2007 1:06 pm
Posts: 15
I'm suddenly not allowed to post messages here. just testing to see if there was something in my code example that phpbb didn't like...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 21, 2007 1:51 pm 
Offline

Joined: Thu Sep 20, 2007 1:06 pm
Posts: 15
apparently... so, you'll just have to guess what my code looks like until I've been here for 5 days, coz obviously phpbb thinks that posting code in the forum is the same as adding personal data or urls in my presentation (witch the error message tells me I'm not allowed to do)... and since I'm not allowed to do that for a couple of days, the code will have to wait...

on the subject of rotating text, I have a question..

I'm trying to rotate some text without flipping the whole page... how do I manage to do that? I'm just testing the library to see if it fit's my needs so my tests are pretty simple at this point.

What I've done so far is to print a text dead center of the page (a title) and another text at the bottom left side, had to add that to the XStringFormat since it only had BottomCenter. At first I rotated the title to see how things worked out, and it looked just the way I wanted it, but I couldn't find the text at the bottom of the page, after a while I came to the conclusion that the whole page was rotated and so the bottom aligned text went outside the page... I tried to ad a separate xgraphic element to the page for the rotated text, but I'm only allowed to have one per page... I think...

any ideas?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 21, 2007 2:12 pm 
Offline

Joined: Thu Sep 20, 2007 1:06 pm
Posts: 15
nevermind ;) got it...

to bad I can't publish the code, but it was verry simple so if anyone gets the same problem; just flip the page back when you've added the rotated content...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 24, 2007 8:34 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
tranquillo wrote:
I'm suddenly not allowed to post messages here. just testing to see if there was something in my code example that phpbb didn't like...

There's a change in the forum software (applied after Thursday) - they're trying to prevent SPAM but prevent serious users from posting.

More information

_________________
Regards
Thomas Hoevel
PDFsharp Team


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: Google [Bot] and 141 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