Search found 1125 matches

by utelle
Thu Oct 19, 2023 4:49 pm
Forum: wxCode
Topic: wxPDFDocument Auto-height
Replies: 10
Views: 21455

Re: wxPDFDocument Auto-height

I do a receipt which is basically three tables 1. Header table with business details. It is divided into two columns 2. Contents table with Product | Quantity | Price. So three columns 3. Footer table with Subtotals. Apart from them having varying column and heights they are of the same width Table...
by utelle
Thu Oct 19, 2023 11:25 am
Forum: wxCode
Topic: wxPDFDocument Auto-height
Replies: 10
Views: 21455

Re: wxPDFDocument Auto-height

Since you have experience with this how do you deal with this? Yes, as the author of wxPdfDocument I should know how to accomplish various tasks. However, the devil can be in the detail. I'm generating PDF for Receipts to be printed on thermal printer. And you want pages of different height, depend...
by utelle
Wed Oct 18, 2023 7:45 pm
Forum: wxCode
Topic: wxPDFDocument Auto-height
Replies: 10
Views: 21455

Re: wxPDFDocument Auto-height

One more question, how do I know line length so that I can calculate number of lines needed? Especially for non-fixed width fonts? The available line length depends on the left and right margin. That is, the available line length is "page width minus (left plus right margin)" . The width ...
by utelle
Wed Oct 18, 2023 11:50 am
Forum: wxCode
Topic: wxPDFDocument Auto-height
Replies: 10
Views: 21455

Re: wxPDFDocument Auto-height

Is there a way to specify only width and let wxPdfDocument calculate height based on text size? This is currently not possible. Your application has to calculate the cell height. However, this should be rather trivial, because you know the font size you use for writing text or can retrieve it by ca...
by utelle
Thu Jun 15, 2023 11:59 am
Forum: C++ Development
Topic: Implement Filter in wxGrid and wxTableBase
Replies: 4
Views: 2477

Re: Implement Filter in wxGrid and wxTableBase

I'm wondering whether there is any support for filtering in the wxGrid with its customized wxTableBase. My current implementation is a bit dirty, every time I need to re-generate a new wxTableBase with the rows I want and keep a copy of original table forever. Several months ago the availability of...
by utelle
Sat Jun 10, 2023 8:26 am
Forum: wxCode
Topic: Mirrored text not displayed using Adobe Acrobat
Replies: 8
Views: 5244

Re: Mirrored text not displayed using Adobe Acrobat

Can I ask what application you use to display the PDF document and how do you invoke the application? I query the wxFileType class for the open command. Essentially, this results in invoking the default PDF viewer (Acrobat Reader on my Windows system). Are you invoking like we do (below) or some ot...
by utelle
Fri Jun 09, 2023 8:41 pm
Forum: wxCode
Topic: Mirrored text not displayed using Adobe Acrobat
Replies: 8
Views: 5244

Re: Mirrored text not displayed using Adobe Acrobat

We're not using any of the above settings. Well, I'm at a loss. As said, I made several experiments using default settings and it works as expected. The only idea I have is that maybe something goes wrong on calculating the transformation point based on the text extent. For example, if the text ext...
by utelle
Fri Jun 09, 2023 5:21 am
Forum: wxCode
Topic: Mirrored text not displayed using Adobe Acrobat
Replies: 8
Views: 5244

Re: Mirrored text not displayed using Adobe Acrobat

Using wxPdfDC's default settings the transformations seem to work as expected. However, it is still possible that there is a bug when using non-default settings. So, could you please let me know the settings you are using, namely whether you modify the resolution ( wxPdfDC::SetResolution() ), the ma...
by utelle
Wed Jun 07, 2023 9:16 pm
Forum: wxCode
Topic: Mirrored text not displayed using Adobe Acrobat
Replies: 8
Views: 5244

Re: Mirrored text not displayed using Adobe Acrobat

Attached is a much smaller drawing with one mirrored text string and one non-mirrored text string. The smaller text is reference text and is not mirrored. The mirrored text is on the bottom of the board. Thanks for the smaller sample and the code snippet. The drawing on the screen (first drawing) i...
by utelle
Tue Jun 06, 2023 7:17 pm
Forum: wxCode
Topic: Mirrored text not displayed using Adobe Acrobat
Replies: 8
Views: 5244

Re: Mirrored text not displayed using Adobe Acrobat

We have mirrored text in the design, but the text is missing or misplaced in Adobe. One question is whether the text is really missing in the generated PDF or just not displayed due to possibly wrong use of PDF operators. However, the sample PDFs you provided are too complex to analyze manually. Ca...
by utelle
Mon May 08, 2023 12:14 pm
Forum: wxCode
Topic: wxPdfDocument - print
Replies: 2
Views: 1872

Re: wxPdfDocument - print

I create wxPdfDocument with template. I fill it and by SaveAsFile can save as pdf. Is some way to send to wxPrintPreview or print directly? When generating PDF documents with wxPdfDocument the resulting PDF file is typically opened with the system PDF viewer (for preview), and the user can then use...
by utelle
Tue Apr 18, 2023 8:28 am
Forum: wxCode
Topic: Build wxSQLite3 crashes
Replies: 4
Views: 2350

Re: Build wxSQLite3 crashes

Thank you. But I figured it just wouldn't put the same object since it exists. Because before I insert the object I have to check if it exists, which is more complicated than SQL itself doing You requested in your schema that product is unique, therefore SQLite checks this condition, and if it is v...
by utelle
Tue Apr 18, 2023 8:17 am
Forum: wxCode
Topic: Build wxSQLite3 fail
Replies: 1
Views: 1822

Re: Build wxSQLite3 fail

Well, CMake build support could (and probably should) be called "experimental" (and certainly needs improvement). It was added by a user of wxSQLite3 about 3 years ago. Most likely, it works only under Windows with Visual C++. The reason is that the gcc compiler needs additional compile ti...
by utelle
Tue Apr 18, 2023 7:24 am
Forum: wxCode
Topic: Build wxSQLite3 crashes
Replies: 4
Views: 2350

Re: Build wxSQLite3 crashes

I am trying to insert same object to DB with unique attribute and wxSQLite3 fails. wxString sql=wxT("CREATE TABLE if not exists products (id INTEGER PRIMARY KEY AUTOINCREMENT unique , product BLOB unique)"); wxString sql=wxT("INSERT INTO products (product) VALUES ('SAME OBJECT')"...
by utelle
Tue Feb 21, 2023 8:45 pm
Forum: wxCode
Topic: wxPdfDocument creates invalid pdf-file
Replies: 1
Views: 1994

Re: wxPdfDocument creates invalid pdf-file

I replied to your issue report on GitHub . In the attached PDF file floating point numbers were written with a comma as the decimal separator. wxPdfDocument uses method wxString::FromCDouble() internally to convert floating point numbers to strings. So, actually it should never happen that a decimal...