Not Aligning the data inside a column in pdf generated by using jspdf auto table - jspdf

I have attached my problem in the below snap , I dont know how to align the data in particular manner inside a column using jspdf-autotable generated pdf.
I have a requirement to show the parent step and child step in a column . so In my code I wrote a logic inside drawCell() for every child step, added 10Spaces and print in pdf.
Inside drawCell() I got cell.text data in the form of array of Strings. I easily added 10 spaces for every string like below
[" String1"," String2"," String3"," TOOLONG STRING dfhdjhdfd..fsdd..."]
If the String is too long some of the letters are hided at the edge of the row ,jspdf tries to place a every string in the same line ,below image shows the problem I am highlighted in that, Please give me some suggestion I am not getting any Idea How to fix it ..Please bear with my English

Try to use the createdCell hook instead of the drawCell hook to add the spaces. It is executed before the width is calculated.

Related

I want to export a pdf from a google spreadsheet without the empty cells making it bigger than it needs to

I have a spreadsheet created with importrange functions that pulls data from another file. The problem I'm facing is that when I try to print out the spreadsheet and save as pdf, the pdf includes all the cells I've set up to receive my data, the empty ones too, and I end up with a 4 page pdf with 3 empty pages.
I tried to put a filter() function in front of the importrange, so that if the importrange somehow imports null values and puts them in the empty cells making them no empty even though they look like it, that would do it, it didn't.
I've also read that google spreadsheet interpretes white background color as fill color, and to set it back to default background, and I did, but it didn't solve it.
I've removed the importrange functions at all to see if it was that that was doing it, it wasn't.
Finally, I've thought about formatting, because those cells are formatted with white borders, but I removed all custom borders and it still prints out all the cells.
To reiterate, I need to be able to do print > save as pdf and get a pdf that contains only the cells used, and I have an old spreadsheet that I'm improving upon that does exactly this (that is not made by me) and has very similar formatting, so I don't understand what's the issue here.
Here's one workaround:
Select the cells you want to include in your PDF
Click on "File" > "Download" > "PDF"
When the Print Settings/Export window appears, select "Selected cells" instead of "Current sheet" under "Export" in the top right corner
This screen capture shows the window in question.
Bois, I figured it out.
It's a pretty dumb thing, but I didn't know it.
The solution is absolutely no formatting of any kind, it's ok to have formulas that dont output anything, and custom text color for the cell, but all the cells must be separated and with default background color and default border color (AKA no border option).
What kept bugging me is the fact that my reference project had no cell borders and it had this loong table that never printed out if not necessary, and I assumed it had white borders, but it didn't.
Turns out the option to hide cell borders (VIEW > SHOW > GRID LINES) at all is connected to the spreadsheet itself, not the user, so if you disable it, everytime you open the file, from every account connected, it is not gonna show, so that's how they did it.

How to leave a blank cell and not skip it with Importxml?

Basically I have an import xml code:
=IMPORTXML("https://www.example.com/listings.php?","//*[#id='listings']//*[#class='address']")
and it spits out the value in a row.
However if the text within the (div/span) class is empty it just skips over it and shows the next one in the cell below.
I don't want it to skip over blank text if the div with that class exists, even if it has no text inside. But rather create a blank cell so it doesn't mess with the values of the column beside it.
How is this possible?
So if this is your own site, the only solution I found was to add into all the empty divs/spans or w.e
This worked for me and left a blank cell which matched the column beside it.
Just keep in mind that if your content is dynamically refreshing or changing, you'll need to create a param to not change the content, otherwise it won't match the columns, even though you have the white space.

Conditional formatting not working when value is pasted

I'm using Google sheets. I just want the cell to turn green when there is something in it. Pretty basic. It works if I type a value in but not if I paste a value from somewhere else. The ID numbers I'm working with are long so I don't want to retype them because it wastes time and creates room for error.
To preserve conditional formatting when pasting to a cell, you can do one of the following
Choose Paste values only
OR
Double click within the cell and paste your value/number

how can i combine cells in fastreport?

i have a table. to print like this
https://up.djelfa.info/uploads/155762484493151.png
I want to make the observation take the whole table means it remains empty. The empty box takes all the table.
https://up.djelfa.info/uploads/155762492124361.png
im working with fastreport 5 vcl
master data
https://up.djelfa.info/uploads/155762509600791.png
Per your last link, it appears that you have hard-drawn the cell lines in your master data row. This means they will print for each row. There are, however, multiple ways to get around this:
Make the upper and lower lines for your Observation column separate objects (e.g. LineObsTop and LineObsBottom). Then, in the MasterData Band's OnBeforePrint, adjust the visibility of these based on the values of the column
Don't hard-code cell lines! Instead, make sure the cell fields all align perfectly and use the fields' Frame properties. Then use the Observation field's OnBeforePrint to adjust the frame based on value.
Similar to #2, but use conditional formatting for the cell, adjusting the frame.

UserInteractive Substring in text Label

i am generating a label in a view with label text retrieving from a JSON file.
now there are certain texts(values) retrieved from the JSON file that are user interactive texts (URL/some action) and some are not.
Now i am retrieving the data which are user interactive, setting them as text of a UILabel (which i created dynamically) and setting it in the view (PS. my view controller only has a 2 views inside,one that is default and another in which i am generating the label).
The problem that is arising is that the interactive strings(labels) are set in one line and the ones that are not interactive are set in the next line(as i am creating individial labels for them) even if its a single word.
I want to set the labels (with the texts - interactive/noninteractive) side by side untill there is no space.
Cant wrap my head around it because its a logical problem.
Any help is appreciated

Resources