Hi Loic,
1. Can I get the current transformation matrix by any chance?
I know there is a function called AddTransformationMatrix. But I need to programmatically set the parameters of it depending on current transformation matrix. So is there a way that I can get the current transformation?
2. Recently We've got some 'funny' PDFs, which are all around 10m, not too big though, on which we need to draw all kinds of shapes.
These PDFs are acting different:
(1) If loading the pdf using GdPicturePDF and then write a text in the bottom left of pdf:
var pdf = new GdPicturePDF();
pdf.LoadFromFile(@"First Floor Lighting Control Layout.pdf", false);
var fontResName = pdf.AddStandardFont(PdfStandardFont.PdfStandardFontHelvetica);
pdf.DrawText(fontResName, 0, 0, "Hello World");
pdf.SaveToFile("test.pdf");
pdf.CloseDocument();
But it is not in the expected place.
The text appears only if:
pdf.DrawText(fontResName, 0, -pdf.GetPageHeight(), "Hello World");
(2) If I rotate the PDF and then write text in the bottom left, I found out that the point of bottom left is changed too.
var pdf = new GdPicturePDF();
pdf.LoadFromFile(@"First Floor Lighting Control Layout.pdf", false);
pdf.AddPageRotate(90);
pdf.DrawText(fontResName, pdf.GetPageHeight() * 2 - 80, 0, "Hello World");
pdf.SaveToFile("test.pdf");
pdf.CloseDocument();
the point of bottom left is (pdf.GetPageHeight() * 2, 0) now.
(3) Also I got the different points of bottom left when rotating 180, 270.
It turns out that
When using AddPageRotate, the coordinate system is rotated based on its origin point clockwise as expected. But the pdf itself is rotated too, anti-clockwise and based on the point: (GetPageHeight()/2, GetPageHeight()/2).
That's why I might need the current transformation to move the to back to the 'right' position in order to draw the shapes correctly. Or can you please suggest me how to deal with those PDFs.
3. When displaying those 'funny' PDFs, it's slow and sometimes I get 'OutOfMemory' error.
Once the 'OutOfMemory' error comes up, GdViewer can't display it again unless restarting the application. (CloseDocument() and Dispose() don't work for me)
But GdPicturePDF.LoadFromFile is fine.
It's hard to say when it will happen.
But it IS slow to load and display by GDViewer.
Any suggestion on this?
==========================================================
By the way, how can I send some PDF samples to you?
Transformation & OutOfMemory
Transformation & OutOfMemory
Last edited by GeorgeZ on Fri Nov 21, 2014 4:26 pm, edited 1 time in total.
Re: Transformation & OutOfMemory
Hi George
I need one of your PDF.
You can join a pdf only if it is zipped.
Use "Post a Reply" button to find the "Upload Attachment" button.
In the meanwhile, consider the ResetGraphicsState method before any drawings on the pdf
Note : Resets the graphics parameters to the default configuration. For example, any page transformation will be canceled. It is suggested to make a call to this function before appending data to existing PDF documents.
Jean-Luc
I need one of your PDF.
You can join a pdf only if it is zipped.
Use "Post a Reply" button to find the "Upload Attachment" button.
In the meanwhile, consider the ResetGraphicsState method before any drawings on the pdf
Note : Resets the graphics parameters to the default configuration. For example, any page transformation will be canceled. It is suggested to make a call to this function before appending data to existing PDF documents.
Jean-Luc
Re: Transformation & OutOfMemory
Sorry for getting back so late. too busy this month...
I don't think our clients would be happy with sharing these pdf in public.
Is there other ways that I can send them to you privately?
Thank you.
I don't think our clients would be happy with sharing these pdf in public.
Is there other ways that I can send them to you privately?
Thank you.
Re: Transformation & OutOfMemory
Hi George,
If you have a valid SLA you can send such document by opening a support case on our helpdesk that you can reach here: https://support.orpalis.com/
Kind regards,
Loïc
If you have a valid SLA you can send such document by opening a support case on our helpdesk that you can reach here: https://support.orpalis.com/
Kind regards,
Loïc
Who is online
Users browsing this forum: No registered users and 1 guest