Adding Annotations to Landscape PDF Using iText - annotations

my code creating annotations in pdf works ok
but i encountered a pdf where pages are displayed in landscape (1224x729) and the page's media box is vertical (729x1224) with a rotation value of 270
my coordinates for creating annotations is based on a bounding box area of 1224x729 so when it gets created the annotations are misplaced
is this still possible using iText? or the problem itself is the pdf when created?

Related

Text drawn in 3D on Canvas

How can I display text as 3D on a Canvas in Flutter? One way I've thought of is to replicate the text multiple times but display each replicant as an offset from the original text. The problem with that is that you won't be able to distinguish the edges because there wouldn't be any shadows/lighting.

Unity How do I Flow TextMesh Pro Text around an Image?

Unity Version: 5.6.5f1 Personal
TextMesh Pro Version: 1.0.56.0b3
I have a TextMesh Pro UI Text object whose area intersects the area of a UI Image. The text is dynamic, but the image will never change. Is there a way to make the TextMesh Pro UI Text flow around the image similar to how text would wrap to one side in HTML/CSS?
The image below shows two copies of the object in Unity. One object, denoted by a red space where the image is located, is what I'm currently getting. The text enters the space of the image. The other object, denoted by a blue space where the image is located, shows the desired outcome where text is wrapping properly.
Current vs. Desired Outcome:
Research so far:
How do I put an image inside text? - The Image that I'm using is a UI Image, not a text asset. The Image will only act as though it is inline with the text.
How do you wrap text around a rectangle?, Fluid layout for Unity UI - These are what I'm looking for. However, no suggestions have been posted in them.
I've explored the idea of using multiple TextMesh Pro UI Text Objects, with each one acting as a fragment of the complete text area. However, this isn't the same as wrapping the text around the Image. For dynamic text, if I pull content from one text area and push it into the next area, this will conflict with the Auto-Sizing functionality and cause unequal font sizes.
Another possibility is that I could insert characters one at a time, check to see if adding another character would result in a collision with the image, and add System.Environment.Newline to prevent this. However, I worry about the potential performance issues from dealing with large amounts of text.
TextMesh Pro Documentation - The TextMesh Pro Documentation has some tools for finding word wrap points, but I haven't figured out how to implement a means of comparing this to an anchor position of another object.
This can be accomplished with TextMeshPro's "Linked" overflow mode. See attached picture for an example. Essentially, you'll need to make two TMP objects and adjust the layout for each of them appropriately. Then:
1) change the overflow mode of the first one to "Linked" using the dropdown in the inspector.
2) place the second TMP object as the reference in the field that appears.

How to overlay text on image using swift?

First of all, I am using Auto Layout for this Swift application. In one view, i have an image that scales to full screen. And over this image there is an overlay text.
The problem is; When opening in iPhone6, the image scales and fits nicely but the text misplaces (normally) on the image, since the constraints are still the same.
I was thinking of merging the text and the image into one image layer so they scale and fit together. Is this possible ?
Or, anyone knows any other solution rather than trying to understand device and changing text placement contstraints accordingly ?
if you are using auto layout for display text in Lable. than must you have to play with constrain from interface builder. share you screenshot

images get cropped in the generated presentation

i am using open xml sdk to copy slides into another presentation , when the slides are copied and my desired presentation is generated , I iterate through each slide of the generated document and replace its existing images with the image of my choice , the process is executing and the images gets replaced , but here is the bind , if the dimensions of my images are larger then the image in the document , the image gets cropped to fit to the size that was previously occupied by the replaced image .But if i do the whole process manually , by right clicking with my mouse , power point changes the dimension of the image its get shorter but its not cropped and the whole image is displayed ...
so what approach should i go for , do i have to change some xml settings through code , or do i have to change the dimension of my images using c# classes , what is the right approach to tackle this issue???
guys i will be anxiously waiting for your response ......
Better change the image before replacing the image in your target presentation file. As power point is going to embed your image in the file itself, you can reduce the size of the overall generated file if you compress the images to required dimensions before replacing.
Changing the dimensions in the xml is also a valid idea but you are embedding images into the file without any added advantage.
Some pointers on how to resize image in c# :
https://stackoverflow.com/a/87786/860243
http://www.peterprovost.org/blog/2003/05/29/Resize-Image-in-C/
http://dzone.com/snippets/c-resize-image-while

iTextSharp image keep pixel dimensions?

Lets say I have an image that has a DPI of 72 and a width/height of 100px/100px.
However when I add the image and render the PDF, the image that is displayed is bigger than 100px/100px. How can I ensure that the when adding the image to the PDF using iTextSharp that I keep the same pixel dimensions as the original image, in this case 100px/100px?
It sounds like you'll want to check out the ScaleAbsolute method of the iTextSharp.text.Image, which will explicitly set the height/width of an image. There are a couple of related methods you'll want to read up to: ScalePercent and ScaleToFit.
These methods are described in the SourceForge iTextSharp tutorial which includes samples. See tge "Scaling and Rotating the Image" section.