PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 11:36 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Nov 28, 2018 5:14 pm 
Offline

Joined: Wed Nov 21, 2018 5:48 pm
Posts: 13
How do I add rotated text to a pdf document? I'm using Migradoc. I'm adding Formated text to a Paragraph. Also, how about rotated images? Should I rotate the image on my own or is there a mechanism for adding it rotated?


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 28, 2018 7:24 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
TextFrames have an Orientation property.
See here:
viewtopic.php?p=6399#p6399

I think you cannot rotate images with MigraDoc.
Are those JPEG images? If so, try to find a way to rotate them with decompressing/compressing them. PDFsharp could be an option, but files will then be slightly larger.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 29, 2018 4:59 am 
Offline

Joined: Wed Nov 21, 2018 5:48 pm
Posts: 13
I found that putting text and images into a TextFrame with Orientation = TextOrientation.Upward on the frame will give me rotated text and images.


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 29, 2018 7:51 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
The name "TextOrientation" (not TextFrameOrientation) irritated me. Good to know it rotates everything.
Thanks for the feedback.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


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

All times are UTC


Who is online

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