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

Notification

Icon
Error

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

Rank: Member

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

Thanks: 1 times
Hello,

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 - 6.39.23.461
Patagames.Pdf.Winforms - 4.10.11.461
Patagames.Pdf.Wpf - 4.11.13.461

Thanks
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.