PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Apr 26, 2018 5:39 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Aug 08, 2014 4:06 am 
Offline

Joined: Fri Aug 08, 2014 3:48 am
Posts: 3
Hi all,

gfx->Transformer->WorldToDefaultPage(xrect) will fail if you change the size (for example height) after creating Page:

Code:
page->Height=600;

PdfSharp::Drawing::XRect xrect = gfx->Transformer->WorldToDefaultPage(PdfSharp::Drawing::XRect(10, 10, 10 + 50, 10 + 50));
      
   PdfSharp::Pdf::PdfRectangle^ myrec = gcnew PdfSharp::Pdf::PdfRectangle(xrect);

page->AddFileLink(myrec, filename);



WorldToDefaultPage sets Y to a higher value then the Page is, as workaround i create a dummypage, setting width/height on it and use it as template (page = document->AddPage(dummypage)).


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

All times are UTC


Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest


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:  
Powered by phpBB® Forum Software © phpBB Group