Welcome Guest Search | Active Topics | Sign In | Register

upside down text rendering Options
Max
Posted: Sunday, October 18, 2020 5:39:23 PM
Rank: Newbie
Groups: Member

Joined: 12/3/2013
Posts: 9
I have an web application that adds elements (texts and/or images) to pdf files uploaded by web users. In most cases it works fine however in some cases the added text is displayed upside down and I don't know how to fix it.

Isolate the problem by using the following sample code (VB Console Application) that produces the same wrong result for some files. Could you please help me?

Code: Visual Basic.NET
Imports EO.Pdf
Imports EO.Pdf.Acm
Module Module1

    Sub Main()

        EO.Pdf.Runtime.AddLicense("MyLicenceKey..."")

        Dim Doc As New PdfDocument("C:\tmp\SourceDocument.pdf")        
        Dim Page As PdfPage = Doc.Pages(0)
        Dim pageLayout As New AcmPageLayout(New AcmPadding(0))
        Dim render As New AcmRender(Page, 0, pageLayout)
        Dim objAcmBlock As New AcmBlock()

        objAcmBlock.Style.Top = 1
        objAcmBlock.Style.Left = 1

        Dim text As New AcmText("Hello World")
        objAcmBlock.Children.Add(text)

        render.Render(objAcmBlock)

        Doc.Save("C:\tmp\DestinationDocument.pdf")


    End Sub

End Module


You can see the result here ():
Wrong Document


eo_support
Posted: Monday, October 19, 2020 12:58:27 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

Most likely this is caused by rotation/transform settings on your page. The latest version would automatically compensate for such settings, but our early versions does not. So if you are not already using the latest version, please try to the latest version first and see if it resolves the issue for you.

If the latest version still does not resolve the issue for you, please send your PDF file to us and we will look into it here and see what we can find. See here for more information on how to send test files to us:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!
Max
Posted: Tuesday, October 20, 2020 8:01:57 AM
Rank: Newbie
Groups: Member

Joined: 12/3/2013
Posts: 9
Indeed, I am using an old version of EO and the new version worked without problems. However, I would like to continue using the same old version that I already have in production and for which I paid a license. In this regard I would like to consult: Is it possible to correct (or reset) the page rotation/transform settings by code so that the problem is solved?

Yesterday I tried the next code (based on an example from this forum):

Code: Visual Basic.NET
Dim Doc As New PdfDocument("C:\tmp\SourceDocument.pdf")
Dim matrix As New Drawing.PdfMatrix()
Doc.Pages(0).Transform(matrix)
...


It solve the problem ('Hello World' text now appears in correct position/orientation), but a error mesaje about file consistency appears in Acrobat Reader when then file is opened... Possibly I am missing something to make everything coherent... Can you help me about this?
eo_support
Posted: Tuesday, October 20, 2020 9:31:40 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

Unfortunately we won't be able to make the old version work without applying the necessary code changes. There are multiple code changes on our side that addresses this issue. So it is not a simple transform. Beside the transform could also affect your existing contents.

Additionally, we officially only provide tech support for one year after the purchase. I see that your order was many years ago, so in fact you are no longer eligible for tech support either. As such moving forward you should definitely consider updating to the newer version.

Thanks!
Max
Posted: Tuesday, October 20, 2020 3:26:21 PM
Rank: Newbie
Groups: Member

Joined: 12/3/2013
Posts: 9
OK. Thank you very much for your comments.


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.