Welcome Guest! To enable all features please Login or Register.



Go to last post Go to first unread
#1 Posted : Tuesday, August 24, 2021 9:22:23 AM(UTC)

Rank: Member

Groups: Registered
Joined: 1/4/2021(UTC)
Posts: 11

Thanks: 1 times

I am developing a Winforms application that is meant to provide a GUI for creating text fields at a position on a PDF. The user create a Winforms control that represents the rectangle of a future pdf text field, drags it where they want, resizes it, sets the font size... When they have the field controls where they want, they can write actual PDF fields to the underlying document to match.

This works perfectly on my developer machine. I calculate the size and position of the Winforms control translated onto the PDF, and then use another PDF library (iText) to create the actual PDF form fields.

My problem is when I run the application on my colleague's computer, a few different strange things happen that all seem to have something to do with how coordinates are translated:

1. The Winforms control is supposed to spawn at the top left of the PDF as it is displayed in the PdfViewer. On his computer it appears at the bottom left.
2. When the PDF field is created, it appears above the desired location by an amount equal to the control height.
3. While the bounding rectangle of the created PDF control looks correct, the cursor and text typed into it are oriented vertically.

As I said, on my developer machine it runs fine. We are both on Windows 10. I've tried to on different zoom levels in Windows, different resolutions.. Nothing messes it up on my machine.

What is the cause of these kinds of shifts and how do I account for them in my application code?

PLEASE NOTE: My colleague has used Patagames in the past and has reported that the behavior was the same then. This isn't unique to my application for him, and that further tells me it has nothing to do with iText.

DLL versions:

Patagames.Pdf -
Patagames.Pdf.Winforms -
Patagames.Pdf.Wpf -

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.